The Linux Page

When I lose the Gnome settings...

Now a day, I very often lose my Gnome settings. Most of it, I couldn't care less, but a few things are very important, especially the way my windows work: I HATE it when a window comes to the front when clicked on. It is totally crazy to work that way. Gnome supports the normal X11 way but they don't use that as the default, which is sad.

So I wrote a little script in order to be able to reset my settings without having to open CCSM (the Gnome preference tool) although if you have a hard time finding what you are looking for, CCSM can be useful!

There is my current script that fixes my hotkeys to switch between the first 3 workspaces, to lower or raise a windo, and very important: the focus-mode is set to sloppy (strange name!) and auto-raise to false (that too, I don't get it.) and the raise-on-click is set to false otherwise I just go crazy.

#!/bin/sh
# Reset hotkeys to what we MUST HAVE.
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Alt>F1']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<Alt>F2']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['<Alt>F3']"
gsettings set org.gnome.desktop.wm.keybindings close "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings begin-move "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings begin-resize "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings cycle-group "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings lower "['<Alt>F6']"
gsettings set org.gnome.desktop.wm.keybindings raise "['<Alt>F7']"
gsettings set org.gnome.desktop.wm.preferences auto-raise "false"
gsettings set org.gnome.desktop.wm.preferences focus-mode "sloppy"
gsettings set org.gnome.desktop.wm.preferences raise-on-click "false"
# Not too sure why I use 2x2 right now, but I had problems with 4x1
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ hsize 2
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ vsize 2

The last two lines I generally do not need because the number of desktop is not usually getting lost, although they had a bug under 13.10 that would not properly read the number of desktops and thus resetting the width and height to 1x#.

Note: to find all keys available in your current settings, use the 'list-recursively' command:

gsettings list-recursively | less

Updates

The compiz data is saved in ~/.config/dconf/user which unfortunately is a binary file. A text editor should still show you some information, otherwise try using strings as in:

strings ~/.config/dconf/user