kdesudo and the config problem

Harald Sitter apachelogger at ubuntu.com
Sat May 12 16:15:20 UTC 2012



Let me quickly outline how user (kde) configuration work with kdesudo.
They do not.
The entire idea is that kdesudo makes applications use the target
users home rather than the invokees. otherwise running `kdesudo kate`
would write a config that is only writable/readable by root into the
users home making kate when invoked the regular way unable to save
But! KDE software also stores theming data in config files (widget
style, fonts, colors ...) which then leads to inconsistent appearance
of applications running using kdesudo. Incidentally enough that is why
one is supposed to use gksu/kdesudo with gui apps ;).

This is a long standing complaint with users of kdesudo and AFAIK we
never actually discussed what we want to (not) do about it. Suppose it
is time ;)

You might be able to imagine that since the problem is caused by the
very core idea of kdesudo working around it would be a right pain in
the booty. In particular applications/kdelibs needs to have a runtime
theme override (runtime being data that is already in memory, for
example as envrionment variables). I reckon GTK3 has the very same
thing with theme configs being stored in X11 from what I understand.
Since I don't see Qt/KDE moving to an X11 bound way of defining the
theme (portability and whatnot) the only way to achieve this would be
to define other means for settings transfer (e.g. dbus) coming with
equally invasive code changes. This however also affects kdesu and
thus all that rubbish can be done upstream.

The question is whether that is even worth thinking about.

I for one do not think so, particularly since running most apps using
kdesudo is a bad idea to begin with. Also one would have to define
where to draw the line, because I can totally imagine people asking
for kdesudo kate to use the settings of the user adding a whole new
layer of problems. Should an app really need to run as root the app
developer can probably make theme transfer work individually (e.g.
have a host app that exports the data via dbus and invoke kdesu(do)
from that host app, the rootified app then reads the data from dbus).



More information about the kubuntu-devel mailing list