You are not logged in.

#1 2005-07-04 18:16:16

giorgosc61
Member
From: Athens, Greece
Registered: 2005-05-27
Posts: 140

[SOLVED] Power down when i press power button

Hello.

I would like while running on kde to press the power button on my computer case and the computer to shutdown.
In some distros eg Mepis this happened when I pressed the power button, but in Arch Linux nothing happens.

Can anyone tell me how to do it in Arch Linux?

Thank you in advance.


Powered by Arch Linux

Offline

#2 2005-07-04 18:46:41

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 460

Re: [SOLVED] Power down when i press power button

nothing happens

If you hold your power button in for a few seconds any PC will shutdown.
Not advisable though.
i havent used mepis to try this method of shutdown, and wonder how it intercepts a hardware reset. Do you mean it shuts down smoothly, like closing all programs ? or that it just switches off ?

Proper way in Arch is to use whichever desktop you are using, and use the shutdown button. You may have to explicitly allow this as ordinary users may not have the correct privileges.

Covered elsewhere in wiki i think

Offline

#3 2005-07-04 19:04:24

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,017

Re: [SOLVED] Power down when i press power button

Install acpid package, add acpid to the DAEMONS array in rc.conf and create a file in /etc/acpi/events/ with following content:

# /etc/acpi/events/power
# This is called when the user presses the power button

event=button/power (PWR.|PBTN)
action=/sbin/poweroff

Basically it should work then. If it were used only to shutdown from within KDE, it would be probably cleaner to shutdown it using the KDE shutdown command, but stab me if I know how to attain that ;-)

-edit-
I guess I got the proper DCOP call. Try setting '/opt/kde/bin/dcop --all-users --all-sessions ksmserver ksmserver logout 0 2 0' as an action.

Offline

#4 2005-07-05 13:47:48

giorgosc61
Member
From: Athens, Greece
Registered: 2005-05-27
Posts: 140

Re: [SOLVED] Power down when i press power button

Thank you for your replies.

lucke it worked.

Thank your very much.


Powered by Arch Linux

Offline

#5 2005-07-06 07:58:36

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 460

Re: [SOLVED] Power down when i press power button

thanks Lucke, i learned something here too smile
still frightens me hitting the power button on a running pc ..... unless of course its a M$ bluescreen.

:shock:

Offline

#6 2005-07-06 09:39:07

Michel
Member
From: Belgium
Registered: 2004-07-31
Posts: 286

Re: [SOLVED] Power down when i press power button

Heya,

if you use it only for kde ... you can use dcop. If you want a list of available dcop-commands, just type "dcop". Say the command gives "kdesktop" as an entry. To know all commands associated with kdesktop, type "dcop kdesktop", ...

For shutting down (and saving your session maybe):

http://lists.debian.org/debian-kde/2003 … 00031.html

IF you want to see the available functions type:

dcop ksmserver ksmserver

greetings,

Michel

Offline

Board footer

Powered by FluxBB