2

I recently installed Ubuntu 13.04.

I changed my shortcut for "Lock screen" to the sleep button on my keyboard.

But instead of just locking the screen it puts my computer into hibernation/suspend mode, which is kind of annoying. I can't find where the hibernation mode is bound to the sleep button.

I already tried gsettings set org.gnome.settings-daemon.plugins.power button-sleep 'nothing' (as mentioned here) but it doesn't affect the sleep button and it still goes into hibernation/suspend.

Can you help me?

1 Answer 1

1

I had to disable suspend button (button-suspend):

gsettings set org.gnome.settings-daemon.plugins.power button-suspend 'nothing'

But then the sleep/suspend button did nothing at all, even with the system shortcut, so I had to utilize the CompizConfig Settings Manager: Commands > Enable commands.

I added following for command line 0: gnome-screensaver-command -l. Then I switched to the tab "Key Bindings" and grabbed my key for command 0. (It is set to XF86Sleep now).

Everything works as expected now.

1
  • 1
    Everything worked for me in 14.04 except I can't get regular XF86Sleep to bind (even after changing the config setting to 'nothing'). However I was able to bind Alt+XF86Sleep. Also, I wanted it to lock the screen and turn off the monitor, so I used gnome-screensaver-command -l; xset dpms force off.
    – Tobias J
    Apr 18, 2014 at 3:14

You must log in to answer this question.

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