LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-20-2008, 04:21 AM   #1
armandino
Member
 
Registered: Oct 2005
Posts: 72

Rep: Reputation: 15
How to reset/restart a tty from another tty?


I tried using the TMOUT shell variable to achieve an automatic logout after a certain time of inactivity. This is working well in pseudo terminals (/dev/pts/...): when the time expires the shell window closes.

In ttys, however, the shell performs the logout as expected, but then does not show the login prompt and remains somehow frozen; if logged as ordinary user I can not write anything, while if logged as root I can write but anything I write (escape char included) produces any effects at all except appearing on the screen.

I suppose the terminal does not automatically restart after the automatic logout.
Is this a normal behaviour (I'm running Fedora9)?
How can I fix it?
And, by the way, how can I restart or reset a tty from another one?

Thanks for any help
 
Old 10-21-2008, 02:02 PM   #2
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
Curious. I don't know the solution to the problem you describe but I use TMOUT on machines at work and it works fine on tty1-6. Log in, wait X minutes, there's a beep and the login prompt comes up. Do you see the message about the session having been closed due to inactivity?

We use SLED 10 rather than Fedora but what you describe doesn't sound like normal behaviour.
 
Old 02-21-2009, 01:08 PM   #3
armandino
Member
 
Registered: Oct 2005
Posts: 72

Original Poster
Rep: Reputation: 15
Anyone knowing the solution to the problem (how to restart or reset a tty from another one)?
 
Old 02-21-2009, 01:33 PM   #4
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
Find the pid for the shell by examining the output of ps and then kill that process.
 
Old 02-25-2009, 03:09 AM   #5
armandino
Member
 
Registered: Oct 2005
Posts: 72

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by arizonagroovejet View Post
Find the pid for the shell by examining the output of ps and then kill that process.
Thanks for the advice, but that actually was one of my first attempts. The command
Code:
ps ax | grep tty
does not show any process associated to the frozen terminal. However, if I switch to it I can see this:
Code:
#exit
logout
_
The cursor is not blinking.
The terminal seems to be just frozen in such a state, not responding to any input from the keyboard. That's why I'm looking for a way to reset it.

Of course I'd also like to know why an exit command produces such an effect, but that's another question...
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I "reset" a frozen/unresponding tty (mingetty) utahnix Linux - Software 11 12-03-2010 05:45 PM
[SOLVED] Tty soplin Linux - General 2 05-11-2007 08:20 AM
I it possible to kill a tty or find which tty is being using by which process? geletine Linux - Software 2 01-15-2006 08:40 AM
ubuntu 5.10 gives me tty error on restart aairez Ubuntu 0 11-08-2005 04:26 PM
change tty => system crashes (ati driver/tty resolution) mosca Debian 6 08-05-2004 07:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:24 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
Open Source Consulting | Domain Registration