Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

It's a little difficult to find a good title for this... =/

Using dconf, I was able to edit the "gtk-color-scheme" in org -> gnome -> desktop -> interface. Using this, I was able to edit the parameters for the theme in a way that suited me. Here they are, for reference:

bg_color:#3E3D39;selected_bg_color:#3546e9;base_color:#2F2828;text_color:#ffffff;fg_color:#ffffff;selected_fg_color:#ffffff;link_color:#0082FF;

I copied over my Radiance theme from /usr/share/themes and copied it to my ~/.themes directory, and edited the "gtkrc" file. However, the colors did not change properly. How exactly can I edit my "gtkrc" file properly?

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Locate the proper lines in the gtkrc file, such as bg_color,etc.

Then just change the hex values (use gedit's search so you find it) to the ones you used, save and reload the Theme.

Same goes for GTK 3, edit the hex values in the file gtk.css

share|improve this answer
    
I tried that, and it changed nothing to what I had in mind. Rather, it almost emulated the "Radiance" theme color scheme whenever I applied the theme. –  Ryan McClure Jul 31 '12 at 4:00
    
Check the file settings.ini. –  Uri Herrera Jul 31 '12 at 4:02
    
I'm using this theme for Unity--I probably should have brought that up. So, I edit the GTK-3.0 rather than the GTK-2.0? –  Ryan McClure Jul 31 '12 at 4:10
    
The file settings.ini located in the gtk-3 folder of the Radiance theme has this text: gtk-color-schema which I guess is what dconf changes.I'd just edit the gtk.css file directly instead of doing it through dconf. I have changed the settings.ini file before but never noticed anything changing but I don't use Unity nor Gnome Shell so the changes might not affect my desktop environment. –  Uri Herrera Jul 31 '12 at 4:21
    
Editting that changed the theme for MOST applications, I'm a little confused as to why it didn't edit Nautilus or some other applications. –  Ryan McClure Jul 31 '12 at 4:24
Where to get GTK themes
You can get GTK themes from, for example, xfce-look.org gnome-look.org deviantart.com
How do I install these themes?
You only need to untar those themes under ~/.themes, so first:
mkdir ~/.themes
and then:
cd ~/.themes
tar -zxvf theme-name-here.tar.gz      or
tar -jxvf theme-name-here.tar.bz2
Make sure you check the readme for what engines the theme needs. You can most likely install them through your package manager, like:
apt-get install gtk2-engines-pixbuf    or
apt-get install gtk2-engines-*         or
emerge gtk2-engines-pixbuf
You should get the idea.
And to use them?
GTK2

Get gtk-theme-switch (note that there is also a version for GTK2) or gtk-chtheme. Then just fire 'em up and you should see a nice list of all styles. Just select the one you want to use and click Apply. You can also use LXAppearance to change the gtk-themes.

This shows you how to edit GTK settings without any extra application installed.
Install the GTK theme as shown above (extract theme to ~/.themes and icon set to ~/.icons). 
Create or edit the ~/.gtkrc-2.0 file. In that file input parameters such as the following:
#sets the font
 gtk-font-name = "sans 8" 

#sets the theme
 gtk-theme-name = "Clearlooks Crystal 1.1" 

#sets the icon theme
 gtk-icon-theme-name = "CrystalClear-GNOME-1.0.0" 

#shows only icons in the toolbar
 gtk-toolbar-style = GTK_TOOLBAR_ICONS 

#shows small icons in the toolbar
 gtk-toolbar-icon-size = GTK_ICON_SIZE_SMALL_TOOLBAR    

#sets the background color in Rox back to white because some GTK themes set it to light gray
 style "rox" = "default"
 {
   bg[NORMAL] = "#ffffff"
   bg[ACTIVE] = "#ffffff"
 }
 widget_class "*Collection*" style "rox"
Resources: http://www.gtk.org/api/2.6/gtk/GtkSettings.html

You can also use a different GTK theme, icon theme and fonts for specific GTK applications. If you just want to change the GTK theme, run your application with the following command:
GTK2_RC_FILES=/path/to/your/theme/gtkrc your_application
If you like to set a custom icon theme and font, create an empty file wherever you find convenient and call it whatever you want (for example, ~/.themes/custom.gtkrc). Then fill it with your different settings:
gtk-font-name = "sans 7" 

gtk-theme-name = "niroki" 

gtk-icon-theme-name = "SimplyGrey"
Now run the application with the following command:
GTK2_RC_FILES=/path/to/your/custom.gtkrc your_application
Add the command in your menu or launcher and enjoy.
GTK3

To use GTK3 themes, edit (or create) the ~/.config/gtk-3.0/settings.ini file. Specify the theme you want with the gtk-theme-name parameter. For example, if you want to use the Adwaita theme, your settings.ini file should looks like :
[settings]
gtk-theme-name = mindaryan
That's it.

i hope it may helps you i m sorry my friend i try to help ........

share|improve this answer

Do not try to change themes manually or use third party software. If you have done so unintentionally, then you should reinstall the whole operating system for better performance.

share|improve this answer
1  
You just made absolutely no sense. –  Uri Herrera Jul 31 '12 at 4:53
    
Most of the time, it's not too hard to change the theme back or removed whatever software you've installed. If you've been infected with malware, then reinstalling from scratch is a very sound approach. But most of the time, if you've hurt your system's performance and have a good idea of what changes you made, you can just undo them. –  Eliah Kagan Jul 31 '12 at 16:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.