Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 3 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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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