I'm trying to write a script that can be invoked by the "sleep" button on my keyboard that will, in turn, log me out and THEN suspend the computer to RAM.
Here is what I've got so far:
#!/bin/sh xfce4-session-logout --logout /usr/sbin/pm-suspend
I get to the logout screen, but I then need to suspend manually, as the script does not do it.
In case someone is trying to reference this problem, I came up with a sort of primitive (but effective) solution here: