Sponsored Content
Full Discussion: Saving TTY settings
Operating Systems Linux Red Hat Saving TTY settings Post 302897989 by mp99 on Thursday 17th of April 2014 01:48:50 PM
Old 04-17-2014
Saving TTY settings

I have 4 digi etherlite boards that allow Wyse and VT100 terminals to connect to our network (stop laughing) Smilie

We are switching from an older version of redhat where we have these running to: Red Hat Enterprise Linux Server release 6.5 (Santiago)

I finally got them working and copied the tty settings from the old machine to a file and then loaded them in to the new machine:

Saved via:
Code:
 stty --save /dev/ttya00 $i > /home/shared/IT/tty/ttya0

Then loaded on new machine with

Code:
 stty -F /dev/ttya0 `cat /home/shared/IT/tty/ttya0`

and this works fine.

The problem is that on the old machine I turned everything on via inittab (example below)

Code:
a0:2345:respawn:/sbin/agetty  19200 ttya00
a1:2345:respawn:/sbin/agetty  19200 ttya01
a2:2345:respawn:/sbin/agetty  19200 ttya02

I have no idea how to do this under the new version.

Like I said I have it working but it's not right

in my /etc/rc.d/rc.local i have things like this:

Code:
start tty TTY=/dev/ttya00
start tty TTY=/dev/ttya01
start tty TTY=/dev/ttya02
start tty TTY=/dev/ttya03
start tty TTY=/dev/ttya04
start tty TTY=/dev/ttya05

stty -F /dev/ttya0 `cat /home/shared/IT/tty/ttya0`
stty -F /dev/ttya1 `cat /home/shared/IT/tty/ttya1`
stty -F /dev/ttya2 `cat /home/shared/IT/tty/ttya2`
stty -F /dev/ttya3 `cat /home/shared/IT/tty/ttya3`
stty -F /dev/ttya4 `cat /home/shared/IT/tty/ttya4`

So my question is:

a) how do i save my settings so i don't have to load them each time?
b) how do i do something similiar to inittab to specify which tty's I want agetty/mgetty running on?

Thanks!

Last edited by bartus11; 04-17-2014 at 02:57 PM.. Reason: Please use [code][/code] tags.
 

9 More Discussions You Might Find Interesting

1. Programming

TTY programming

Hi gurus, Need help to code some tools dealing with all the tty thingies, raw mode etc .... Can you juss point me to some cool links related to tty programming, i've tried google but found none so far :confused: Thanks all. (2 Replies)
Discussion started by: andryk
2 Replies

2. UNIX for Dummies Questions & Answers

tty problem

Dear all, when I do a remote shell command from a FUJITSU Unix to an HP-UX, I always get this: 15:36:35 + rsh -l storto obs2 sh /users/obs/storto/MESO-NH/tmp_olive_map_00CC/job_prepex_70JY_C00CC_20041103_19 Not a terminal stty: : Erreur inconnue stty: : Erreur inconnue... (0 Replies)
Discussion started by: stortignauz
0 Replies

3. UNIX for Dummies Questions & Answers

tty remote IP

I am fairly new to Unix Terminal outputs and I have a server that is sending print jobs to a PortServer 8 RJ45 situated in a remote location. It is working fine however we need to change the Subnet of that location and I am unable to find where the IP associated with the terminal is located. ... (4 Replies)
Discussion started by: martin_Montreal
4 Replies

4. AIX

tty

Hi All can anyone tell me what is the meaning of tty,or give me an example of this? (1 Reply)
Discussion started by: magasem
1 Replies

5. Solaris

Saving Font Settings

I've written some tools that don't like the default font setting that come up with the Common Desktop Environment. (The text on the buttons looks like the dingbat character set.) The work around is to go into the style manager and set the font to anything other than 'medium' which is the default.... (2 Replies)
Discussion started by: scottwevans
2 Replies

6. Solaris

tty hack

hi all, what i want to do when user open terminal like tty5 and do his work i want to see his terminal how can i do this (1 Reply)
Discussion started by: xxmasrawy
1 Replies

7. UNIX for Advanced & Expert Users

tty changes?

I am not sure if I am using the correct terminology but somehow my tty keeps changing on me. The man pages are confusing to me on what exactly the tty is. This is what I see when I run the tty command. Could anyone explain why my tty keeps changing? ~ $ tty /dev/pts/1 ~ $ tty /dev/pts/0 (6 Replies)
Discussion started by: cokedude
6 Replies

8. AIX

Is there virc or exrc for saving vi configuration settings in AIX?

There's no Vim in AIX (6 and 7), but Vi is natively available. I want to save my configuration for Vi like `set nu` to number lines in files. I couldn't find configuration related to Vi in /etc/ or /usr/etc/ folders. Please help me with that. (4 Replies)
Discussion started by: Chinggis6
4 Replies

9. Shell Programming and Scripting

Python: Redirecting to tty and reading from tty

In bash, you can do something like this: #!/bin/bash echo -n "What is your name? " > /dev/tty read thename < /dev/tty How can I do the same in python? I have a python script that has the following content: #!/usr/bin/python2.7 import getpass import sys import telnetlib import... (2 Replies)
Discussion started by: SkySmart
2 Replies
SNP(4)							   BSD Kernel Interfaces Manual 						    SNP(4)

NAME
snp -- tty snoop interface SYNOPSIS
#include <sys/snoop.h> int ioctl(fd, SNPSTTY, &dev); int ioctl(fd, SNPGTTY, &dev); int ioctl(fd, FIONREAD, &result); DESCRIPTION
/dev/snp is a snoop device which allows users to attach to any tty and watch activities on it. The kernel must be compiled with device snp, or the snp module must be loaded, for these devices to be available. To associate a given snp device with a tty to be observed, open the snp device and a tty device, and then issue the SNPSTTY ioctl on snp device. The argument passed to the ioctl(2) is the address of a variable of type int, holding the file descriptor of a tty device. To detach the snp device from a tty use a pointer to a value of -1. The SNPGTTY ioctl returns information about the current tty attached to the open snp device. The FIONREAD ioctl returns a positive value equal to the number of characters in a read buffer. Special values defined are: SNP_OFLOW device overflow occurred, device detached. SNP_TTYCLOSE tty not attached. SNP_DETACH snp device has been detached by user or tty device has been closed and detached. SEE ALSO
pty(4), sio(4), kldload(8), watch(8) HISTORY
The snp device first appeared in FreeBSD 2.1. In FreeBSD 8.0 the snp driver was rewritten to work with the replaced TTY subsystem. AUTHORS
The author of the current implementation is Ed Schouten <ed@FreeBSD.org>. Previous versions of snp were based on code written by Ugen J.S. Antsilevich <ugen@NetVision.net.il>. BUGS
This version of snp does not return proper error codes when calling FIONREAD. It also does not allow SNPSTTY to detach itself from the TTY. BSD
November 5, 2008 BSD
All times are GMT -4. The time now is 07:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy