Sponsored Content
Top Forums UNIX for Dummies Questions & Answers ttys.. i must be doing something wrong.. Post 6889 by Perderabo on Friday 14th of September 2001 09:58:27 AM
Old 09-14-2001
I have never worked on a SCO box. And I have never neard of "ditty". But I will describe a similiar sounding problem and solutions involving more mainstream versions of unix and the "stty" program.

Tty ports on systems like hp-ux have a default set of characteristics. You can vary them by opening the device file and issueing an ioctl() call. The
program stty does this. But here is the key...when the last process closes the file, the characteristics go back to the defaults.

So a command like:
stty 9600 < /dev/tty01
changes the baud rate for only as long as the stty command is running.

An ugly but common solution is to run a script like:
( stty 9600 ; sleep 1000000 ) < /dev/tty01
at startup.

A more correct solution is to insure that any program or script that needs to use the port shoulders the responsibility as setting it up the way it need to be. Thus the stty statement should be placed in the interface script used by the lp subsystem to actually do the printing.

Maybe your ditty problem is something like that. But the mere existence of a system command called ditty shows a disregard for unix standards...so maybe not.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Dead pseudo-ttys

We are having a problem on an AIX 4.3 system, whereby users somehow exit the system in a way such that their process continues to run. In the who listing, the user may or may not be listed. Processes are still listed in ps, and are still assigned to the pseudo-tty. Processes continue to... (1 Reply)
Discussion started by: markat2k
1 Replies

2. UNIX for Dummies Questions & Answers

what is wrong here

Hello, I have a simple script such as ----------------------------- #! /bin/sh YEAR=`date -u +%Y`; MONTH=`date -u +%m`; DAY=`date -u +%d`; DATE=$MONTH$DAY$YEAR LOGFILES=auditTrail-$DATE LOGMATCH=$LOGFILES\* ARGUM='' # find all files and write them to a file find . -name... (7 Replies)
Discussion started by: arushunter
7 Replies

3. UNIX for Dummies Questions & Answers

what am i doing wrong

#!/bin/bash $1 | cat >> - $2 I am trying to write a script that takes that takes two arguments. The first being a line of text, the second being a file you create. The script should take the first argument and insert it into the very top (the first line) of the file named in your second... (4 Replies)
Discussion started by: iago
4 Replies

4. UNIX for Dummies Questions & Answers

can someone tell me what im doing wrong here

Got It Workng Woohoo Edited (2 Replies)
Discussion started by: iago
2 Replies

5. UNIX for Dummies Questions & Answers

Difference between console and ttys

Sometimes when I open up the terminal (like just now) it says Last login: Wed Jun 17 07:29:25 on console sometimes it says ttys (like when I exit and open a new window/tab). What's the difference? and is something fishy going on? (6 Replies)
Discussion started by: Straitsfan
6 Replies

6. AIX

all pseudo ttys busy, AIX 5.2

I have several users connecting via a Windows-based SSH\telnet client. The previous sysadmin used FacetTerm to allow certain users to switch between multiple "windows." I'm told there are AIX-native ways to do this but I work with what I inherited. Originally, many users were still connecting... (3 Replies)
Discussion started by: lacroix
3 Replies

7. Shell Programming and Scripting

Is there anything wrong?

For one of my script, I want one extra parameter needs to be added to one of the Usage option. Below its given #Check Input parameters are valid if ; then function usage() { echo echo "*******************************************" echo " !!! USAGE... (2 Replies)
Discussion started by: raghunsi
2 Replies

8. Shell Programming and Scripting

I can't get what I'm doing wrong!

I am making a shell script that will have "shortcuts" to do different tasks and I can't get what I'm doing wrong (this is just a test script) read cake if then echo "1 it is" fiit outputs: 1: : bad variable namecake test.sh: 27: test.sh: Syntax error: end of file unexpected (expecting... (22 Replies)
Discussion started by: kitay
22 Replies

9. Shell Programming and Scripting

Why result is wrong here ? whether break statement is wrong ?

Hi ! all I am just trying to check range in my datafile pls tell me why its resulting wrong admin@IEEE:~/Desktop$ cat test.txt 0 28.4 5 28.4 10 28.4 15 28.5 20 28.5 25 28.6 30 28.6 35 28.7 40 28.7 45 28.7 50 28.8 55 28.8 60 28.8 65 28.1... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies
TTYTAB()																  TTYTAB()

NAME
ttytab - table of login terminals SYNOPSIS
/etc/ttytab DESCRIPTION
The ttytab file lists all the terminal devices that one can login on. It is a simple text file that contains lines of the form: name type "getty" "init" The name and type fields are simple words, name is the name of the terminal device with /dev stripped off, and type tells the type of ter- minal to initialize the TERM environment variable. The getty and init fields may name commands that are run to allow one to login on the line, or to initialize the line. Both these fields may be more than one word if the whole field is enclosed in double quotes. Getty is usually simply the word getty, the command that prints a system identification banner and allows on to type a name to log in. Init is usually an stty command to set the baud rate and parity of a serial line. The init field may be omitted to indicate that no initialization is necessary, and the getty field may be left out to not start a login process. Terminals should not be left out, because their place in the ttytab file determines their slot number as returned by ttyslot(3). Comments (introduced by #) and empty lines are ignored. EXAMPLE
A ttytab for the console, two serial lines, and a pseudo tty entry: console minix getty tty00 vt100 getty "stty 9600" tty01 dialup getty "stty 38400" ttyp0 network ENVIRONMENT
TERM Terminal type NOTES
It is customary to set the type to dialup for a dialin line. One can check for that name in one's .profile. SEE ALSO
gettyent(3), ttyslot(3), init(8). AUTHOR
Kees J. Bot (kjb@cs.vu.nl) TTYTAB()
All times are GMT -4. The time now is 08:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy