Comment 32 for bug 24280

Cameron Gorrie (sastraxi) wrote :

How about this for a solution:

Situation:
The user changes her theme to a non-standard one installed by downloading an archive file and installing it with GNOME's appearance properties application.

Problem:
Applications launched by the user via. a "sudo" or "gksu" command do not reflect the user's theme.

Explanation:
The root user may not have had the user's theme selected, had their own theme selected by an administrator using the root account graphically (which as far as I know is not a good idea), or had the user's theme selected but cannot find it because it is not in their .themes directory.

Solution:
Allow gksu to change environment in such a way that the program launched by gksu has the user's theme. Whether this is by changing environment variables to flag the GTK program, pointing the program to a different gconf configuration, or something else (hopefully decided by someone with a much deeper knowledge of GNOME and GTK than myself), it should not change GTK or GNOME properties for any other root-run program but the one launched by gksu.

Rationale:
Modifying sudo to fix a minor gtk appearance bug seems like a very bad idea. However, gksu is gtk-based and as such should integrate as perfectly as possible into that environment. Also, this solution would allow the use cases where the root account is using that account graphically in GNOME/GTK to act correctly (i.e. run using the root's theme rather than the user's theme), if implemented correctly.

What is the general consensus on this solution?