Unity - 14.04 - Set Launcher Icon Size - via command line

Solution 1:

I was able to do this using dconf e.g. to set the launcher icon size to 64 pixels

Code:

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

To reset it to the default value, you can use

Code:

dconf reset /org/compiz/profiles/unity/plugins/unityshell/icon-size

The dconf command line utility is not installed by default - you need to install the dconf-tools package. Usually there is an equivalent command via gsettings however in this case it appears the required schema definition does not exist.

Source : http://ubuntuforums.org/showthread.php?t=2195187

Solution 2:

Actually, if you want to copy most/all settings for all gnome-based apps (like gedit, launchers, etc., Unity included) from one account to another, you can use dconf dump / > mysettings.ini and on the target account: dconf load / < mysettings.ini.

In addition, you could manually review all the setting in mysettings.ini and adapt them as needed (you'll find there the icon-size and everything else related to Unity).

If you can't identify a particular setting by looking through the dump, you could find it by first doing a dump, then changing the setting via the standard UI, then comparing the original dump with a new one, like this:

dconf dump / > ~/tmp.dump

change a setting via the UI

diff -B5 <(dconf dump /) ~/tmp.dump

(-B5 is to additionally get 5 lines before the match, for more context -OR- use dconf watch /)

The settings that are dumped with dconf dump / are the values that differ from the defaults, i.e. you won't see there settings that currently have their default values. For a complete list of all available settings with rather complete explanations, possible ranges and default values check the files in /usr/share/glib-2.0/schemas/. You'll see there 10_xxx.override files, this is the preferred way to override the settings globally.

As to the comment by @mauek-unak, compiz settings (like the icon-size) were not working under a VM because the default compiz profile under low graphics is unity-lowgfx, but the setting modified by gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/uni‌​tyshell/ icon-size 64 is for the unity profile. The strange thing is that even with dconf dump/load the setting of the current profile gsettings get org.compiz current-profile is not having effect on the actual compiz profile.

When lowgfx is in play, ~/.config/compiz-1/compizconfig/config will have some settings and you should change it with something like:

sed -i '/profile = / s/-lowgfx//g' ~/.config/compiz-1/compizconfig/config

The change is applied immediately.