LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-16-2010, 12:02 AM   #1
Vilius
Member
 
Registered: Jan 2006
Location: Lithuania
Distribution: Arch, Debian
Posts: 193

Rep: Reputation: 16
stty command in /etc/rc.local


Hello,

Using serial terminal(emulated) to connect to linux box.
In order to fix row/column count I added stty command in rc.local:
Code:
stty -F /dev/ttyS0 rows 56
stty -F /dev/ttyS0 cols 110
If I add it in redhat's /etc/rc.d/rc.local - it works fine.
But if I add it in debian's /etc/rc.local - it doesn't work. I checked by redirecting some output to /dev/ttyS0 - rc.local gets executed and stty commands are executed also - but for some reason rows/columns dosn't change after I login. If I execute rc.local by hand - stty commands work.

Could someone explain why this works on redhat but not on debian ?

thanks
V
 
Old 06-16-2010, 05:01 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Testing"
Posts: 6,105

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
You could try executing those commands as your user in rc.local
Eg:
Code:
su - vilius -c "stty -F /dev/ttyS0 rows 56"
su - vilius -c "stty -F /dev/ttyS0 cols 110"
But your login shell may be overriding this when you login.

You need to check those "dot" files Eg. .bashrc and check what they are doing. Maybe better just to put the commands there instead of in rc.local

Things like setting terminal characteristics should be set at a user level, not root (rc.local) level.
 
  


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 04:36 PM
stty command mohit_parihar Linux - General 1 01-29-2010 08:35 AM
Stty and X kofucii Linux - Newbie 1 09-08-2009 08:11 PM
help in stty jenovaux Linux - General 2 06-24-2009 09:44 AM
Stty setting UltraSoul Solaris / OpenSolaris 2 10-13-2005 08:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:21 AM.

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