Thread: Odds and ends
View Single Post
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#166
Originally Posted by auouymous View Post
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.
I'm getting nowhere on this.


[1|user@Nokia-N800-43-7|~]xkbd -geometry +780+65536 -k /media/mmc2/N800/Keyboards/scummside.xkbd & PID1=$!
[1] 8764
[1|user@Nokia-N800-43-7|~]kill $PID1
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
[1|user@Nokia-N800-43-7|~]kill 'pidof -s xkbd'
-bash: kill: pidof -s xkbd: no such pid


So yeah, neither suggestion of yours is taking.

Perhaps you overlooked a simple typo?