Saturday, June 9, 2012

Change Theme Using Command Line in GNOME (Linux)

This is a list of command line to change various theme-related settings in GNOME based desktop. These include commands for GNOME 3 based desktop environments (Ubuntu Unity, GNOME 3 Shell/Classic, Cinnamon), MATE desktop, and also the old GNOME 2 desktop (are you still using it? Well, I am, occasionally :D)


In GNOME 2 (and then in MATE), all of these settings can be easily changed using build-in GUI tool called Appearance Preferences. Unfortunately in GNOME 3 we don't have such a complete tool like that. Yes, we can use tools like GNOME Tweak Tool, Ubuntu Tweak, or MyUnity, but these tools still lack ability to change some settings, one of them is color customization. Hmmm...

Not to worry, we can do juast that using these command. Of course this is not a convenient way to customize our desktop, but at least we still have a way to do that, until someone make a decent, GUI based tool.


You can run the following commands in a Terminal window, or by using Run Application utility, just press Alt+F2 on your keyboard to open it. Each command are single-line commands, meaning that you run them one at a time.


Change GTK THEME


Unity, GNOME 3 Shell/Classic, Cinnamon

gsettings set org.gnome.desktop.interface gtk-theme "CoolestThemeOnEarth"

MATE

mateconftool-2 --type=string --set /desktop/mate/interface/gtk_theme "CoolestThemeOnEarth"

GNOME 2

gconftool-2 --type=string --set /desktop/gnome/interface/gtk_theme "CoolestThemeOnEarth"

***

Change WINDOW THEME (Metacity)


Unity, GNOME 3 Classic (Metacity), GNOME 3 Shell (Metacity > Mutter)

gsettings set org.gnome.desktop.wm.preferences theme "CoolestThemeOnEarth"

Cinnamon (Metacity > Muffin)

gconftool --type=string --set /desktop/cinnamon/windows/theme "CoolestThemeOnEarth"
Note: Cinnamon must be restarted for the change to take effect.

GNOME 2 (Metacity)

gconftool-2 --type=string --set /apps/metacity/general/theme "CoolestThemeOnEarth"

MATE (Metacity > Marco)

mateconftool-2 --type=string --set /apps/marco/general/theme "CoolestThemeOnEarth"

***

Change SHELL THEME


GNOME Shell (user-theme extension must be enabled)

gsettings set org.gnome.shell.extensions.user-theme name "CoolestThemeOnEarth"

Cinnamon

gsettings set org.cinnamon.theme name "CoolestThemeOnEarth"

***

Change GTK COLOR SCHEME


Unity, GNOME 3 Shell/Classic, Cinnamon

gsettings set org.gnome.desktop.interface gtk-color-scheme "bg_color:#e9efe9;fg_color:#444444;base_color:#ffffff;text_color:#333333;selected_bg_color:#6666cc;selected_fg_color:#eeeeee;tooltip_bg_color:#222222;tooltip_fg_color:#dfcfcf;link_color:#cc0099;"
  • Reset color:
    gsettings set org.gnome.desktop.interface gtk-color-scheme ""

MATE

mateconftool-2 --type=string --set /desktop/mate/interface/gtk_color_scheme "bg_color:#e9efe9;fg_color:#444444;base_color:#ffffff;text_color:#333333;selected_bg_color:#6666cc;selected_fg_color:#eeeeee;tooltip_bg_color:#222222;tooltip_fg_color:#dfcfcf;link_color:#cc0099;"
  • Reset color:
    mateconftool-2 --type=string --set /desktop/mate/interface/gtk_color_scheme ""

GNOME 2

gconftool-2 --type=string --set /desktop/gnome/interface/gtk_color_scheme "bg_color:#e9efe9;fg_color:#444444;base_color:#ffffff;text_color:#333333;selected_bg_color:#6666cc;selected_fg_color:#eeeeee;tooltip_bg_color:#222222;tooltip_fg_color:#dfcfcf;link_color:#cc0099;"
  • Reset color:
    gconftool-2 --type=string --set /desktop/gnome/interface/gtk_color_scheme ""

This command to change color scheme would be very effective if you are using a flexible-color theme like zonColor, a new theme that I created, that you can use to mimic color-scheme of any theme, or even make your own.

***

NOTES:
This list will be updated, so stay tune! Alternatively, you can use some tools like dconf-tool or gconf-editor.

.

PS: Still, sorry for my English :)
Google+ Comments Disqus Comments
Disqus Comments Google+ Comments
comments powered by Disqus