I want to suspend my computer from terminal (one obtained by CTR+ALT+F1).
If I call:
# echo -n mem > /sys/power/state
after wakeup I'm leaving an authenticated console with (possibly) root credentials open to anyone.
Is there any elegant way to suspend the computer without leaving this console open?
Background: Suspend button is not working on my XFCE desktop and because of many reasons I don`t want to fix it right now. So it is easier to just suspend from terminal.