XFCE suspend system command
Solution 1
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
Solution 2
systemctl suspend
Also works for me. As a bonus it works across xfce4 and cinnamon desktops.
Related videos on Youtube
Comments
-
Yoda over 1 year
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