Since it's more than 40 minutes since you posted, no
But seriously - a look at man at suggests the command atrm 1 if 1 is the job number (you can check with atq).
You'll need sudo if your user does not have rights to suspend (see a few posts back).
Since it's more than 40 minutes since you posted, no
But seriously - a look at man at suggests the command atrm 1 if 1 is the job number (you can check with atq).
You'll need sudo if your user does not have rights to suspend (see a few posts back).
Thanks, I was looking for something like this. Hopefully, it still works with natty 11.04!
Edit: NVM, reading the log files I found my hard drive disk does not communicate well with natty. It does not power down when triggered in linux. Since I am loading linux from a USB, I just removed the internal HD and everything works fine now.
Last edited by haudace; June 1st, 2011 at 08:07 PM.
Sadly none of these solutions work with 11.10. PMI produces "Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files"
As someone mentioned above, this seems to work in Oneiric:
Code:dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
Last edited by landtuna; October 27th, 2011 at 04:55 PM. Reason: --print-reply makes it work without sudo
Guys you need to install the package "hal" . In short :
1 Get powermanager-interface
2 Get hal
3 Type "pmi action suspend"
That worked for me on 11.10 .
This was successfull on LUbuntu 12.04 Precise with OpenBox session. Without sudo and root privileges. LUbuntu is derivative with LXDE instead of heavy Unity, because this is the only declared distinction( https://wiki.ubuntu.com/Lubuntu ), the trick must be workable on Ubuntu and other official derivatives.
Usually in LUbuntu you also may use lxsession-logout, but it is a GUI solution (can not be used in autonomous script or else), and you can not use lxsession-logout on LUbuntu's Openbox session without some working on additional lxsession launch. But "dbus-send..." will do the job out of the box.
As posted at
http://askubuntu.com/questions/93542...pend-hibernate
you may find other targets:
- org.freedesktop.consolekit.system.stop
- org.freedesktop.consolekit.system.restart
- org.freedesktop.upower.suspend
- org.freedesktop.upower.hibernate
You may use:
for reboot
for shutdownCode:dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
for hibernateCode:dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
Suspend is described above:Code:dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.HibernateThis also do not need system modifications or root access.Code:dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
P.S. 2All: Hey! Ordinary user do not have sudo access or root privileges!!! Editing of /etc/sudoers may lead to possible breaks in security system (remember possible vulnerability of any software). Using of "sudo suspend-command" is an ugly workaround instead of real solution.
Last edited by Artif; May 2nd, 2012 at 10:26 AM.
How do you send a SUSPEND command to another Linux machine on your network?
Something equivalent to Microsoft/Sysinternals PsTools psshutdown.exe utility.
would be easy if you just ssh'd into it
Bookmarks