niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Linux » Distributions » Debian
bind keyboard POWER button to start some program
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
John O'Hagan
*nix forums addict


Joined: 20 Apr 2005
Posts: 55

PostPosted: Fri Jul 21, 2006 9:50 am    Post subject: Re: bind keyboard POWER button to start some program Reply with quote

On Friday 21 July 2006 15:58, Vladi Lemurov wrote:
Quote:
Hello!
How can one bind a keyboard key (in my case I would like to bind
keyboard POWER button to /etc/init.d/poweroff script) or key sequence
(i.e. ctrl + f1)
to a script launch or something. For example one pushes keyboard POWER
BUTTON and the script /etc/init.d/poweroff is being started.

[...]

If you use ACPI, you can create /etc/acpi/events/powerbtn containing:

event=button[ /]power
action=/etc/acpi/powerbtn.sh

where powerbtn.sh is the shutdown script that comes with acpid.

Any ACPI event can be used to trigger any command in this way, see man acpid.

HTH,

John


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Back to top
Vladi Lemurov
*nix forums beginner


Joined: 02 Jun 2006
Posts: 5

PostPosted: Fri Jul 21, 2006 6:00 am    Post subject: bind keyboard POWER button to start some program Reply with quote

Hello!
How can one bind a keyboard key (in my case I would like to bind
keyboard POWER button to /etc/init.d/poweroff script) or key sequence
(i.e. ctrl + f1)
to a script launch or something. For example one pushes keyboard POWER
BUTTON and the script /etc/init.d/poweroff is being started.
I need that working in terminal, don't need in X. I found hotkeys
package but this one requires X11. Thanks in advance.
Vladi.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Thu Dec 04, 2008 7:02 am | All times are GMT
navigation Forum index » *nix » Linux » Distributions » Debian
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Can any body guide me a for a good tutorial for BIND (DNS) SHERDIL networking 4 Sat Aug 12, 2006 9:40 am
No new posts can u solve this program :P bawen C++ 0 Mon Jul 24, 2006 6:26 pm
No new posts Need Help with Program in Perl on a Netware Server fhadzocos@gmail.com Perl 3 Fri Jul 21, 2006 1:57 pm
No new posts Recommend an email program for the debian-user-digest? DJ Hackenbruch Debian 5 Fri Jul 21, 2006 3:20 am
No new posts setting serial start value Greg Philpott PostgreSQL 4 Fri Jul 21, 2006 1:32 am

Online Advertising | Credit Check | Find a Better Job | Web Development | Loans
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1229s ][ Queries: 20 (0.0536s) ][ GZIP on - Debug on ]