X11 Serial Killer? 14
Chris Benard asks: "I frequently have problems with X just taking control of my keyboard, but not my mouse. My mouse still moves, but it isn't able to interact with X (not unlike a windows freeze). However, I would like to know if there is a program to listen on a serial port for commands and execute them as root. I have an HP48G calculator, and I would like to make a few short commands to execute from it to my serial port, such as killall -9 X and killall -9 netscape-communicator. Please let me know of any programs existing and any SDKs that I might use to produce my own program. " Has anyone managed to come up with a hack that might work for this situation?
Done this with PDA (Score:2)
bash: ispell: command not found
HP48 Software (Score:2)
I think this is what you are looking for.
How to do this (Was Re:Done this with PDA) (Score:1)
s1:2345:respawn:/sbin/mingetty ttyS1
Substitute your favorite getty program if mingetty doesn't get it for you. Note that mingetty is very minimal; it won't set the baud rate, for instance, so it would already have to be set, e.g. with setserial, elsewhere in the init scripts. Or use another getty which does support setting the baud rate. (I don't need serial terminals on this computer, so I don't have any other getty programs installed right now...)
---
Re:This may sound like a stupid questoin... (Score:2)
Yes.
ObComment: Since this isn't a default part of any binary distribution I know of, you'll have to compile it. While there, it should take only a few minutes to remove the keyboard commands you don't want users to have...but then you won't have them either.
a line of perl: (Score:1)
perl -ne 'system $_'
Replace "ttyS0" with whatever serial port you really want to use, of course, and make sure that you're serial port is set up with the correct baud rate and such, probably using stty.
More about Magic Sysrq on RH6.1+ and maybe others (Score:1)
# Turn off sysrq
if [ -f
echo "0" >
action "Turning off Magic SysRq key"
fi
So, you can just set the $MAGIC_SYSRQ variable to "yes" at top of the script (it doesn't currently exist, but you can add it) or comment out this section. Otherwise, a '0' will get catted to
A standard getty prolly (Score:2)
Re:More about Magic Sysrq on RH6.1+ and maybe othe (Score:2)
That would be one way... (Score:1)
Take a moment and read
Use JSLAUNCH it's perfect for this (Score:1)
if you're on a network.... (Score:1)
Direct solution for your X problem (Score:1)
I find that even when X seems locked up pretty tight that will kill it.
GPM (Score:1)
This may sound like a stupid questoin... (Score:1)
David