You are not logged in.
Hello there
I'm using acpid, and I want to know what to put in my /etc/acpi/handler.sh if I want to shutdown -h now the laptop when power button is pressed. I want to do this as user, not as root.
I think I must permit users to use shutdown command, but don't know how to do that (User already belongs to Power group)
Thanks in advance
Offline
# gpasswd -a username power
That should be all you need to allow users to shutdown... at least for GNOME and KDE.
Also, depending on your DE, you can easily configure your notebook to poweroff when then power button is pushed. For example, GNOME users can just go to:
System -> Preferences -> Power Management -> General -> Buttons -> Shutdown
Last edited by thayer.w (2007-07-06 17:28:51)
thayer williams ~ cinderwick.ca
Offline
In fact I'm using Fluxbox. And I start it with startx command. When I close it, X closes. I don't want to be able to shutdown the laptop with Fluxbox running. I think it's more secure to close X session, then to shutdown..
And I really want to use the power button (I used to do that with Gentoo and acpid)
Offline
Ok.. i'm going to try acer_acpi...
Offline
Ok I can't use acer_acpi since it conflicts with acerhk (and I absolutely need this to make my multimedia work)
So, I saw there were several acpi* packages, and I don't know which one to use, when I press the power button as user, it does -> sudo halt
acpi ? acpid ? acpi-tools ?
Offline
Check this wiki page : http://wiki.archlinux.org/index.php/Shu … wer_button
If you want to disable this function when running a wm/de , you'll have to write your own action script to take care of this.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I use xbindkeys with the following action set up:
# Stand-by/Shut Down key (Sleep)
"/opt/kde/bin/dcop --all-users --all-sessions ksmserver ksmserver logout 0 2 0"
m:0x0 + c:223
When I press the button it shuts down the system at once. Clean and effective.
BTW, m:0x0 + c:223 makes reference to the (Sleep) button in my machine. In your machine the code may be different and you should use the xbindkeys tools to find the correct code for you computer.
Hope this helps.
R.
Offline
Ok thanks for your answers
LoneWolf: I didn't see this Wiki page ! I will try this
ralvez: I changed Fluxbox (when I wrote this topic) to Openbox. Anyway, I want to be able to shutdown the computer when X is closed (under console) My power button keycode is 222 according xev... I will see how I can try to combine the keycode with /etc/acpi/events/power and I give a feedback as soon as I managed ...
Offline