When I click on the exit icon there is a suspend option. When I click this the computer suspends, which works really well. I want to create a custom key mapping on the suspend command XK86Sleep (ThinkPad sleep button) which I can create using the keyboard settings.

I have seen pm-suspend from numerous sources, but this requires root and so does not work. What command does XFCE use when pressing the Suspend option through the UI as described above?

XFCE 4.8, Ubuntu 12.04, ThinkPad T60

up vote 5 down vote accepted

Try using this for the command

xfce4-session-logout -s

man xfce4-session-logout

The xfce4-session-logout command allows you to programmatically logout from your Xfce session. It requests the session manager to display the logout confirmation screen, or, if given one of the command-line options below, causes the session manager to take the requested action immediately.

--suspend Suspend without displaying the logout dialog

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.