stty -F does not use specified device
I have a java program that opens /dev/tty6 and writes vt100 escape sequences and characters. The problem is that the terminal is echoing the control keys that are typed on the screen. I have tried to use "stty -F /dev/tty6 -echoctl to turn it off but this does not work - "stty -a -F /dev/tty6" shows echoctl is still in force. If I try the stty command in another terminal without -F "stty -a" properly reports -echoctl. It just seems that the -F parameter is not getting the setting to the proper tty. There is another note that I reduced the number of mgettys so that /dev/tty6 has no bash running in it. It's just a blank screen when I ctl-alt-f6 to it before writing to it with my program. Any help would be appreciated. Thanks. Buddy
|
Hi
just a guess but how about the environment variable TERM? Is it set to "vt100" when you start your Java program? |
There is no environment associated with tty6 since it is not being controlled by bash in this case. Thanks.
|
Are you running a POSIX system? The ctlecho (or echoctl, your choice) directives are listed as "NON-POSIX" in the info file.
|
I am using Fedora 14. My googleing on this aspect seems to indicate it is POSIX compliant but I am not 100% sure. When I open a normal terminal window on my gui desktop and it has bash running in it I can sucessfully use the the stty command with no -F parameter to change the state of echoctl but not in my non bash tty6 vt. Thanks.
|
The POSIX compliance is optional in most Fedora systems, so that's probably not the problem.
I just glanced at /dev, and noted that my Fedora 14 system defines 64 /dev/tty<n> devices, which suggests that they are not intended for what I think you're trying to accomplish. (If I understand Linux setup, those devices are for remote user login, not use by programs. Fedora starts "root" on tty1 during boot, and then starts the first X-server on tty1. Subsequent X-server are started on tty[7-9], and tty[2-6] are started by a initctl call: initctl start tty TTY=/dev/tty2, etc. So those terminals are already in use. (Look at /etc/init/start-ttys.conf for details.) Have you looked at the master/slave terminal setup? (See man pty - Note the single "t") That set-up sounds much more like what you need to accomplish (what I understand to be) your goal. |
All times are GMT -5. The time now is 05:08 PM. |