[NTLUG:Discuss] Screen scramble trying to cat /etc/skel/.less

Chris Cox cjcox at acm.org
Sat Aug 25 14:19:17 CDT 2001


To reset the linux console: reset
>From an xterm/other psuedo term: tput reset

(that should do it most of the time)

The "garbage" character set is the alternative character mode.
To simulate:
tput enacs     # enable alternative character set.
tput smacs     # do a shift-in (if this doesn't work echo "^N" .. 
               #   to get a ^N type Control-V, Control-N)

Now you should have the "garbage" characters.

tput rmacs     # you'll be typing kind of blind at this point (if
               #   this doesn't work, echo "^O" .. to get a ^O
               #   type Control-V, Control-O)


Things should be back to normal.

To disable the alternative character set mode (prevent the ^O/^N thing),
echo "<ESC>)B", again you can type an escape by doing a Control-V, Escape.

This is all specific to ANSI and vt100 derivatives... which most
terminals under Linux will be.

This is all coming out of my memory... so it may not be quite right.


Regards,
Chris

Steve Baker wrote:
> 
> Richard Geoffrion wrote:
> >
> > Ok.  So I tried to cat it and now one of my consoles is scrambled.  Is there
> > some sort of command that will set it to rights?  Maybe something like the
> > DOS  mode 80?
> 
> Linux consoles have VT100 emulation (or something like that) - and there is a
> character sequence that can flip into an alternative character set that has
> all manner of weird characters in it.
> 
> If you 'cat' a binary file, it'll have all manner of random-looking binary
> crap in it - an in your case, it evidently included the magic escape sequence
> to flip the console into the garbage character set.
> 
> > I'd hate to have to reboot to clear it.
> 
> Yes - I know what you mean...however - that's what I've always done in the
> past.  Probably you could figure out which escape sequence a VT100 needs to
> flip it back into ASCII and type that (blindly) into the console.
> 
> Personally, I use X and then a scrambled Xterm can just be closed down and
> re-opened.  Dunno what resets a console term though.
> 
> ----------------------------- Steve Baker -------------------------------
> HomeMail : <sjbaker1 at airmail.net>   WorkMail: <sjbaker at link.com>
> HomePage : http://web2.airmail.net/sjbaker1
> Projects : http://plib.sf.net       http://tuxaqfh.sf.net
>            http://prettypoly.sf.net http://tuxkart.sf.net
>            http://freeglut.sf.net   http://toobular.sf.net
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss



More information about the Discuss mailing list