Subject: Re: Sending an escape sequence to the console terminal
To: Mike Long <mike.long@analog.com>
From: Tom Pavel <PAVEL@SLAC.Stanford.EDU>
List: netbsd-users
Date: 04/23/1997 20:47:54
>>>>> On Tue, 28 Nov 1995, Mike Long <mike.long@analog.com> writes:
> >From: John Maier <JohnAM@datastorm.com>
> >Date: Tue, 28 Nov 95 14:43:00 PST
>
> >I have pcvt setup. I know that ^[[?3h will put a regular VT100 into 132
> >col mode.
> >
> >How do I state this in an echo statement to get pcvt to go into 132 col
> >mode?
>
> Here's one way that will always work:
> echo -n "E[?3h" | tr E \\033
> gross, eh? :-) You might prefer printf(1).
I was going to suggest using tput(1) instead, but there doesn't seem
to be a capability for setting the term width...
On the other hand, rather than sticking an "echo" or a "printf" (or
even a "tput" if it did work) into your ~/.login, you might be better
off cloning the pcvt25h termcap entry into a pcvt25h-w (or whatever)
and adding "\E[?3h" to the "is" cap (see the vt320-w entry for
example). The you can modify /etc/ttys and get the wide screens with
no fuss.
Tom Pavel
Stanford Linear Accelerator Center
pavel@slac.stanford.edu http://www.slac.stanford.edu/~pavel/