Reply
Thread Tools
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#51
Originally Posted by Addison View Post
How do I get the PID though?
To kill the one with the highest pid:
Code:
kill `pidof -s xkbd`
If you want to kill a specific instance you need to store the PIDs as you launch them, $! is the last backgrounded process.
Code:
xkbd & PID1=$!
xkbd & PID2=$!
kill $PID1
You can also store the PIDs in named files if the launch script is separate from the kill script.
 

The Following User Says Thank You to auouymous For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#52
Thanks!

I will definitely give this a try!
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#53
I'm not seeing what I'm doing wrong on this.

I launch this just once in the beginning. It's the bottom keyboard that will always remain on the screen.
xkbd -geometry +65520+65992 -k /media/mmc2/N800/Keyboards/Med.xkbd & PID1=$! & filterm ascii-ascii cp437-utf8 tf

When pressing the fullscreen key, it brings up the big keyboard.
xkbd -geometry +65507+65536 -k /media/mmc2/N800/Keyboards/Full.xkbd & PID2=$!

When I press Enter on that big keyboard, it executes this.
kill $PID2
xte 'keydown KP_Enter' 'keyup KP_Enter'


It's not killing the big keyboard though.

From what you told me, this should be correct.
 
Posts: 1,101 | Thanked: 1,185 times | Joined on Aug 2008 @ Spain
#54
Originally Posted by Addison View Post
I'm not seeing what I'm doing wrong on this.

I launch this just once in the beginning. It's the bottom keyboard that will always remain on the screen.
xkbd -geometry +65520+65992 -k /media/mmc2/N800/Keyboards/Med.xkbd & PID1=$! & filterm ascii-ascii cp437-utf8 tf

When pressing the fullscreen key, it brings up the big keyboard.
xkbd -geometry +65507+65536 -k /media/mmc2/N800/Keyboards/Full.xkbd & PID2=$!

When I press Enter on that big keyboard, it executes this.
kill $PID2
xte 'keydown KP_Enter' 'keyup KP_Enter'


It's not killing the big keyboard though.

From what you told me, this should be correct.
Probably because each is a different script. Environment variables are local, so they are lost when the script finishes and the next script can't read $PID1. Use a file to store and read the PID
Something like:
Code:
#launch script
xkbd -geometry +65507+65536 -k /media/mmc2/N800/Keyboards/Full.xkbd &
echo $! >/tmp/xkbd2.pid

#kill script
kill $(cat /tmp/xkbd2.pid)
xte 'keydown KP_Enter' 'keyup KP_Enter'

Last edited by maacruz; 2011-09-06 at 19:05. Reason: Fixed typo
 

The Following User Says Thank You to maacruz For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#55
Thank you Mac!

What I ended up doing was making a copy of /usr/bin/xkbd and having another one called xkbd2.

I like your idea better though.
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#56
Originally Posted by maacruz View Post
Code:
kill S(cat /tmp/xkbd2.pid)
I could be wrong but the S should probably be a $.
 

The Following 2 Users Say Thank You to auouymous For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#57
Hey, there's one other thing I wanted to ask.

I love Xmms.

I also love how you can use the zoom in and out keys to change tracks.

The thing is, this doesn't work with the tablet locked so that the screen is turned off to save on battery life.

Is there any possible trick around this?

Also, I usually don't have Xmms on the screen either since it can be graphically intensive.

Is there perhaps a way to focus the zoom keys directly to Xmms even while it's minimized?

Cheers again!
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#58
Originally Posted by Addison View Post
The thing is, this doesn't work with the tablet locked so that the screen is turned off to save on battery life.

Is there any possible trick around this?
Not easily. Write a script that calls MCE's req_tklock_mode_change method with "locked". Then write a '0' to /sys/devices/platform/omap2_mcspi.1/spi1.0/disable_kp to unlock the keys. Replace with /sys/devices/platform/i2c_omap.2/i2c-0/0-0045/disable_kp on the n810. Then you must detect the display on signal and write a '1' to /sys/devices/platform/omap2_mcspi.1/spi1.0/disable_ts to relock the screen. You also need to listen for the unlock signal and terminate your script.

Each time you press a key the screen will turn on but your script will relock it. The only problem is that all keys will be active, you could of course write an Xlib app that grabs keys you don't want active and ignore them.


Originally Posted by Addison View Post
Also, I usually don't have Xmms on the screen either since it can be graphically intensive.

Is there perhaps a way to focus the zoom keys directly to Xmms even while it's minimized?
You could write an Xlib app that grabs the keys and redirects them to the XMMS window. Or you could figure out if XMMS exposes the those actions to dbus and just call them.
 

The Following 3 Users Say Thank You to auouymous For This Useful Post:
Posts: 673 | Thanked: 856 times | Joined on Mar 2006
#59
any thoughts on replacing old buggy cs compiler with upstream 4.4.x or 4.5.x or 4.6.x

Last edited by momcilo; 2011-09-11 at 11:38.
 

The Following 2 Users Say Thank You to momcilo For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#60
Wow auouymous!

Whut?! *lol*

I wish that you just would have said that it's not possible instead.

That I would have understood.

Anyway, I'll look into those MCE and DBUS thingies you suggested and see if I can do something without breaking my tablet.
 
Reply

Tags
nokia n800, volume


 
Forum Jump


All times are GMT. The time now is 07:59.