I know how to wake up my computer remotely via WOL magic packet. But how about to suspend or hibernate it? Well, this has something to do with the power management, doesn't it? So it would be sensible to think that we need some sort of power management utility that knows how to do that. But I don't want to install "another tool" in my system which does exactly the same thing like the other existent/installed applications do. That would be just redundant! If you have a GNOME, KDE SC or Xfce desktop then your system might have a inter-process communication (IPC) system called D-Bus which is a message bus system, a simple way for applications to talk to one another. We are going to use its UPower interface that, among others, has two methods called Suspend and Hibernate. To send a message via D-Bus interface you have to call the dbus-send command which is already installed on your system: Example:
$ dbus-send --print-reply \
--system \
--dest=org.freedesktop.UPower \
/org/freedesktop/UPower \
org.freedesktop.UPower.SuspendIf you want to hibernate your system then replace Suspend method with Hibernate. Note: D-Bus interface unveil a new world for you, the Linux user/programmer, which if you know how to manipulate it you could rule it!
Comments
No comments yet
Be the first to leave a comment.
Leave a comment