LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (http://www.linuxquestions.org/questions/mandriva-30/)
-   -   ACPI: shutdown computer by pushing power button... (http://www.linuxquestions.org/questions/mandriva-30/acpi-shutdown-computer-by-pushing-power-button-125234/)

elluva 12-12-2003 10:21 AM

ACPI: shutdown computer by pushing power button...
 
Ok, I know this is lazy, but still... I would like to shutdown my computer by pushing the power button. Is this possible on Mandrake 9.1? If yes... how?

greetz 'n tnx,
elluva

jkobrien 12-12-2003 11:04 AM

You mean right in the middle of a session? Disks mounted, jobs running, apps open?

No.

You could try to set up an icon on your desktop that was a link to /sbin/poweroff, but don't blame me if that spreadsheet you spent all day working on gets lost!

John

michaelk 12-12-2003 12:21 PM

On some computers, I think this is controlled by the BIOS holding down the power switch for 4 seconds will turn the computer off instantly (just kidding of course)

You can set the properties of Ctrl-Alt-Del to shutdown the computer in the /etc/inittab file. It might be possible to write an app to with a BIOS call to detect when the power switch is pressed.

jolphil 12-13-2003 08:42 AM

Try this
 
Hi,
First I think you have to have the acpi packages installed..Then go to boot configuration
either lilo or grub and enable acpi
Good Luck,
JP

Edit:: sorry,I misunderstood..Not a clue here..

elluva 12-14-2003 03:01 PM

no I mean I have a PC without keyboard or mouse running some servers. I just want to push the power button, else I have to log in as root and run halt.

zib 12-14-2003 05:34 PM

You might wanna try the following:

http://www.mjmwired.net/resources/redhat8-acpi.html

Seems to be what you're looking for.
Different distro, but that shouldn't matter.


/j.

dukeinlondon 12-15-2003 03:18 AM

apm should be able to do the same no ? Knoppix has detected than my mobo is apm able so I was going to go down that route ... Any idea anyone ?

burnpile 12-15-2003 03:30 AM

Quote:

Originally posted by jkobrien
You mean right in the middle of a session? Disks mounted, jobs running, apps open?

No.

You could try to set up an icon on your desktop that was a link to /sbin/poweroff, but don't blame me if that spreadsheet you spent all day working on gets lost!

John

Actually you can do this . http://swsusp.sourceforge.net/

elluva 12-15-2003 03:44 AM

APM is able todo that as well, I don't need an suspend mode. What I need is a replacement to running 'halt', but by using the power button instead of the keyboard.

burnpile 12-15-2003 03:53 AM

Quote:

Originally posted by elluva
APM is able todo that as well, I don't need an suspend mode. What I need is a replacement to running 'halt', but by using the power button instead of the keyboard.
Try this http://sourceforge.net/projects/acpid/
it handles events written to /proc/acpi/ and allows you to pass arguments and commands

elluva 12-15-2003 03:57 AM

tnx, I think this will end my quest.

Greetingz,
elluva


All times are GMT -5. The time now is 11:35 PM.