2

I'm creating a small script to setup the installation with my preferences and I'd like to know how can I change desktop appearance settings from the terminal.

Things like:

  • Set the default app to show videos
  • Change touchpad preferences
  • Add custom keyboard shortcuts
  • Change the panel location ... and things like that?

I believe all this sort of configuration is stored in some files somewhere. Is there a way I can change this sort of thing from the terminal? Can you show me a resource where I can learn more about it?

  • You can access most of these via the gsettings command. Install dconf-editor, use it to browse around, then you can apply the changes in a script via gsettings. – muru Mar 10 '15 at 6:41
4

Most of these settings are stored in the dconf database.

I'd suggest to monitor the dconf change using the donf watch / command and change a desktop setting using the GUI.

So first open a terminal and start the dconf monitoring and open the system settings->Appearance menu :

enter image description here

On close, you can see the above settings stored in the database.

Now to set a value from your installation script you can use for example:

dconf write /org/compiz/profiles/unity/plugins/unityshell/icon-size 32

to set the launcher icon size.

Look at the dconf and gsettings commands man pages, you can set most of your desktop settings by using this method.

  • And I learned something too today! (Upvoted!) – Fabby Mar 12 '15 at 23:39
  • 1
    @Fabby I remember some of your posts where you also teach someone how to fish ;) – Sylvain Pineau Mar 12 '15 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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