Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=3782417
By: jmfv

Hello

My computer is an ASUS A3500N laptop, running Debian Sarge Testing, and I'm
trying to implement some missing hotkeys support, such as volume up/down and
the Web Browser, Mail Client, etc.

I've looked into the /usr/share/doc/powersave/contrib files and found very nice
looking examples 'acpi_hotkeys_ASUS_M6842NW' and
'acpi_hotkeys_ASUS_L2400D'. It was fairly easy to implement support for volume
up/down/mute hotkey by putting a script in /usr/lib/powersave/scripts that tests
the hotkey code and runs a command accordingly.

The only thing that is failing now is the Web Browser and Mail Client like keys,
where I have to launch an X application, something like

if [ $hotkey = 00000050 ];
then
run_on_xserver "/usr/bin/thunderbird"
fi

where run_on_xserver is defined as

run_on_xserver() {
  get_x_user
  su $X_USER -c "DISPLAY=$DISP $1"
}

Unfortunately, the get_x_user always detects that the "x_user" username is 
"root",
although I'm logged in KDE as "debian_user". That is why the run_on_xserver
fails. If I change

  su $X_USER -c "DISPLAY=$DISP $1"

to

  su debian_user -c "DISPLAY=$DISP $1"

the run_on_xserver works. But leaving the hotkey_handler script this way isn't
very elegant, is it? :D

Help appreciated! Thank you!



______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=424162
_______________________________________________
powersave-devel mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-devel

Reply via email to