vi doesn't restore the terminal (text) in Solaris 2.4

vi doesn't restore the terminal (text) in Solaris 2.4

Post by Michael Bennet » Sun, 28 Jan 1996 04:00:00



When running vi under SunOS 4.1.3, after completing
the edit, my terminal is pleasantly returned to
it's original state.  For example, I can see the
output of the last ls command I ran before running
vi.

Under Solaris 2.4, the text previously on the terminal
is gone and I see part of the file I was editing instead.
I find this horrible, and in fact it effectively eliminates
the value of the scrollbar on my xterms.

This definitely seems to be a problem with vi (or the curses
library or something) because when rlogin'd to a SunOS
machine from my Solaris machine, vi works as desired.
It doesn't seem to be related to the terminal program, as
the behavior is the same under xterm or shelltool.

Anyone know why this is, or better yet what I can do to
get the SunOS behavior under Solaris.

 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by Casper H.S. Dik - Network Security Engine » Tue, 30 Jan 1996 04:00:00



>Under Solaris 2.4, the text previously on the terminal
>is gone and I see part of the file I was editing instead.
>I find this horrible, and in fact it effectively eliminates
>the value of the scrollbar on my xterms.
>This definitely seems to be a problem with vi (or the curses
>library or something) because when rlogin'd to a SunOS
>machine from my Solaris machine, vi works as desired.
>It doesn't seem to be related to the terminal program, as
>the behavior is the same under xterm or shelltool.

This is not a problem in vi, it's a problem in the terminfo
database.

