How to load a GTK 2.x theme with a command line or shell script?
I would like to know how i can load a gtk theme with a terminal command line or with a shell script if possible.
Thanks! |
Code:
ln -sf /path/to/theme/gtk-2.0/gtkrc ~/.gtkrc-2.0 |
I'd go with this:
Code:
gconftool-2 --set /desktop/gnome/interface/gtk_theme --type string 'Clearlooks Brave Dark' To find gconf keys for other stuff like the icon theme open gconf-editor and look under desktop > gnome > interface |
arizonagroovejet, that means i have to have GNOME installed to use gconftool...
I didn't quite understood dugan's method.. doesn't that just install the theme?? not apply it. |
I assumed you were using GNOME and that by 'load a gtk theme' you meant set it as your current theme in GNOME. Evidently I was wrong.
What do you mean by 'load a gtk theme'? I don't understand dugan's suggestion either. |
i tried ln -sf /usr/share/themes/Clearlooks/gtk-2.0/gtkrc ~/.gtkrc-2.0 it didn't apply it
|
arizonagroovejet, there are other desktop environments out there that use GTK toolkit not just GNOME... so i need something that would work for all of them..
|
So you're looking for a single command that will change the theme in any desktop environment that uses GTK? If so I think you're looking for something that doesn't exist. GNOME uses gnome-settings-daemon to change the theme currently in use. Other desktop environments will use something else.
Now I think about it I'm guessing dugan's suggestion might work if you log out and in again, but I've not tried. |
hmm... i guess... by the way, when i change the theme like you described, the gtk theme changed except for the window borders (try it). why is that and how can i change them too?
|
Quote:
It certainly does not install the theme. Quote:
|
thanks for the clarifications dugan. gtk-chtheme sounds good.
did i use that command right? Quote:
|
Code:
ln -sf /path/to/theme/gtk-2.0/gtkrc ~/.gtkrc-2.0 Code:
ln -sf /usr/share/themes/Clearlooks/gtk-2.0/gtkrc ~/.gtkrc-2. EDIT: A much more foolproof method would be to create a ~/.gtkrc-2.0 file with the following contents: Code:
include "/path/to/theme/gtk-2.0/gtkrc" |
ok, i tried doing this dugan but it didn't work... i did as you said and now my gtkrc-2.0 file contains this
Quote:
Quote:
Please try it yourself and tell me if it works for you.. What am i doing wrong? :( |
EDIT: It worked on my new Ubuntu which was just installed, i will see why it didn't work on my old ubuntu which has been used for some good time..
|
Oh i see what's happening, GNOME is forcing it's own theme on it and gtkrc-2.0 says another theme so it's like this GNOME tries to apply Ambiance and gtkrc-2.0 tries to apply Clearlooks lol...
|
All times are GMT -5. The time now is 02:15 PM. |