LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 11-03-2008, 02:40 PM   #1
Lord Estraven
Member
 
Registered: Aug 2004
Distribution: Pardus
Posts: 53

Rep: Reputation: 15
HAL suspend from the command line


I've been looking everywhere for a method of suspending/hibernating from the command line via HAL, and I've yet to find one that works... The closest thing I've found is this:

Code:
dbus-send --session --dest=org.gnome.PowerManager --type=method_call --print-reply --reply-timeout=2000 /org/gnome/PowerManager org.gnome.PowerManager.Hibernate
But it requires gnome-power-manager. How do I make HAL invoke its suspend scripts from the command line?

(Yes, I know I can use sudo for this, but that is IMHO hackish and I would really prefer not to.)
 
Old 11-03-2008, 02:57 PM   #2
Lord Estraven
Member
 
Registered: Aug 2004
Distribution: Pardus
Posts: 53

Original Poster
Rep: Reputation: 15
N/M, I found it! Use this:

Code:
dbus-send --system --print-reply --dest=org.freedesktop.Hal \
 /org/freedesktop/Hal/devices/computer \
 org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate
for hibernate, and this:

Code:
dbus-send --system --print-reply --dest=org.freedesktop.Hal \
 /org/freedesktop/Hal/devices/computer \
 org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate \
 int32:0
for suspend.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
xine command line? or some other command line only engine? lumix Linux - Software 2 08-10-2007 10:46 AM
HAL at command line gibson79 Slackware 2 07-03-2007 05:36 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
51 characters only in the 1st Line of command line eggCover Linux - General 2 07-29-2004 01:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 02:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration