Information on Codes that Control the "xterm" application of X Windows

 <>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>

Newsgroups: comp.terminals
Path: cs.utk.edu!stc06.CTD.ORNL.GOV!fnnews.fnal.gov!uwm.edu!spool.mu.edu
      !howland.reston.ans.net!news.sprintlink.net!wizard.pn.com
      !satisfied.elf.com!news.mathworks.com!uhog.mit.edu!bloom-beacon.mit.edu
      !senator-bedfellow.mit.edu!athena.mit.edu!igorlord
Organization: Massachusetts Institute of Technology
Message-ID: <3hh0bo$p4q@senator-bedfellow.MIT.EDU>
References: <1995Feb6.083403@btmp7u.be>
Date: 11 Feb 1995 00:28:40 GMT
From: igorlord@athena.mit.edu (Igor Lyubashevskiy)
Subject: Re: (Wanted) VT102 info

In article <1995Feb6.083403@btmp7u.be>, sdas@sh.bel.alcatel.be
   (Sanjay Dasgupta SH33 9639) writes:
|> 
|> Years after throwing away my vt10x documentation, I am 
|> working on an appliction that requires that knowledge again.
|> 
|> Does anyone still have a quick summary of the escape 
|> sequences for a VT102 (actually it is a  'xterm' terminal 
|> emulator on a X-terminal connected to a Sun SPARC)
|> 
|> I am specially interested in the stuff that allows 
|> the host to query the terminal (cursor position, screen
|> size, ...).  
|> 
|> Being able to read back the entire screen (VT 30 HS style)
|> is what is really needed, but a VT102 does not do that,
|> so I'll have to find a work around.
|> 
|> Thanks in advance for any help. 
|> 
|> Preferably please mail responses to : sdas@sh.bel.alcatel.be


From: crdgw1!montnaro@uunet.uu.net  (Skip Montanaro)
Organization: GE Corporate Research & Development, Schenectady, NY
Subject: XTerm Escape Sequences (X11 Version)
To: xpert@expo.lcs.mit.edu

I rummaged around through the xterm code and came up with the following
stuff. No guarantees. I'm headed out of town for a couple days and thought
it better to get it out than let it get stale. Comments, bugs, and other
notes are welcome. Somebody else can convert it to troff. I prefer LaTeX.
:-) I will try and get to the Tek mode stuff when I return, although I doubt
it's changed much from X10 XTerm.

I gleaned the basic stuff out of the charproc.c code, by hacking VTparse()
so it spit out leaves of the parse tree. I was mildly surprised to see
things like "ESC # BEL" turn up.

For most folks, the most interesting stuff will probably be "ESC ] Ps ND
string NP" down near the bottom. That's what you use to change the icon and
window labels, and the log file name. Most other things appear the same as
the X10 documentation, although a few DEC-ish mode parameters (42, 43, 48, &
49) seem to have disappeared.

