You are not logged in.

#1 2007-07-06 16:57:47

master-inferno
Member
From: France
Registered: 2007-07-06
Posts: 17

Acer Aspire 5683 WLMi - acpid & power button

Hello there smile

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 smile

Offline

#2 2007-07-06 17:28:36

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Acer Aspire 5683 WLMi - acpid & power button

# 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

#3 2007-07-06 17:51:53

master-inferno
Member
From: France
Registered: 2007-07-06
Posts: 17

Re: Acer Aspire 5683 WLMi - acpid & power button

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

#4 2007-07-07 16:43:51

master-inferno
Member
From: France
Registered: 2007-07-06
Posts: 17

Re: Acer Aspire 5683 WLMi - acpid & power button

Ok.. i'm going to try acer_acpi... sad

Offline

#5 2007-07-15 08:36:52

master-inferno
Member
From: France
Registered: 2007-07-06
Posts: 17

Re: Acer Aspire 5683 WLMi - acpid & power button

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

#6 2007-07-15 10:53:17

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,156

Re: Acer Aspire 5683 WLMi - acpid & power button

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.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#7 2007-07-15 13:37:19

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,546
Website

Re: Acer Aspire 5683 WLMi - acpid & power button

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

#8 2007-07-15 15:30:26

master-inferno
Member
From: France
Registered: 2007-07-06
Posts: 17

Re: Acer Aspire 5683 WLMi - acpid & power button

Ok thanks for your answers smile

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

Board footer

Powered by FluxBB