Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

make stty settings permanent

Posted on 2002-06-04
9
Medium Priority
?
1,108 Views
Last Modified: 2008-02-01
Hi,
 I am able to set the xon xoff settings on a serial port (rh linux 7.2), but unable to make them permanent. The settings toggle back to "defaults" when the port changes state (respawn to off, etc). I am actually using the ditty command which is a stty interface from digiboard. Is there a way to make the changes permanent?
0
Comment
Question by:medent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7054063
respawn ditty, so I assume that it is specified in /etc/inittab, there you can place all options which can be passed to ditty. You need to read the docs about ditty which options you need.
0
 

Author Comment

by:medent
ID: 7056006
Not sure I understand- Please clarify. I know the ditty command syntax to set the xon xoff state, thats not my problem. I want to know how to make stty settings stick. I have put in inittab as "once" to run once, but that will change if a port is toggled (occasionally done to "reset" a stuck terminal,etc). I'm not sure if respawn ditty is valid (which appears to be your idea), because it would continually restart the process after terminated (great for login bad for ditty). Thank You.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7056315
even if it is once in inittab, you should set the parameters there (if ditty has some)
0
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 

Author Comment

by:medent
ID: 7056353
The question remains how to preserve the stty settings or protect them from changing during runtime. Thank You.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 1200 total points
ID: 7056416
to restrict changes during runtime, you need to remove permissions to stty and/or corresponding libraries for the user using this tty.

> .. preserve settings ..
you mean for next start of dtty? then see my previous comments
0
 

Author Comment

by:medent
ID: 7056530
This is not an intention user change. The stty defaults as a side effect of when status of the port in the inittab changes (respawn to off, or vice versa).
I do not understand why the stty goes to default when the inittab changes in that way, or even why a reboot defaults all you stty settings, but I would like to at least preserve the settings during runtime. Disabling stty will probably trade problems for problems...
0
 

Expert Comment

by:CleanupPing
ID: 9089025
medent:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 

Author Comment

by:medent
ID: 9089259
stty or ditty are not directly issued from within the inittab,  "agetty" is (generates a login)
 
 so the problem seems to be when agetty respawns, it changes the port state (flow control in particular), then I have to fix it by usuing the ditty command.

 
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9655884
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is to:

Be PAQ'd/Points Refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Paul
EE Cleanup Volunteer
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question