Save the following terminfo entry to a file and run "tic" on it.
(Either as superuser so it will be the system-wide default or
set the environment variable TERMINFO to a directory you own,
and put that setting in your .login.

xterm|vs100|xterm terminal emulator,
        am, eslok, hs, km, mir, msgr, xenl,
        cols#80, it#8, lines#65,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m$<2>, bold=\E[1m, clear=\E[H\E[2J,
        cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\b,
        cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
        dsl=\E[?E, ed=\E[J, el=\E[K, el1=\E[1K$<3>,
        enacs=\E(B\E)0, fsl=\E[?F, home=\E[H, ht=\t, hts=\EH,

        ind=\n, ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=\b,
        kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB,
        kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, kf1=\EOP,
        kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt,
        kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8,
        rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E[2J\E[?47l\E8,
        rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, sc=\E7,
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t^N%e^O%;,
        sgr0=\E[m, smacs=^N, smcup=\E7\E[?47h, smkx=\E[?1h\E=,
        smso=\E[7m, smul=\E[4m, tbc=\E[3g,
        tsl=\E[?E\E[?%i%p1%dT,
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by Kevin C Sco » Wed, 31 Jan 1996 04:00:00



> When running vi under SunOS 4.1.3, after completing
> the edit, my terminal is pleasantly returned to
> it's original state.  For example, I can see the
> output of the last ls command I ran before running vi.
> Under Solaris 2.4, the text previously on the terminal
> is gone and I see part of the file I was editing instead.
> I find this horrible, and in fact it effectively eliminates
> the value of the scrollbar on my xterms.

This is an interesting observation, and I'd like to ask a
related question about terminal configuration on Sun systems
(both SunOS and Solaris).  It seems that whenever the scrollbar
is active, programs are unable to send out escape sequences to
modify the contents of the screen.  For example, when using
tcsh with scrolling enabled, it is seemingly impossible to
use the up/down arrow keys to recall previous commands.  Also,
when the scrollbar is active, and I use less to view a file
that happens to be smaller than a screenful, the whole file
flips by instantly and then is immediately erased.  Is there
some configuration trick that will allow simultaneously having
the scrollbar active and allowing programs to send out escape
codes to edit the text on the screen?  Having such a capability
would make the scrollbar much more useful than it currently is.

Kevin Scott

 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by Paul G. F » Thu, 01 Feb 1996 04:00:00




:
: >Under Solaris 2.4, the text previously on the terminal
: >is gone and I see part of the file I was editing instead.
: >I find this horrible, and in fact it effectively eliminates
: >the value of the scrollbar on my xterms.
:
:
: This is not a problem in vi, it's a problem in the terminfo
: database.
:

i, on the other hand, prefer the behavior that leaves the file i
was editing on the screen.  can someone explain to me why the
xterm resource "titeInhibit" never seems to work for me?  my impression
was that it was specifically to suppress the screen switching, but
i have it set on all machines i log into (using X), and still get the
switching on some remote logins...

paul

--
---------------------
    paul fox                            american internet corporation

 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by Paul Slootm » Thu, 01 Feb 1996 04:00:00



Quote:

>Under Solaris 2.4, the text previously on the terminal
>is gone and I see part of the file I was editing instead.
>I find this horrible, and in fact it effectively eliminates
>the value of the scrollbar on my xterms.

The terminfo definition being used apparently is missing the \e[?47h
and \e[?47l escape sequences from the initialization and reset
strings... They should go into is3 and rs3, I suppose... Or each into
one of the other levels of initialization and resetting.

Oh yes, these sequences mean "use alternate screen buffer" and
"use main screen buffer".

Paul Slootman
--
key to UNIX: echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbx'|dc
Murphy Software, Enschede, The Netherlands


 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by Bruce Barne » Thu, 01 Feb 1996 04:00:00



Quote:>Having such a capability
> would make the scrollbar much more useful than it currently is.

The scrollbar is a facility in OPEN LOOK that means you can use the
mouse to edit text. Panels, textedit, mailtool, cmdtool - all allow
you to cut and paste text in a uniform fashion. You know - like a
Macintosh, so you don't have to learn different editing shortcuts with
each program.  You also have various keyboard commands to edit text,
and move the mouse around, like the seven different ways to delete
text, secondary cut and paste, dozens of different ways to change the
insertion point, etc. (I suspect most don't know this).

And since it is done outside the "shell process", any application that
uses cmdtool also gains these same conventions "for free".

Unfortunately, this conflicts with applications like tcsh who also
wish to control text in the scrollbar window, or with editors that
wish to take over the entire screen.

I'm not saying that one approach is better than the other, just that each
choice has their own advantages and disadvantages.

--

 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by Tony Nugen » Thu, 01 Feb 1996 04:00:00



>When running vi under SunOS 4.1.3, after completing
>the edit, my terminal is pleasantly returned to
>it's original state.  For example, I can see the
>output of the last ls command I ran before running
>vi.
>Under Solaris 2.4, the text previously on the terminal
>is gone and I see part of the file I was editing instead.
>I find this horrible, and in fact it effectively eliminates
>the value of the scrollbar on my xterms.
>This definitely seems to be a problem with vi (or the curses
>library or something) because when rlogin'd to a SunOS
>machine from my Solaris machine, vi works as desired.
>It doesn't seem to be related to the terminal program, as
>the behavior is the same under xterm or shelltool.

No, I don't think so.  xterm should be like vt220 (or is it vt102 -
can't recall for certain now) in that it can save and restore parts of
the screen.  It's a term problem, not one with vi (or curses).

Quote:>Anyone know why this is, or better yet what I can do to
>get the SunOS behavior under Solaris.

Not too sure, but try asking this question in comp.terminals, as the
gurus there might be able to point you in the right direction.

[comp.terminals added to Newsgroups]

Cheers
Tony
          ___                                                     ___
          L_|_                                                   _|_J
         ( -O>                                                   <O- )
      ___//\J +-------------------------------------------------+ L/\\___
     //-,\    | Tony Nugent         Email:                      |    /,-\\


 / \ //\\.    | Australia                                       |    .//\\ / \
|_/\'/  ||    +-------------------------------------------------+    ||  \'/\_|
    '   ||_                                                         _||   '
        |__)                                                       (__|

 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by Keith Walk » Fri, 02 Feb 1996 04:00:00


: The terminfo definition being used apparently is missing the \e[?47h
: and \e[?47l escape sequences from the initialization and reset
: strings... They should go into is3 and rs3, I suppose... Or each into
: one of the other levels of initialization and resetting.

: Oh yes, these sequences mean "use alternate screen buffer" and
: "use main screen buffer".

I think that they should be in the 'smcup' and 'rmcup' strings.   These
strings should be output by an application at screen initialiazation and
termination which wishes to use the cursor positioning capability 'cup'.

Keith
--
Keith Walker, ICL, Lovelace Rd., Bracknell, Berkshire, United Kingdom RG12 8SN

 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by David Ka » Fri, 02 Feb 1996 04:00:00



  >> When running vi under SunOS 4.1.3, after completing
  >> the edit, my terminal is pleasantly returned to
  >> it's original state.  For example, I can see the
  >> output of the last ls command I ran before running
  >> vi.

  >> Under Solaris 2.4, the text previously on the terminal
  >> is gone and I see part of the file I was editing instead.
  >> I find this horrible, and in fact it effectively eliminates
  >> the value of the scrollbar on my xterms.

  >> This definitely seems to be a problem with vi (or the curses
  >> library or something) because when rlogin'd to a SunOS
  >> machine from my Solaris machine, vi works as desired.
  >> It doesn't seem to be related to the terminal program, as
  >> the behavior is the same under xterm or shelltool.

  Tony> No, I don't think so.  xterm should be like vt220 (or is it vt102 -
  Tony> can't recall for certain now) in that it can save and restore parts of
  Tony> the screen.  It's a term problem, not one with vi (or curses).

  >> Anyone know why this is, or better yet what I can do to
  >> get the SunOS behavior under Solaris.

  Tony> Not too sure, but try asking this question in comp.terminals, as the
  Tony> gurus there might be able to point you in the right direction.

When we moved from SunOS to Solaris, I noticed the new behavior.  I
found a terminfo description with the missing "smcup" and "rmcup"
entries.  Using that description instead of the default one gave us
back the "restoring" behavior.

Here is the "xterm" description I've been using:

xterm|vs100|xterm terminal emulator,
        am, eslok, hs, km, mir, msgr, xenl,
        cols#80, it#8, lines#65,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m$<2>, bold=\E[1m, clear=\E[H\E[2J,
        cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\b,
        cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
        dsl=\E[?E, ed=\E[J, el=\E[K, el1=\E[1K$<3>,
        enacs=\E(B\E)0, fsl=\E[?F, home=\E[H, ht=\t, hts=\EH,

        ind=\n, ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=\b,
        kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB,
        kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, kf1=\EOP,
        kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt,
        kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8,
        rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E[2J\E[?47l\E8,
        rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, sc=\E7,
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t^N%e^O%;,
        sgr0=\E[m, smacs=^N, smcup=\E7\E[?47h, smkx=\E[?1h\E=,
        smso=\E[7m, smul=\E[4m, tbc=\E[3g,
        tsl=\E[?E\E[?%i%p1%dT,

 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by Simon Ashfo » Sat, 03 Feb 1996 04:00:00




>: The terminfo definition being used apparently is missing the \e[?47h
>: and \e[?47l escape sequences from the initialization and reset
>: strings... They should go into is3 and rs3, I suppose... Or each into
>: one of the other levels of initialization and resetting.

>: Oh yes, these sequences mean "use alternate screen buffer" and
>: "use main screen buffer".

>I think that they should be in the 'smcup' and 'rmcup' strings.   These
>strings should be output by an application at screen initialiazation and
>termination which wishes to use the cursor positioning capability 'cup'.

I fixed this by running "captoinfo" and "tic" on a SunOS 4.1.3 machine
to create a new terminfo file, then copying this file to the appropriate
place in /usr/share/lib/terminfo on the Solaris machine. It seems to
work OK.

You need the SysV package installed on the SunOS machine to do this
(the commands are in /usr/5bin).

--

Open Sytems Group,                    Tel: +44 (0)181 943 7032
CISE, National Physical Laboratory,   Fax: +44 (0)181 977 7091
Teddington, Middlesex, UK. TW11 0LW   WWW: http://www.npl.co.uk/npl/ditc/

 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by Michael Bennet » Wed, 07 Feb 1996 04:00:00



>                                         I'd like to ask a
> related question about terminal configuration on Sun systems
> (both SunOS and Solaris).  It seems that whenever the scrollbar
> is active, programs are unable to send out escape sequences to
> modify the contents of the screen.  For example, when using
> tcsh with scrolling enabled, it is seemingly impossible to
> use the up/down arrow keys to recall previous commands.  Also,
> when the scrollbar is active, and I use less to view a file
> that happens to be smaller than a screenful, the whole file
> flips by instantly and then is immediately erased.  Is there
> some configuration trick that will allow simultaneously having
> the scrollbar active and allowing programs to send out escape
> codes to edit the text on the screen?  Having such a capability
> would make the scrollbar much more useful than it currently is.

As another reply pointed out cmdtool has some nice features
that break a lot of other things.  If you use xterm (with
or without a scroll bar) all these features work fine.  Note
that you can also use ^P/^N in place of up/down arrows in tcsh,
as well as whatever up/down line commands supported by the
editor your emulating (emacs or vi).  This feature, as well
as file completion works better in xterm as well.

You can still get programs confused about the size of your terminal
with xterm, particularly after a telnet.  eval `resize` works
on a lot of systems to correct this.  I don't know about less -
I've hardly used it.  I almost never use more any more either -
my xterm scroll bar works! (more or less :)

 
 
 

vi doesn't restore the terminal (text) in Solaris 2.4

Post by The Pumpkin Ki » Wed, 14 Feb 1996 04:00:00



:  

: >                                         I'd like to ask a
: > related question about terminal configuration on Sun systems
: > (both SunOS and Solaris).  It seems that whenever the scrollbar
: > is active, programs are unable to send out escape sequences to
: > modify the contents of the screen.  For example, when using
: > tcsh with scrolling enabled, it is seemingly impossible to
: > use the up/down arrow keys to recall previous commands.  Also,
: > when the scrollbar is active, and I use less to view a file
: > that happens to be smaller than a screenful, the whole file
: > flips by instantly and then is immediately erased.  Is there
: > some configuration trick that will allow simultaneously having
: > the scrollbar active and allowing programs to send out escape
: > codes to edit the text on the screen?  Having such a capability
: > would make the scrollbar much more useful than it currently is.

One possible problem is that you do not have any setting for the ROWS
environment variables. For Default 24 try 'set term=xterm' or if nothing else
set term=vt100

Hope this helps.

/***********************************************************************/
Just Call me Swifty Yar!!!        http://pace1.cts.mtu.edu:8080/MyHome.html
C.T.S Consultant.                 http://pace1.cts.mtu.edu:8080/Consul.html
Intl. Students Association.       http://pace1.cts.mtu.edu:8080/Intl.html
      President.                                
/***********************************************************************/

 
 
 

1. VI doesn't restore window buffer contents on Solaris 2.5.1 using CDE

I have a user who is used to the bahaviour of vi under SunOS in an
Xterm. Upon exiting vi the contents of the window in which vi was
started were properly restored so that scrolling back allowed access
to the information on the screen prior to starting vi. Using vi
under Solaris the contents of the screen buffer are not properly
restored. This doesn't sound like a big problem but for this particular
user it is. I have no idea on how to fix this. Can you please email
suggestions.

Thanks
Axel

2. Towitoko chipdrive problem

3. xterm doesn't restore screen after vi or less

4. No libXt.so.6 ????

5. Text mode doesn't restore properly when exiting X.

6. Sendmail deamon

7. Xfree86 4.1 doesn't restore text console

8. performance tuning

9. Why doesn't echo "text" 'command' "more text" work?

10. PROBLEM: my Aviator Webgear 2.4 doesn't work with kernel version 2.4.x

11. Solaris 2.4 x86 Install - Doesn't recognize CD

12. Solaris 2.4 chmod on /home directory doesn't work