Thursday, March 5, 2009

Desktop lock on laptop lid close in Ubuntu 8.10

From the “power management” configuration window of Ubuntu 8.10 it is not possible tell Ubuntu to lock the desktop whenever I close the lid of my laptop.

However, it is possible to obtain this behaviour by chosing the “blank screen” option of the “power management” configuration window and then using the gconf-editor utility.

  • Hit Alt-F2 while on the Ubuntu desktop.
  • Type “gconf-editor” in the text field of the “run application” window that has just popped-up, and click “run”.
  • In the “configuration editor” window browse the tree on the left, following the path “apps”->”gnome-power-management”->”lock”.
  • Add the check sign (set to true) to the “blanck_screen” option.

Alternatively you can check the “use_screensaver_settings” option, making the lock option dependent on how you set the “lock screen when screensaver is active” option in the screensaver configuration window.