TTY respawning

Moderators: Moderator, Global Moderator

Post Reply
Jim
Administrator
Administrator
Posts: 1324
Joined: Thu Jun 17, 2004 12:37 am

TTY respawning

Post by Jim »

on fedora core 9, when you logout the scrollback buffer isn't cleared...this could potentially be a problem. I found this really cool script that will clear the virtual terminal, switch terminals and then switch back; effectively clearing the buffer. The problem with this is, every once in a while the virtual terminal won't respawn so instead of a "localhost login:" there's just a blank screen and i have to alt + f2 to another VT to login. Is there something wrong with this perl script or possibly a better way to clear the VT and the scrollback? btw...this is in the ~/.bash_logout file.

[code]case "`tty`" in
/dev/tty[0-9]*)
CUR_CONSOLE=`fgconsole`
clear
chvt 63
chvt "$CUR_CONSOLE"
;;
esac[/code]
Love is all a matter of timing.

It's no good meeting the right person too soon or too late.

If I'd live in another time or place...

...my story might have had a very different ending.
Post Reply

Return to “Linux Help”