Sunday, May 18, 2014

Using gsettings to set font preferences in my shiny Ubuntu Gnome 14.04 Desktop

Instead of using gnome-tweak-tool, this time I have used the command line utility 'gsettings' to set my font preferences in Gnome (Ubuntu Gnome - 14.04). After invoking some 'gsettings set ...' commands, I have the following:

 ubuntu-gnome@ubuntu-gnome:~$ gsettings list-recursively org.gnome.settings-daemon.plugins.xsettings   
 org.gnome.settings-daemon.plugins.xsettings disabled-gtk-modules @as []  
 org.gnome.settings-daemon.plugins.xsettings priority 0  
 org.gnome.settings-daemon.plugins.xsettings hinting 'full'  
 org.gnome.settings-daemon.plugins.xsettings overrides {'Gtk/ShellShowsAppMenu': <0>}  
 org.gnome.settings-daemon.plugins.xsettings rgba-order 'rgb'  
 org.gnome.settings-daemon.plugins.xsettings antialiasing 'rgba'  
 org.gnome.settings-daemon.plugins.xsettings active true  
 org.gnome.settings-daemon.plugins.xsettings enabled-gtk-modules @as []  

(Note the keys 'hinting', 'rgba-order' and 'antialiasing')

To know which values are valid for any key, there is the 'range' command. For example, to know what are the possible values I can use for the 'antialiasing' key, I can use the following command:

 ubuntu-gnome@ubuntu-gnome:~$ gsettings range org.gnome.settings-daemon.plugins.xsettings antialiasing  
 enum  
 'none'  
 'grayscale'  
 'rgba'  

That means I can use one of those three enum values for the 'antialiasing' key.

No comments: