screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Screen, xterm, initialization strings.


From: Micah Cowan
Subject: Screen, xterm, initialization strings.
Date: Sun, 10 Aug 2008 19:42:22 -0700
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So, the other day, I suddenly found that screen was no longer using the
alternate screen buffer as it usually does. Worse, screen _thought_ it
was operating under the alternate screen buffer, so left a dirty screen
upon exit. Thinking it was a recently-introduced but, I spent pretty
much the whole day tracking down the problem, which turned out to be
that after blowing away /opt/screen and reinstalling, I neglected to
copy etcscreenrc to /opt/screen/etc/screenrc, which has the following:

  # Long time I had this in my private screenrc file. But many people
  # seem to want it (jw):
  # we do not want the width to change to 80 characters on startup:
  # on suns, /etc/termcap has :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l:
  termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
  terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'

I use gnome-terminal (which advertises as xterm), which has the
following ("is2" is terminfo for termcap's "is"):

  $ tput is2 | cat -v; echo
  ^[[!p^[[?3;4l^[[4l^[>

Note the initial ^[[!p, which is the sequence for DECSTR, the soft
reset. In vte (gnome-terminal, xfce4-terminal), this has the effect
(among others), of bringing the terminal back into the normal screen
buffer. (Ironically, it does not have this effect in an actual xterm.)

My question is: is screen even right to issue the initialization string,
at all? And particularly _after_ issuing smkx. My understanding is that
is2 and friends should be sent on user login. One could, perhaps, argue
that using screen _does_ amount to a login of sorts; but considering
that nowhere else does one find it issued _after_ entering application
keypad mode (which it could reasonably be expected to reverse, alternate
buffer or no), and that terminfo(5) specifically states that it would
normally set 80-column mode (which, according to the comment above, we'd
want to avoid)... it seems extremely likely to me that issuing the init
string gives a lot more potential for causing problems than solving
them. Sure, we can just go on entering custom termcap settings in
screenrc whenever we encounter a problem, but should that really be the
answer?

I propose that screen not send the initialization string. Probably with
a command-line option that specifies it should be sent (though, IMO it
should be sent before smkx, and not after). Any thoughts on this?

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
GNU Maintainer: wget, screen, teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIn6cO7M8hyUobTrERAuvjAKCKdbpa+0NBOVbmQ/4SLhk7RxiJGgCbB02A
wFe59NjoMLRcVvl8wsMSJjs=
=o31k
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]