LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 12-26-2009, 07:52 AM   #1
keeperofdakeys
LQ Newbie
 
Registered: Dec 2009
Location: Adelaide, Australia
Distribution: Slackware
Posts: 8

Rep: Reputation: 0
acpi hotkeys for disable mouse


hello
I recently got an Asus EEEpc 1005ha and am in the process of outfitting it with slackware 13.0. I have been trying to setup the Fn + F1-12 hotkeys, but one is not working when it should. I successfully setup the volume hotkeys, so I know that the process I am using should work. The hotkey is to disable the mouse. I stumbled upon acpi_listener, so I was able to find the right code for the hotkey and I have a shell script that does disable the mouse when run. The problem is that the event script doesn't seem to activate the action script.

These are the event and action script that should work:
/etc/acpi/events/disable_mouse:
Code:
event=hotkey ATKD 00000037
action=/etc/acpi/actions/disable_mouse.sh
/etc/acpi/actions/disable_mouse.sh
Code:
#!/bin/sh
# Toggle tochpad disabled

GET_STATE="`synclient -l | grep Guest`"
OFF_STATE="    GuestMouseOff           = 1"
ON_STATE="    GuestMouseOff           = 0"

if [ "$GET_STATE" = "$ON_STATE" ]
then
synclient guestmouseoff=1
else
synclient guestmouseoff=0
fi
When run by itself, the script is succesful in stopping the mouse. The output of acpi_listen for the button is: hotkey ATKD 00000037.

The scripts that do work are:
/etc/acpi/events/volume_up:
Code:
event=hotkey ATKD 00000015
action=/etc/acpi/actions/volume_up.sh
/etc/acpi/actions/volume_up.sh:
Code:
#!/bin/sh
amixer -q set Master 5%+
From the scripts I can't see what I have done wrong, as the non-working script seems identical to the working script.
Thanks in advance.

Last edited by keeperofdakeys; 12-26-2009 at 03:38 PM.
 
Old 01-26-2010, 03:29 AM   #2
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
Maybe some other action caches it first because it has priority.
 
Old 01-26-2010, 03:47 PM   #3
eternauta2001
LQ Newbie
 
Registered: Dec 2008
Distribution: Slackware Linux 13.1
Posts: 18

Rep: Reputation: 7
Hi!

Try adding the following at the beginning of your script:

Code:
logger "ACPI: /etc/acpi/actions/disable_mouse.sh
Press the hotkey and then check the log file /var/log/messages to see if they really execute the script.

I have the following script and it works:

Code:
#!/bin/sh
# Toggle touchpad enable/disabled

STATE="$(synclient -l 2>/dev/null | sed -e '/TouchpadOff/! d; s/[^0-9]\+//g')"
synclient TouchpadOff=$((1-STATE)) 2>/dev/null
 
Old 01-26-2010, 07:55 PM   #4
keeperofdakeys
LQ Newbie
 
Registered: Dec 2009
Location: Adelaide, Australia
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: 0
I actually managed to fix this a while ago and forgot about this thread .
In the end I had to restart acpid when I started X, and give it no password sudo permission in sudoers. This is probably due to the fact that I start in text mode, so the X server isn't started before acpid, and synclient depends on shmconfig, which is set by hal for X.
 
Old 01-27-2010, 10:23 AM   #5
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
Excellent. Can you then please mark this thread as SOLVED. Use instruction in my signature.
 
  


Reply

Tags
acpid, touchpad


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ACPI and toshiba hotkeys bourne Linux - Laptop and Netbook 4 11-04-2008 12:53 PM
Mouse USB + hotkeys on my NotePad dark_access Linux - Hardware 2 01-10-2007 08:16 AM
Disable ACPI on Suse 9.3 fireedo Suse/Novell 2 06-15-2005 10:10 AM
can we disable acpi??????????? luvsat Linux From Scratch 3 01-07-2005 02:10 AM
How do I DISABLE OR REMOVE Linux Hotkeys ???? TauiL| Maya |BR Linux - Newbie 1 02-15-2004 11:04 PM


All times are GMT -5. The time now is 08:50 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration