Some of you are probably wondering why would you want to spend your time fiddling with default desktop environment settings customization, when you can easily customize everything to your liking inside you own user account? Most probably you’d want to do this when you’re re-mastering your favorite Linux distribution using tools like OS4 system imager (fork of the now discontinued Remastersys) or Relinux. In this article I’ll show you how to handle this task elegantly using GSettings vendor overrides.
Introduction
First some background. GSettings provides a convenient API for storing and retrieving application settings, similar to system registry inside one of the popular proprietary operating system. Applications can define key/value pairs their application is using by installing .gschema.xml files, and then use GSettings API to manipulate the values. GSettings also provides mechanisms for distribution vendors to override default key/value pairs for specific applications by using .gschema.override files.
Pick the right schema file
sudo apt-get install dconf-tools
org.gnome.desktop.interface
- font-name
- document-font-name
- monospace-font-name
org.gnome.desktop.wm.preferences
- titlebar-font
Here’s screenshot displaying one section of org.gnome.desktop.interface schema inside dconf-editor:
Create .gschema.override file
Now when we have all of the information we can use our favorite editor to create the .gschema.override file:
sudo nano /usr/share/glib-2.0/schemas/60_our-own.gschema.override
The 60 is override priority, here I usually use 60 because most Linux distribution vendors use priority of 50 or less. Now we place following inside that file:
[org.gnome.desktop.interface]font-name=’Ubuntu 12′ document-font-name=’Sans 12′ monospace-font-name=’Ubuntu Mono 14′
[org.gnome.desktop.wm.preferences] titlebar-font=’Ubuntu Bold 12′
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
After system restart desktop environment for all new users and existing users who haven’t changed desktop environment fonts will use fonts we have specified inside our .gschema.override file. This way we can easily tweak almost every aspect of our desktop environment interface, and in the end easily create our own flavor of the Linux distro using remastersys-like tools. That’s what I call flexible operating system, don’t you agree?
How I customize My Cinnamon
gsettings set org.cinnamon.desktop.background picture-uri file:///usr/share/backgrounds/myWallpaper.jpg
gsettings set org.cinnamon.desktop.background picture-options stretched
gsettings set org.cinnamon.settings-daemon.peripherals.touchpad disable-while-typing true
gsettings set org.cinnamon.settings-daemon.peripherals.touchpad motion-acceleration 2
gsettings set org.cinnamon.settings-daemon.peripherals.touchpad motion-threshold 2
gsettings set org.cinnamon.settings-daemon.peripherals.touchpad scroll-method two-finger-scrolling
gsettings set org.cinnamon.settings-daemon.peripherals.touchpad tap-to-click true
gsettings set org.cinnamon.settings-daemon.peripherals.touchpad touchpad-enabled true