Suspend Using Console

see also: http://wiki.ubuntuusers.de/Schlafmodi

$ sudo /etc/acpi/sleep.sh force

alternatively:

$ sudo echo mem > /sys/power/state

or as gdm does it (see /etc/gdm/gdm.conf → constant SuspendCommand):

$ sudo /usr/sbin/pm-suspend

you can run this script and therefore suspend remotely with ssh option -t to prevent echo on the terminal:

ssh philipp@lion "sudo /usr/sbin/pm-suspend"

alternatively change the settings to allow the script to be run with no password given using sudo:

sudo visudo

add the following line to /etc/sudoers:

philipp ALL = NOPASSWD: /usr/sbin/pm-suspend

another example (the above seems not to work...):

%users     ALL = NOPASSWD: ~/path/to/binary

Comments