------------------------------------------------------------------------------
BEL             Bell (Ctrl-G)
BS              Backspace (Ctrl-H)
HT              Horizontal Tab (Ctrl-I)
NL              Line Feed or New Line (Ctrl-J)
VT              Vertical Tab (Ctrl-K)
NP              Form Feed or New Page (Ctrl-L)
CR              Carriage Return (Ctrl-M)
SO              Shift Out (Ctrl-N) -> Switch to Alternate Character Set
SI              Shift In (Ctrl-O) -> Switch to Standard Character Set
ESC BEL         (Same as non-escaped BEL)
ESC BS          (Same as non-escaped BS)
ESC HT          (Same as non-escaped HT)
ESC NL          (Same as non-escaped NL)
ESC VT          (Same as non-escaped VT)
ESC NP          (Same as non-escaped NP)
ESC CR          (Same as non-escaped CR)
ESC SO          (Same as non-escaped SO)
ESC SI          (Same as non-escaped SI)
ESC # BEL       (Same as non-escaped BEL)
ESC # BS        (Same as non-escaped BS)
ESC # HT        (Same as non-escaped HT)
ESC # NL        (Same as non-escaped NL)
ESC # VT        (Same as non-escaped VT)
ESC # NP        (Same as non-escaped NP)
ESC # CR        (Same as non-escaped CR)
ESC # SO        (Same as non-escaped SO)
ESC # SI        (Same as non-escaped SI)
ESC # 8         DEC Screen Alignment Test (DECALN)
ESC ( BEL       (Same as non-escaped BEL)
ESC ( BS        (Same as non-escaped BS)
ESC ( HT        (Same as non-escaped HT)
ESC ( NL        (Same as non-escaped NL)
ESC ( VT        (Same as non-escaped VT)
ESC ( NP        (Same as non-escaped NP)
ESC ( CR        (Same as non-escaped CR)
ESC ( SO        (Same as non-escaped SO)
ESC ( SI        (Same as non-escaped SI)
ESC ( C         Select G0 Character Set (SCS)
                C = 0 -> Special Character and Line Drawing Set
                C = 1 -> Alternate Character ROM Standard Set
                C = 2 -> Alternate Character ROM Special Set
                C = A -> United Kingdom (UK)
                C = B -> United States (USASCII)
ESC ) C         Select G1 Character Set (SCS)
                C takes same values as above
ESC * C         Select G2 Character Set (SCS)
                C takes same values as above
ESC + C         Select G3 Character Set (SCS)
                C takes same values as above
ESC 7           Save Cursor (DECSC)
ESC 8           Restore Cursor (DECRC)
ESC =           Application Keypad (DECPAM)
ESC >           Normal Keypad (DECNM)
ESC D           Index (IND)
ESC E           Next Line (NEL)
ESC H           Tab Set (HTS)
ESC M           Reverse Index (RI)
ESC N           Single Shift Select of G2 Character Set (SS2)
ESC O           Single Shift Select of G3 Character Set (SS3)
ESC [ BEL       (Same as non-escaped BEL)
ESC [ BS        (Same as non-escaped BS)
ESC [ HT        (Same as non-escaped HT)
ESC [ NL        (Same as non-escaped NL)
ESC [ VT        (Same as non-escaped VT)
ESC [ NP        (Same as non-escaped NP)
ESC [ CR        (Same as non-escaped CR)
ESC [ SO        (Same as non-escaped SO)
ESC [ SI        (Same as non-escaped SI)
ESC [ ? BEL     (Same as non-escaped BEL)
ESC [ ? BS      (Same as non-escaped BS)
ESC [ ? HT      (Same as non-escaped HT)
ESC [ ? NL      (Same as non-escaped NL)
ESC [ ? VT      (Same as non-escaped VT)
ESC [ ? NP      (Same as non-escaped NP)
ESC [ ? CR      (Same as non-escaped CR)
ESC [ ? SO      (Same as non-escaped SO)
ESC [ ? SI      (Same as non-escaped SI)
ESC [ ? Ps h    DEC Private Mode Set (DECSET)
                Ps = 1 -> Application Cursor Keys (DECCKM)
                Ps = 2 -> Set VT52 Mode
                Ps = 3 -> 132 Column Mode (DECCOLM)
                Ps = 4 -> Smooth (Slow) Scroll (DECSCLM)
                Ps = 5 -> Reverse Video (DECSCNM)
                Ps = 6 -> Origin Mode (DECOM)
                Ps = 7 -> Wraparound Mode (DECAWM)
                Ps = 8 -> Auto-Repeat Keys (DECARM)
                Ps = 9 -> Send MIT Mouse Row & Column on Button
                          Press
                Ps = 38 -> Enter Tektronix Mode (DECTEK)
                Ps = 40 -> Allow 80 <-> 132 Mode
                Ps = 41 -> curses(5) fix
                Ps = 44 -> Turn on Margin Bell
                Ps = 45 -> Reverse-wraparound Mode
                Ps = 46 -> Start Logging
                Ps = 47 -> Use Alternate Screen Buffer
                Ps = 1000 -> xtem bogus sequence (???)
                Ps = 1001 -> xtem sequence w/hilite tracking (???)
ESC [ ? Ps l    DEC Private Mode Reset (DECRST)
                Ps = 1 -> Normal Cursor Keys (DECCKM)
                Ps = 3 -> 80 Column Mode (DECCOLM)
                Ps = 4 -> Jump (Fast) Scroll (DECSCLM)
                Ps = 5 -> Normal Video (DECSCNM)
                Ps = 6 -> Normal Cursor Mode (DECOM)
                Ps = 7 -> No Wraparound Mode (DECAWM)
                Ps = 8 -> No Auto-Repeat Keys (DECARM)
                Ps = 9 -> Don't Send MIT Mouse Row & Column on
                          Button Press
                Ps = 40 -> Don't Allow 80 <-> 132 Mode
                Ps = 41 -> No curses(5) fix
                Ps = 44 -> Turn Off Margin Bell
                Ps = 45 -> No Reverse-wraparound Mode
                Ps = 46 -> Stop Logging
                Ps = 47 -> Use Normal Screen Buffer
                Ps = 1000 -> xtem bogus sequence (???)
                Ps = 1001 -> xtem sequence w/hilite tracking (???)
ESC [ ? Ps r    Restore DEC Private Mode
                Ps = 1 -> Normal/Application Cursor Keys (DECCKM)
                Ps = 3 -> 80/132 Column Mode (DECCOLM)
                Ps = 4 -> Jump (Fast)/Smooth (Slow) Scroll (DECSCLM)
                Ps = 5 -> Normal/Reverse Video (DECSCNM)
                Ps = 6 -> Normal/Origin  Cursor Mode (DECOM)
                Ps = 7 -> No Wraparound/Wraparound Mode (DECAWM)
                Ps = 8 -> Auto-repeat/No Auto-repeat Keys (DECARM)
                Ps = 9 -> Don't Send/Send MIT Mouse Row & Column on
                          Button Press
                Ps = 40 -> Disallow/Allow 80 <-> 132 Mode
                Ps = 41 -> Off/On curses(5) fix
                Ps = 44 -> Turn Off/On Margin Bell
                Ps = 45 -> No Reverse-wraparound/Reverse-wraparound
                           Mode 
                Ps = 46 -> Stop/Start Logging
                Ps = 47 -> Use Normal/Alternate Screen Buffer
                Ps = 1000 -> mouse bogus sequence (???)
                Ps = 1001 -> mouse bogus sequence (???)
ESC [ ? Ps s    Save DEC Private Mode
                        Same P's as Restore DEC Private Mode
ESC [ Ps @      Insert Ps (Blank) Character(s) (default = 1) (ICH)
ESC [ Ps A      Cursor Up Ps Times (default = 1) (CUU)
ESC [ Ps B      Cursor Down Ps Times (default = 1) (CUD)
ESC [ Ps C      Cursor Forward Ps Times (default = 1) (CUF)
ESC [ Ps D      Cursor Backward Ps Times (default = 1) (CUB)
ESC [ Ps ; Ps H Cursor Position [row;column] (default = [1,1]) (CUP)
ESC [ Ps J      Erase in Display
                Ps = 0 -> Clear Below (default)
                Ps = 1 -> Clear Above
                Ps = 2 -> Clear All
ESC [ Ps K      Erase in Line
                Ps = 0 -> Clear to Right (default)
                Ps = 1 -> Clear to Left
                Ps = 2 -> Clear All
ESC [ Ps L      Insert Ps lines (default = 1) (IL)
ESC [ Ps M      Delete Ps lines (default = 1) (DL)
ESC [ Ps P      Delete Ps Characters (default = 1) (DCH)
ESC [ T         Track Mouse (???)
ESC [ Ps c      Device Attributes (DA1)
ESC [ Ps ; Ps f Cursor Position [row;column] (default = [1,1]) (HVP)
ESC [ Ps g      Tab Clear
                Ps = 0 -> Clear Current Column (default)
                Ps = 3 -> Clear All
ESC [ Ps h      Mode Set (SET)
                Ps = 4 -> Insert Mode (IRM)
                Ps = 20 -> Automatic Linefeed (LNM)
ESC [ Ps l      Mode Reset (RST)
                Ps = 4 -> Insert Mode (IRM)
                Ps = 20 -> Automatic Linefeed (LNM)
ESC [ Pm m      Character Attributes (SGR)
                Ps = 0 -> Normal (default)
                Ps = 1 -> Blink (appears as Bold)
                Ps = 4 -> Underscore
                Ps = 5 -> Bold
                Ps = 7 -> Inverse
ESC [ Ps n      Device Status Report (DSR)
                Ps = 5 -> Status Report ESC [ 0 n -> OK
                Ps = 6 -> Report Cursor Position (CPR) [row;column]
                          as ESC [ r ; c R
ESC [ Ps ; Ps r Set Scrolling Region [top;bottom] (default = full size
                of window) (DECSTBM)
ESC [ Ps x      Request Terminal Parameters (DECREQTPARM)
ESC ] Ps ND string NP           OSC Mode
                ND can be any non-digit Character (it's discarded)
                NP can be any non-printing Character (it's discarded)
                string can be any ASCII printable string
                        (max 511 characters)
                Ps = 0 -> use string as a new icon name and title
                Ps = 1 -> use string is a new icon name only
                Ps = 2 -> use string is a new title only
                Ps = 46 -> use string as a new log file name

ESC c           Full Reset
ESC n           Switch to Alternate Character Set LS2
ESC o           Switch to Alternate Character Set LS3
ESC |           Switch to Alternate Graphics(?) Set LS3R
ESC }           Switch to Alternate Graphics(?) Set LS2R
ESC ~           Switch to Alternate Graphics(?) Set LS1R
--



Igor

 <>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>

Article 3601 of comp.terminals:
Path: cs.utk.edu!stc06.CTD.ORNL.GOV!fnnews.fnal.gov!uwm.edu!news.alpha.net!news.mathworks.com!transfer.stratus.com!xylogics.com!Xylogics.COM!carlson
From: carlson@Xylogics.COM (James Carlson)
Newsgroups: comp.terminals
Subject: Re: X11 window title redraw for xterm?
Date: 16 Feb 1995 12:22:12 GMT
Organization: Xylogics Incorporated
Lines: 22
Distribution: world
Message-ID: <3hvg1k$gpt@newhub.xylogics.com>
References: <D405CJ.4Kx@boi.hp.com>
Reply-To: carlson@xylogics.com
NNTP-Posting-Host: newhub.xylogics.com

In article <D405CJ.4Kx@boi.hp.com>, curtisb@gr.hp.com (Curtis Ballard) writes:
|> I have figured out how to change the title of an xterm window, but
|> I can't figure out how to get the title in the X11 border to be redrawn
|> with the new title.  Specifically I am trying to print my current
|> directory and host to the title string when in a shell.  Has anybody
|> had success doing this?  I can get it to work in an hpterm but xterm
|> won't take the same command.

The magic incantation is:

	ESC ] 2 ; <string> BEL

Where ESC is 1B hex, BEL is 07 hex, and <string> is the string you want
to have displayed in the title bar.

I have no idea what kind of madness led to this distinctly non-ANSI
command sequence ...

---
James Carlson <carlson@xylogics.com>            Tel:  +1 617 272 8140
Annex Software Support / Xylogics, Inc.               +1 800 225 3317
53 Third Avenue / Burlington MA  01803-4491     Fax:  +1 617 272 2618


 <>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>

Newsgroups: comp.terminals
Message-ID: <6v0rdt$8vh$1@callisto.clark.net>
References: <xgtemss42wd.fsf@sobhan-pc.eng.fore.com>
Date: 1 Oct 1998 21:15:41 GMT
From: "T.E.Dickey" <dickey@shell.clark.net>
Subject: Re: finding number of lines on an xterm with vt100 emulation

Sobhan K. Padamati <sobhan@fore.com> wrote:
>
> Can anybody tell me the control sequence to get the number of lines on
> an xterm with vt100 emulation?


Not offhand--but the technique is simple:  position the cursor (CUP) to a
very-large position (such as 999,999) and use the cursor-position report
(CPR) to ask where the cursor _really_ is.

(the control sequences are listed in ctlseqs.ms - there's a copy in the
xterm.tar.gz on my web page)

-- 
Thomas E. Dickey
dickey@clark.net
http://www.clark.net/pub/dickey/


 <>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>


Newsgroups: comp.terminals
Message-ID: <93nj7j$add$1@news1.Radix.Net>
References: <93n385$28f0$1@kiosk.rzg.mpg.de>
NNTP-Posting-Host: saltmine.radix.net
Date: 12 Jan 2001 18:42:59 GMT
From: Thomas Dickey <dickey@saltmine.radix.net>
Subject: Re: xterm and escape sequences

Georg.Drenkhahn@epost.de wrote:
> Dear terminal experts,

> I'm a bit confused about the escape sequences generated from xterm and
> their terminfo entries:
>                                        really produced by xterm
> cursor_left=^H      key_left=\EOD      \E[D
> cursor_right=\E[C   key_right=\EOC     \E[C
> cursor_up=\E[A      key_up=\EOA        \E[A
> cursor_down=^J      key_down=\EOB      \E[B

> cursor_home=\E[H    key_home=\EOH      \E[H
>                     key_end=\EOF       \E[F
>
> Xterm generates a `[' instead of an `O'.  The cursor_xxx shouldn have
> anything to do with the codes generated by key strokes, should they?

Actually yes - on many terminals (vt100 especially) the cursor keys were
designed so that the characters that they echo would produce the nominal effect
that a program would use them for.  (If you had a slow terminal connection, I
suppose it could turn on local echo and cut down on a lot of required response
from the host).

> I found this behaviour not only on one platform.  It appears under AIX,
> Sun and Linux.  Is the terminfo file wrong or the xterm program?

the terminfo usually describes the application mode for the control
sequences, while you are looking at what xterm sends in normal mode.
(you can switch between them manually by the middle popup menu)


--
Thomas E. Dickey <dickey@radix.net> <dickey@herndon4.his.com>
http://dickey.his.com/
 ftp://dickey.his.com/

 //////////////////////////////////////////////////////////////////////////////

Newsgroups: comp.terminals
Message-ID: <8843aaec.0401141408.653168cf@posting.google.com>
Date: 14 Jan 2004 14:08:14 -0800
From: Adam Robison <AdamDRobison@yahoo.com>
Subject: How Do I Lower A Xterm VT100 Window With Control Seq.?

Hey,

    I am trying to lower my xterm to the bottom of the stacking order.
I read somewhere that the control seq. is  "CSI 6;6;6t"  but when I
send it (as written) it doesn't work and I don't really know what CSI
is.  Can someone tell me exactly what to type to do this right? I
would be very grateful!

          -Adam

 ..............................................................................

Newsgroups: comp.terminals
References: <8843aaec.0401141408.653168cf@posting.google.com>
Message-ID: <Pine.LNX.4.44.0401141526090.28017-100000@localhost.localdomain>
Date: Wed, 14 Jan 2004 22:29:39 GMT
From: Rob Brown <mylastname@gmcl.com>
Subject: Re: How Do I Lower A Xterm VT100 Window With Control Seq.?

On 14 Jan 2004, Adam Robison wrote:

>     I am trying to lower my xterm to the bottom of the stacking order.
> I read somewhere that the control seq. is  "CSI 6;6;6t"  but when I
> send it (as written) it doesn't work and I don't really know what CSI
> is.  Can someone tell me exactly what to type to do this right? I
> would be very grateful!

In an 8-bit environment, <CSI> is 0x9b.

In a 7-bit environment, <csi> is <ESC>[ (in other words 0x1b 0x5b).

 ..............................................................................

Newsgroups: comp.terminals
References: <8843aaec.0401141408.653168cf@posting.google.com>
Message-ID: <100bj3k4nkq3nf2@corp.supernews.com>
Date: Wed, 14 Jan 2004 23:10:44 -0000
From: Thomas Dickey <dickey@saltmine.radix.net>
Subject: Re: How Do I Lower A Xterm VT100 Window With Control Seq.?

Adam Robison <AdamDRobison@yahoo.com> wrote:
>
> I am trying to lower my xterm to the bottom of the stacking order.
> I read somewhere that the control seq. is  "CSI 6;6;6t"  but when I
> send it (as written) it doesn't work and I don't really know what CSI
> is.  Can someone tell me exactly what to type to do this right? I
> would be very grateful!

actually

        CSI 6 t

is sufficient.  See
        ftp://invisible-island.net/xterm/ctlseqs.txt.gz

in the proper context only the controls dealing with window size use 3 params.

-- 
Thomas E. Dickey
http://invisible-island.net/
 ftp://invisible-island.net/

 //////////////////////////////////////////////////////////////////////////////

Newsgroups: comp.unix.solaris
NNTP-Posting-Host: 47.234.0.53
NNTP-Posting-Date: Sat, 17 Mar 2007 14:36:04 +0000 (UTC)
Message-ID: <1174142162.454697.19470@l77g2000hsb.googlegroups.com>
Date: 17 Mar 2007 07:36:02 -0700
From: kimi <testcpp@gmail.com>
Subject: Stopping xterm from highlighting all text in vi

Hi,

I am still somewhat new to Solaris and xterm in general and have been
running in to an issue where if I use an xterm window with a specific
colour (for example, alias sgreen='xterm -bg black -fg green -ut +vb -
T "kimi" &') then I'll start editing files and then a few minutes in
all the text will start to get highlighted in green, for instance.  If
I exit vi the highlighting in still there.

By highlighting, I am referring to, in this case, that as I'm editing
in vi, the background will stay black (as specified above) but that the
prompt and then anything I type in will be highlighted in green.  If I
exit out of vi, then the highlighting continues.  If I change shells
and run a command, it stops.

Is there a workaround for this?  I've played in the -ah and +ah
settings and checked out the man page for xterm and for vi, but can't
find a work around.  This only happens if I use xterm and start vi.
If I use xterm but not vi then it's correct.

Is there some type of workaround for this?

Regards,

Kim

 ..............................................................................

Newsgroups: comp.unix.solaris
References: <1174142162.454697.19470@l77g2000hsb.googlegroups.com>
Message-ID: <12vof3shvrshdfe@corp.supernews.com>
Date: Sat, 17 Mar 2007 19:07:40 -0000
From: Thomas Dickey <dickey@saltmine.radix.net>
Subject: Re: Stopping xterm from highlighting all text in vi

kimi <testcpp@gmail.com> wrote:
>
> Hi,
> I am still somewhat new to Solaris and xterm in general and have been
...
> Is there a workaround for this?  I've played in the -ah and +ah
> settings and checked out the man page for xterm and for vi, but can't
> find a work around.  This only happens if I use xterm and start vi.
> If I use xterm but not vi then it's correct.


Which version of xterm is that, and what is $TERM set to (and infocmp shows)?

Solaris has more than one version of xterm (the one I maintain will
list a version number for "xterm -v").  The reference to -ah/+ah
hints at that.

-- 
Thomas E. Dickey
http://invisible-island.net/
 ftp://invisible-island.net/

 ..............................................................................

Newsgroups: comp.unix.solaris
NNTP-Posting-Host: 65.96.244.124
NNTP-Posting-Date: Sun, 18 Mar 2007 00:29:00 +0000 (UTC)
References: <1174142162.454697.19470@l77g2000hsb.googlegroups.com>
    <12vof3shvrshdfe@corp.supernews.com>
Message-ID: <1174177739.264328.286600@l77g2000hsb.googlegroups.com>
Organization: http://groups.google.com
Date: 17 Mar 2007 17:28:59 -0700
From: kimi <testcpp@gmail.com>
Subject: Re: Stopping xterm from highlighting all text in vi

On Mar 17, 3:07 pm, Thomas Dickey <dic...@saltmine.radix.net> wrote:
>
> Which version of xterm is that, and what is $TERM set to (and infocmp shows)?
>
> Solaris has more than one version of xterm (the one I maintain will
> list a version number for "xterm -v").  The reference to -ah/+ah
> hints at that.

Thank you Thomas

Answers:

> Which version of xterm is that, and what is $TERM set to (and infocmp shows)?

Not sure the version of xterm, a 'whatis' xterm doesn't work.

echo $TERM

vt100

infocmp:
#       Reconstructed via infocmp from file: /usr/global/share/terminfo/v/vt100
vt100|vt100-am|dec vt100 (w/advanced video),
        am, msgr, xenl, xon,
        cols#80, it#8, lines#24, vt#3,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>,
        clear=\E[H\E[J$<50>, cr=^M, csr=\E[%i%p1%d;%p2%dr,
        cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J,
        cuf=\E[%p1%dC, cuf1=\E[C$<2>,
        cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA,
        cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>,
        enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=^J, ka1=\EOq,
        ka3=\EOs, kb2=\EOr, kbs=^H, 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$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l,
        rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>,
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=,
        smso=\E[7m$<2>, smul=\E[4m$<2>, tbc=\E[3g,

...and Solaris 5.8.

 ..............................................................................


Newsgroups: comp.unix.solaris
References: <1174142162.454697.19470@l77g2000hsb.googlegroups.com>
    <12vof3shvrshdfe@corp.supernews.com>
    <1174177739.264328.286600@l77g2000hsb.googlegroups.com>
Message-ID: <12vq6eb32tgegc5@corp.supernews.com>
Date: Sun, 18 Mar 2007 10:51:55 -0000
From: Thomas Dickey <dickey@saltmine.radix.net>
Subject: Re: Stopping xterm from highlighting all text in vi

>> Solaris has more than one version of xterm (the one I maintain will
>> list a version number for "xterm -v").  The reference to -ah/+ah
>> hints at that.

>> Which version of xterm is that, and what is $TERM set to (and infocmp shows)?
>
> Not sure the version of xterm, a 'whatis' xterm doesn't work.


I had in mind "xterm -v", which is an abbreviation for -version, e.g.,

     -version
             This causes xterm to print a version number  to  the
             standard output.

Sun's xterm doesn't have that option.

> echo $TERM
> vt100
> infocmp:
> #       Reconstructed via infocmp from file: /usr/global/share/terminfo/v/vt100
> vt100|vt100-am|dec vt100 (w/advanced video),

...


The only odd thing there is the /usr/global/share (I'd expect just /usr/share).
Perhaps it's been customized.  I'm not sure whether "vi" in this case is

        /usr/bin/vi

or something like

        /opt/sfw/bin/vim

In either case, "vi" shouldn't be changing the video attributes.

vim may do this--and, if you have it set internally to some terminal
type which does not match the actual xterm type, it could decide to
use SGR 22 to reset the reverse video.

That won't work with Sun's xterm, and would produce the effect you are
describing.

> ...and Solaris 5.8.


-- 
Thomas E. Dickey
http://invisible-island.net/
 ftp://invisible-island.net/


 //////////////////////////////////////////////////////////////////////////////

