ANSI escape sequence and XTerm

ANSI escape sequence and XTerm

Post by Bryan Cha » Sun, 25 Jan 1998 04:00:00



Hi,

Does anybody know if there is an escape sequence that will make XTerm
save the current cursor position, and restore it after re-positioning
the cursor and printing something?

While re-positioning works, I have not been able to use the ANSI
sequences "\1b[s" and "\1b[u" to save and restore cursor positions.

Thanks in advance,
Bryan Chan______________________________________________________________


              http://www-ug.eecg.toronto.edu/~chanb/

 
 
 

ANSI escape sequence and XTerm

Post by Bryan Cha » Sun, 25 Jan 1998 04:00:00



> While re-positioning works, I have not been able to use the ANSI
> sequences "\1b[s" and "\1b[u" to save and restore cursor positions.

To clarify this a little: I also tried the "\1b7" and "\1b8" sequences,
and have checked /etc/termcap to make sure that these are the right
sequences to do what I want (according to what little I have learned
from the termcap man page). But still no joy. Any clue?

Bryan Chan______________________________________________________________


              http://www-ug.eecg.toronto.edu/~chanb/

 
 
 

ANSI escape sequence and XTerm

Post by T.E.Dicke » Sun, 25 Jan 1998 04:00:00



:> While re-positioning works, I have not been able to use the ANSI
:> sequences "\1b[s" and "\1b[u" to save and restore cursor positions.
those aren't ANSI sequences for save/restore cursor
(nor, actually are \E7 and \E8, though they are VT100
compatible - and xterm supports them - that's probably what you mean).

perhaps another application also is saving the cursor in between your
save/restore (they are commonly used in terminal initialization sequences)

: To clarify this a little: I also tried the "\1b7" and "\1b8" sequences,
: and have checked /etc/termcap to make sure that these are the right
: sequences to do what I want (according to what little I have learned
: from the termcap man page). But still no joy. Any clue?

--
Thomas E.*ey

http://www.veryComputer.com/

 
 
 

ANSI escape sequence and XTerm

Post by Luc Richard » Thu, 29 Jan 1998 04:00:00




> :> While re-positioning works, I have not been able to use the ANSI
> :> sequences "\1b[s" and "\1b[u" to save and restore cursor positions.

I may be barking up the wrong tree here, however, isn't "\1b" wrong?I thought
it was octal not hex.
BTW: I tried both "\E7","\E8" and "\E[s","\E[u" and they both work on my
Xterm.

Maybee  you should try something like
    $ echo "\033[s"
or even
    $ echo -e "\033[s"
if the other echo command gives you \033[s.

  vcard.vcf
< 1K Download
 
 
 

ANSI escape sequence and XTerm

Post by Paul-Emile Gaude » Fri, 30 Jan 1998 04:00:00





> > :> While re-positioning works, I have not been able to use the ANSI
> > :> sequences "\1b[s" and "\1b[u" to save and restore cursor positions.

> I may be barking up the wrong tree here, however, isn't "\1b" wrong?I thought
> it was octal not hex.
> BTW: I tried both "\E7","\E8" and "\E[s","\E[u" and they both work on my
> Xterm.

> Maybee  you should try something like
>     $ echo "\033[s"
> or even
>     $ echo -e "\033[s"
> if the other echo command gives you \033[s.

>   ------------------------------------------------------------------------


>   Luc Richards

>                              HTML Mail
>   101 Miller St              Work: +61-2934 26069
>   North Sydney               Fax: +61-2934 27566
>   New South Wales            Netscape Conference Address
>   2xxx                       Hostname or IP Address
>   Australia                  161.43.36.241
>   The guy that once looked like a long haired hippy. Now he looks like a theif.
>   Additional Information:
>   Last Name    Richards
>   First Name   Luc
>   Version      2.1

 The standard xterm might not do it... There is an ansi_xterm somewhere
(sunsite.unc.edu possibly) that is supposed to emulate an ansi terminal.

--
Today's signature brought to you by UNIX fortune:
-------------------------------------------------
Excess on occasion is exhilarating.  It prevents moderation from
acquiring the deadening effect of a habit.
                -- W. Somerset Maugham

 
 
 

ANSI escape sequence and XTerm

Post by T.E.Dicke » Fri, 30 Jan 1998 04:00:00




:> :> While re-positioning works, I have not been able to use the ANSI
:> :> sequences "\1b[s" and "\1b[u" to save and restore cursor positions.

: I may be barking up the wrong tree here, however, isn't "\1b" wrong?I thought
: it was octal not hex.
I was puzzled here also - but let it pass in case he's using a shell that
is unfamiliar to me (I don't do things like that in shell because it's not
portable enough for my tastes).

: BTW: I tried both "\E7","\E8" and "\E[s","\E[u" and they both work on my
: Xterm.

: Maybee  you should try something like
:     $ echo "\033[s"
: or even
:     $ echo -e "\033[s"
: if the other echo command gives you \033[s.

--
Thomas E.*ey

http://www.veryComputer.com/

 
 
 

ANSI escape sequence and XTerm

Post by T.E.Dicke » Fri, 30 Jan 1998 04:00:00




:> > :> While re-positioning works, I have not been able to use the ANSI
:> > :> sequences "\1b[s" and "\1b[u" to save and restore cursor positions.
:> I may be barking up the wrong tree here, however, isn't "\1b" wrong?I thought
:> it was octal not hex.
:> BTW: I tried both "\E7","\E8" and "\E[s","\E[u" and they both work on my
:> Xterm.
:>
:> Maybee  you should try something like
:>     $ echo "\033[s"
:> or even
:>     $ echo -e "\033[s"
:> if the other echo command gives you \033[s.

:  The standard xterm might not do it... There is an ansi_xterm somewhere
: (sunsite.unc.edu possibly) that is supposed to emulate an ansi terminal.
no.  the standard (X Consortium) version does indeed support save/restore
for the cursor.  The ansi_xterm is named that for other reasons.

The XFree86 3.3 xterm supports ANSI color and VT220 emulation
There's an faq at
        http://www.veryComputer.com/

--
Thomas E.*ey

http://www.veryComputer.com/

 
 
 

ANSI escape sequence and XTerm

Post by Bryan Cha » Sat, 31 Jan 1998 04:00:00



> : I may be barking up the wrong tree here, however, isn't "\1b" wrong?I
> : thought it was octal not hex.
> I was puzzled here also - but let it pass in case he's using a shell that
> is unfamiliar to me (I don't do things like that in shell because it's not
> portable enough for my tastes).

Actually, I am doing it in PERL, and am using "\x1b" for the escape
character. For some reason beyond me, I had left out all the x's. Sorry
for the confusion. BTW it still isn't working. Perhaps PERL is doing
something funny. Perhaps I should use C instead...

Bryan Chan______________________________________________________________


              http://www-ug.eecg.toronto.edu/~chanb/

 
 
 

1. JED: Keyboard sending ANSI escape sequences?


        The console doesn't emulate anything in particular actually.
        It can, however, emulate a wide variety of things which just
        happens to include DEC terminals.

--

      Novice end users deserve better than a               |||
        random collection of spare parts optimized        / | \
        for cost rather than ease...

                In search of sane PPP Docs? Try http://penguin.lvcm.com

2. intel 845ge Chipset &Adaptec scsi controller on redhat adv.Server 2.1

3. How to get vi or vim to interpret Ansi escape sequences

4. Question about ftp

5. Problems with ansi escape sequences

6. ISAPNP modem error

7. dark colors in ANSI Escape Sequences

8. JRE plugin in mozilla browser

9. ANSI-escape sequences in csh shell

10. $prompt in csh - ansi escape sequences not interpreted

11. Using ANSI escape sequences in your prompt

12. Ansi escape sequences

13. ANSI Escape Sequences