Xterm - Turning off the cursor highlighting - Xwindows

This is a discussion on Xterm - Turning off the cursor highlighting - Xwindows ; I'm playing with "spinner" script for a wait cursor for my shell scripts; when it runs, the cursor area is highlighted (ie, it's reverse video on my xterm). I'd like to turn off the highlighting so that the spinner shows ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: Xterm - Turning off the cursor highlighting

  1. Xterm - Turning off the cursor highlighting

    I'm playing with "spinner" script for a wait cursor for my shell scripts; when it runs, the cursor area is highlighted (ie, it's reverse video on my xterm). I'd like to turn off the highlighting so that the spinner shows in "normal" video.

    The script currently does this:

    state=0
    while [ 1 ]
    do
    case \$state in
    0) echo "|\b\c"
    state=1;;
    1) echo "/\b\c"
    state=2;;
    2) echo "-\b\c"
    state=3;;
    3) echo "\\\" "\b\b\c"
    state=0;;
    esac
    usleep 0.3
    done

    usleep is the gnu shellutils sleep which accepts fractions of a second.

    A look through various man pages (tput, stty, terminfo, etc) and the shell FAQ didn't turn up anything (or at least anything that worked :-).

    I did try these three variations on the echo command with no success:

    echo `tput chts` "..."
    echo `tput civis` "..."
    echo "[0m....."

    Any suggestions are appreciated!

    Dan





  2. Re: Xterm - Turning off the cursor highlighting

    Daniel Rawson, le Wed 08 Mar 2006 13:31:46 -0500, a écrit :
    > I did try these three variations on the echo command with no success:
    >
    > echo `tput chts` "..."
    > echo `tput civis` "..."
    > echo "[0m....."


    Just call

    tput civis

    It should be sufficient.

  3. Re: Xterm - Turning off the cursor highlighting

    Samuel Thibault wrote:
    > Daniel Rawson, le Wed 08 Mar 2006 13:31:46 -0500, a écrit :
    >
    >>I did try these three variations on the echo command with no success:
    >>
    >>echo `tput chts` "..."
    >>echo `tput civis` "..."
    >>echo "[0m....."

    >
    >
    > Just call
    >
    > tput civis
    >
    > It should be sufficient.


    Doesn't seem to do it . . . . I tried unsetting PS1 to see if that would help, but no dice.

    :-((

    Thanks!

    Dan

  4. Re: Xterm - Turning off the cursor highlighting

    Daniel Rawson writes:

    > Samuel Thibault wrote:
    >> Daniel Rawson, le Wed 08 Mar 2006 13:31:46 -0500, a écrit :
    >>
    >>>I did try these three variations on the echo command with no success:
    >>>
    >>>echo `tput chts` "..."
    >>>echo `tput civis` "..."
    >>>echo "[0m....."

    >> Just call
    >> tput civis
    >> It should be sufficient.

    >
    > Doesn't seem to do it . . . . I tried unsetting PS1 to see if that
    > would help, but no dice. :-((


    Works for me.

    I tried with rxvt and the xterm from Xorg 6.8.2.
    In both cases the keyboard cursor vanished.

    Take a look at what $TERM is set to.

  5. Re: Xterm - Turning off the cursor highlighting

    Dan Espen wrote:
    > Daniel Rawson writes:
    >
    >
    >>Samuel Thibault wrote:
    >>
    >>>Daniel Rawson, le Wed 08 Mar 2006 13:31:46 -0500, a écrit :
    >>>
    >>>
    >>>>I did try these three variations on the echo command with no success:
    >>>>
    >>>>echo `tput chts` "..."
    >>>>echo `tput civis` "..."
    >>>>echo "[0m....."
    >>>
    >>>Just call
    >>>tput civis
    >>>It should be sufficient.

    >>
    >>Doesn't seem to do it . . . . I tried unsetting PS1 to see if that
    >>would help, but no dice. :-((

    >
    >
    > Works for me.
    >
    > I tried with rxvt and the xterm from Xorg 6.8.2.
    > In both cases the keyboard cursor vanished.
    >
    > Take a look at what $TERM is set to.

    Hmm . . . TERM=xterm

    Two possibilities:
    1. Something peculiar to Solaris 8 and 10 xterm
    2. (most likely): I didn't understand how to use tput :-)

    When I was testing, I modified my script to do:

    tput civis
    echo ...
    echo ...
    echo ...

    etc.

    I'll try re-building xterm from a recent Xorg release and see if that fixes it.

    Dan

  6. Re: Xterm - Turning off the cursor highlighting

    Daniel Rawson writes:

    > Dan Espen wrote:
    >> Daniel Rawson writes:
    >>
    >>>Samuel Thibault wrote:
    >>>
    >>>>Daniel Rawson, le Wed 08 Mar 2006 13:31:46 -0500, a écrit :
    >>>>
    >>>>
    >>>>>I did try these three variations on the echo command with no success:
    >>>>>
    >>>>>echo `tput chts` "..."
    >>>>>echo `tput civis` "..."
    >>>>>echo "[0m....."
    >>>>
    >>>>Just call
    >>>>tput civis
    >>>>It should be sufficient.
    >>>
    >>>Doesn't seem to do it . . . . I tried unsetting PS1 to see if that
    >>>would help, but no dice. :-((

    >> Works for me.
    >> I tried with rxvt and the xterm from Xorg 6.8.2.
    >> In both cases the keyboard cursor vanished.
    >> Take a look at what $TERM is set to.

    > Hmm . . . TERM=xterm
    >
    > Two possibilities:
    > 1. Something peculiar to Solaris 8 and 10 xterm
    > 2. (most likely): I didn't understand how to use tput :-)
    >
    > When I was testing, I modified my script to do:
    >
    > tput civis
    > echo ...
    > echo ...
    > echo ...
    >
    > etc.
    >
    > I'll try re-building xterm from a recent Xorg release and see if that fixes it.


    I just tried myself using Solaris 8 xterm.
    Doesn't work for me either.
    I then captured the civis output from a Linux machine
    and tried using it on the Solaris xterm, still no good.

    I think rebuilding a current xterm will probably do it.

  7. Re: Xterm - Turning off the cursor highlighting

    Dan Espen wrote:
    >> I'll try re-building xterm from a recent Xorg release and see if that fixes it.


    > I just tried myself using Solaris 8 xterm.
    > Doesn't work for me either.
    > I then captured the civis output from a Linux machine
    > and tried using it on the Solaris xterm, still no good.


    > I think rebuilding a current xterm will probably do it.


    "current" xterm is supposedly available for Solaris (though I don't keep
    track of that). The escape happens to be the same as Linux console
    since it's derived from vt320 (ten years ago - according to my changelog
    - Linux changelogs tend to be as scarce as usable release notes for
    Solaris).

    xterm supports ANSI color, VT220 emulation and UTF-8
    There's an faq at
    http://invisible-island.net/xterm/xterm.faq.html
    ftp://invisible-island.net/xterm/

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

  8. Re: Xterm - Turning off the cursor highlighting

    Thomas Dickey wrote:
    > Dan Espen wrote:
    >
    >>>I'll try re-building xterm from a recent Xorg release and see if that fixes it.

    >
    >
    >>I just tried myself using Solaris 8 xterm.
    >>Doesn't work for me either.
    >>I then captured the civis output from a Linux machine
    >>and tried using it on the Solaris xterm, still no good.

    >
    >
    >>I think rebuilding a current xterm will probably do it.

    >
    >
    > "current" xterm is supposedly available for Solaris (though I don't keep
    > track of that). The escape happens to be the same as Linux console
    > since it's derived from vt320 (ten years ago - according to my changelog
    > - Linux changelogs tend to be as scarce as usable release notes for
    > Solaris).
    >
    > xterm supports ANSI color, VT220 emulation and UTF-8
    > There's an faq at
    > http://invisible-island.net/xterm/xterm.faq.html
    > ftp://invisible-island.net/xterm/
    >

    I just (finally) had a chance to try this; rebuilding ONLY the xterm binary did NOT fix this; obviously it's still loading code from /usr/lib/libX* . . . . :-( and the curses code from /usr/lib/libcurses.*

    Dan

  9. Re: Xterm - Turning off the cursor highlighting

    Daniel Rawson writes:

    > Thomas Dickey wrote:
    >> Dan Espen wrote:
    >>
    >>>>I'll try re-building xterm from a recent Xorg release and see if that fixes it.

    >>
    >>>I just tried myself using Solaris 8 xterm.
    >>>Doesn't work for me either.
    >>>I then captured the civis output from a Linux machine
    >>>and tried using it on the Solaris xterm, still no good.

    >>
    >>>I think rebuilding a current xterm will probably do it.

    >> "current" xterm is supposedly available for Solaris (though I don't
    >> keep
    >> track of that). The escape happens to be the same as Linux console
    >> since it's derived from vt320 (ten years ago - according to my changelog
    >> - Linux changelogs tend to be as scarce as usable release notes for
    >> Solaris).
    >> xterm supports ANSI color, VT220 emulation and UTF-8
    >> There's an faq at
    >> http://invisible-island.net/xterm/xterm.faq.html
    >> ftp://invisible-island.net/xterm/
    >>

    > I just (finally) had a chance to try this; rebuilding ONLY the xterm binary did NOT fix this; obviously it's still loading code from /usr/lib/libX* . . . . :-( and the curses code from /usr/lib/libcurses.*


    Don't forget that the 'tput civis' on Solaris is borked too.
    Are you sending the right escape sequence?

  10. Re: Xterm - Turning off the cursor highlighting

    Dan Espen wrote:
    >> I just (finally) had a chance to try this; rebuilding ONLY the xterm binary did NOT fix this; obviously it's still loading code from /usr/lib/libX* . . . . :-( and the curses code from /usr/lib/libcurses.*


    > Don't forget that the 'tput civis' on Solaris is borked too.
    > Are you sending the right escape sequence?


    It's probably lacking that capability and therefore sending an empty string.
    infocmp shows the data that tput uses.

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

  11. Re: Xterm - Turning off the cursor highlighting

    Thomas Dickey writes:

    > Dan Espen wrote:
    >>> I just (finally) had a chance to try this; rebuilding ONLY the xterm binary did NOT fix this; obviously it's still loading code from /usr/lib/libX* . . . . :-( and the curses code from /usr/lib/libcurses.*

    >
    >> Don't forget that the 'tput civis' on Solaris is borked too.
    >> Are you sending the right escape sequence?

    >
    > It's probably lacking that capability and therefore sending an empty string.
    > infocmp shows the data that tput uses.


    Yep, MIA.

    (I checked Sol 10 too.)

+ Reply to Thread