LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2011, 03:20 PM   #1
buddy1138
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Rep: Reputation: 0
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
 
Old 03-12-2011, 08:47 AM   #2
sys64738
Member
 
Registered: May 2008
Location: NRW/Germany
Posts: 105

Rep: Reputation: 30
Hi
just a guess but how about the environment variable TERM?
Is it set to "vt100" when you start your Java program?
 
Old 03-13-2011, 10:28 AM   #3
buddy1138
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
There is no environment associated with tty6 since it is not being controlled by bash in this case. Thanks.
 
Old 03-13-2011, 02:12 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
Are you running a POSIX system? The ctlecho (or echoctl, your choice) directives are listed as "NON-POSIX" in the info file.
 
Old 03-14-2011, 10:04 AM   #5
buddy1138
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
Old 03-14-2011, 11:40 PM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with stty.... backroger Linux - Software 1 02-04-2012 05:36 PM
Stty and X kofucii Linux - Newbie 1 09-08-2009 09:11 PM
help in stty jenovaux Linux - General 2 06-24-2009 10:44 AM
stty: : No such device or address tarigmahadi Programming 1 04-23-2008 06:47 PM
stty: standard input: Inappropriate ioctl for device fwalthard Linux - General 0 07-14-2003 03:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration