Saturday, July 18, 2009

Set super+l shortcut key for locking screen in gnome

The default shortcut keys to lock screen in gnome is <ctrl><alt>l (it is small caps 'L'). I do not like that shortcut and prefer to use the combination of "super key" and "l", which actually defined as <Mod4>l. The keybinding GUI setting somehow does not accept any combination of super key with other keys. So, to be able to do that, you need to use gconf-editor.
Perform the following:

run gconf-editor,
option 1, from CLI:
$ gconf-editor

option 2, from GUI:
press <Alt>F2 to get the 'run application' dialog and type in gconf-editor and click 'run'

In gconf-editor window, go to the following key location, by expanding the keys tree:

then, double click 'screensaver' key and change the value to: <Mod4>l

and you are done. Test it by pressing super key and l.

There is also feature to search the key name and value, by pressing <Ctrl>f in gconf-editor. Actually, I found the correct location of the 'screensaver' key by searching it.

No comments:

Post a Comment