This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Theme for GTK apps running as non-logged in user

Tags: None
(comma "," separated)
ralphb
Registered Member
Posts
16
Karma
0
OS
Hello,

I'm running Firefox as a separate user, i.e., I'm logged in as user A and Firefox runs as user B. Both users A and B have proper home directories, and both are configured to use QtCurve as GTK+ Styles in System Settings -> GTK+ Appearance.

Alas, all GTK applications running as user B are entirely unthemed. (This changes temporarily if I start Gnome Control Center as user B, as this starts service gnome-settings-daemon for user B.)

Do I need to change any permissions (filesystem, groups, ...?) so that applications of B are themed when running on A's desktop?

Regards
Ralph
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The issue is likely because the resource file used to apply the settings ( probably called in *gtk*kde*.sh or similar in $HOME ) is not being loaded for user B.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ralphb
Registered Member
Posts
16
Karma
0
OS
bcooksley wrote:The issue is likely because the resource file used to apply the settings ( probably called in *gtk*kde*.sh or similar in $HOME ) is not being loaded for user B.


Thanks for your patience. :-) But why is that file not loaded for user B? Or put differently: What causes GTK applications to look for that file?

Note that both users have one identical GTK config file in their $HOME directory:

Code: Select all
lynx ~ > cat .gtkrc-2.0-kde4
include "/usr/share/themes/QtCurve/gtk-2.0/gtkrc"


Ralph
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The issue is that a script in the KDE startup process ( placed there by the KDE control module for Gtk themes ) which ensures that gtkrc file is loaded by setting environment variables before any application gets to start.

When you run the application under user B, they get a totally clean envionment ( much like the one you would get if you logged in at a virtual terminal ) which means that the gtkrc file will not be used, and is why they don't follow the modules settings. Calling the script ( probably in ~/.kde/env ) in ~/.bashrc or ~/.profile should be sufficient to ensure it is loaded.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ralphb
Registered Member
Posts
16
Karma
0
OS
bcooksley wrote:probably in ~/.kde/env


Thanks a million, that was the missing link! Works like a charm now. :D

Ralph


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft