FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-25-2008, 03:58 PM
"Jabka Atu"
 
Default How can to start hotkeys ?

Good day,...

I'm using acerhk to get the special key codes (multimedia keys) .
As far as i know hotkeys is the application for running special application on key strokes.

I created a file with running atributes in /usr/bin : my_hotkeys :

cat /usr/bin/my_hotkeys


hotkeys -t acer5102



at first i added this file in /etc/profile (so it will run on each user login) - it did load to memory but it didn't catch any keystrokes (didn't do what it sposed to do).

Then i added a symlink in ~/.kde/Autorun but it only opened kwrite with the contense of /usr/bin/my_hotkeys

After this i tried to create generic X file :

notebook:/etc/X11/Xsession.d# ls -l startup-local


-rwxr-xr-x 1 root root 35 2008-05-25 18:36 startup-local


notebook:/etc/X11/Xsession.d# cat startup-local


#!/bin/sh





/usr/bin/my_hotkeys &





notebook:/etc/X11/Xsession.d# cat /usr/bin/my_hotkeys


hotkeys -t acer5102


so teorticly it should run on each login (it didn't even load ).
so i tried using a local xseason file :

notebook:/home/jabka# ls -l .xsession


-rwxr-xr-x 1 jabka jabka 35 2008-05-25 18:47 .xsession


notebook:/home/jabka# cat .xsession


#!/bin/sh





/usr/bin/my_hotkeys &


the last option i used was adding my_hotkeys into .bashrc but this method has a major flaw (on each time i login to bash or open the konsole the application is loaded),

Regards,...
* Thank you in advance
 
Old 05-25-2008, 08:35 PM
"Mumia W.."
 
Default How can to start hotkeys ?

On 05/25/2008 10:58 AM, Jabka Atu wrote:

Good day,...

I'm using acerhk to get the special key codes (multimedia keys) .
As far as i know hotkeys is the application for running special application
on key strokes.

I created a file with running atributes in /usr/bin : my_hotkeys :
cat /usr/bin/my_hotkeys
hotkeys -t acer5102



You should place your own programs and scripts in /usr/local/bin.



at first i added this file in /etc/profile (so it will run on each user
login) - it did load to memory but it didn't catch any keystrokes (didn't do
what it sposed to do).

Then i added a symlink in ~/.kde/Autorun but it only opened kwrite with the
contense of /usr/bin/my_hotkeys
After this i tried to create generic X file :



I can't see why that didn't work if the permissions were set correctly
(execute permissions). I do that on my system too.



notebook:/etc/X11/Xsession.d# ls -l startup-local
-rwxr-xr-x 1 root root 35 2008-05-25 18:36 startup-local
notebook:/etc/X11/Xsession.d# cat startup-local
#!/bin/sh

/usr/bin/my_hotkeys &



I doubt you need to manually background this process. I suspect that
xbindkeys does pretty much the same thing as "hotkeys," and xbindkeys
backgrounds itself.



notebook:/etc/X11/Xsession.d# cat /usr/bin/my_hotkeys
hotkeys -t acer5102

so teorticly it should run on each login (it didn't even load ).
so i tried using a local xseason file :

notebook:/home/jabka# ls -l .xsession
-rwxr-xr-x 1 jabka jabka 35 2008-05-25 18:47 .xsession
notebook:/home/jabka# cat .xsession
#!/bin/sh

/usr/bin/my_hotkeys &

the last option i used was adding my_hotkeys into .bashrc but this method
has a major flaw (on each time i login to bash or open the konsole the
application is loaded),

Regards,...
Thank you in advance



Test for $DISPLAY and the presence of the "hotkeys" process before
launching hotkeys, e.g.:


if [ -n "$DISPLAY" ]; then
if [ -z "$(ps hc -C xbindkeys)" ]; then
echo "Start xbindkeys."
fi
fi

Season to taste.

However, a more accurate but complicated way would be to use the X
resource database (xrdb) to store a semaphore that would indicate that
the hotkey application had already been started on that display.


Good luck.


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

Thread Tools




All times are GMT. The time now is 05:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org