You are not logged in.
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
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
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
Thank you for your replies.
lucke it worked.
Thank your very much.
Powered by Arch Linux
Offline
thanks Lucke, i learned something here too
still frightens me hitting the power button on a running pc ..... unless of course its a M$ bluescreen.
:shock:
Offline
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