7

I've got a few computers, all coming to the end of their life.

The first couple have gone and I find myself again having to re-install ubuntu on it's resurrected remains and then laboriously reconfigure everything.

So I'm writing a couple of scripts to reconfigure the thing back to how I like it... and install all the core programs I need to work.

Ideally i'd do Sudo ./install.sh walk away, make some tea and avoid the headache.

So far I've got:

# Turn on workspaces
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ hsize 2

# Turn on hide launcher
gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-hide-mode 1

Could anyone advise how I'd auto set launcher icon size to a number (probably 36 in this case) and similarly what the command would be for the auto hide launcher sensitivity.

3 Answers 3

9

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

5
  • You are a gentleman and a scholar - that works perfectly many thanks.
    – Huw
    Commented Sep 3, 2014 at 16:35
  • 2
    Bonus question for anyone around... why does this work with dconf and the others use gsettings?
    – Huw
    Commented Sep 3, 2014 at 16:36
  • I haven't been able to figure that out.
    – Ulincsys
    Commented Sep 3, 2014 at 22:45
  • 2
    This does work with gsettings too: gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ icon-size 64 note the trailing slash, which is required.
    – achiang
    Commented Dec 18, 2014 at 22:18
  • thanks, works on Ubuntu 16.04.2. Interesting enough, it doesn't change size of launcher icons when running on virtual machine (same ubuntu version)
    – mauek unak
    Commented Feb 20, 2017 at 20:40
3

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.

0

Actually, when running Ubuntu under VirtualBox, you will need to do:

gsettings set com.canonical.Unity lowgfx false

Editing the config file will only temporarily change it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .