30

Is there a way to set active icon theme and GTK theme from a terminal?

I would like to write a script that installs and sets everything up the way i like it on a fresh install.

Kempe
  • 2,745

1 Answers1

38

Should work with gsettings try these commands...

Change GTK-Theme:

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

Change Icon-Theme:

gsettings set org.gnome.desktop.interface icon-theme 'MyIconTheme'

Change Window-Theme:

gsettings set org.gnome.desktop.wm.preferences theme "CoolestThemeOnEarth"
makim
  • 717
  • Aah should have thought about that, thank you. btw do you know the difference between gconftool-2 and gsettings? – Kempe Mar 02 '13 at 07:59
  • 5
    You´re welcome :-) GConf is obsolete. It is the older GNOME 2.x configuration API and system, and has been replaced by DConf/GSettings in newer versions. However, some applications still use it.

    GSettings is a GLib implementation of DConf, which stores its data in a binary database.

    The gsettings command line tool is simply a tool to access or modify settings via the GSettings API, in the same way that the older gconftool command line tool is for GConf.

    – makim Mar 02 '13 at 09:33
  • Howto get the options available from each property? – momo2047 Apr 14 '17 at 16:04
  • Does this work on other desktop enviromnents? – person the human Jan 10 '22 at 00:02
  • Some applications still use older GConf so this answer is incomplete, because these older applications are not affected by gsettings commands at all. If you want to post a complete answer, you would have to add gconftool-2 alternatives for your gsettings command? – 71GA Mar 16 '22 at 11:23