help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: tty blinking cursor


From: Floyd L. Davidson
Subject: Re: tty blinking cursor
Date: Sun, 09 Apr 2006 10:12:44 -0800
User-agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.5

Bastien <bastien@xxx.fr> wrote:
>bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
>
>> Do C-h C-e (`view-emacs-problems'), and search for "*** GNU/Linux:
>> Emacs on a tty switches the cursor to large blinking block."
>>
>> Maybe you can use some of that information.
>
>I've followed this:
>
>,----[ C-h C-e Emacs on a tty ]
>| To this end, run "infocmp linux > linux-term", edit the file
>| `linux-term' to make both the "cnorm" and "cvvis" capabilities send
>| the sequence "\E[?25h\E[?17;0;64c", and then run "tic linux-term" to
>| produce a modified terminfo entry.
>`----
>
>.. and it worked well, thank you very much!
>
>I now have a static cursor.  For some reasons that i don't understand,
>this cursor is red, but it could be worse.
>
>> (Shouldn't `visible-cursor' be mentioned there?)
>
>Yes, since (setq visible-cursor nil) produces the same result as
>the one expected when you follow this:
>
>,----[ C-h C-e Emacs on a tty ]
>| Alternatively, if you want a blinking underscore as your Emacs cursor,
>| change the "cvvis" capability to send the "\E[?25h\E[?0c" command.
>`----

The "\E[P1;P2;P3c" sequence is not described in the Linux
console_codes man page.  It sets the cursor type, including
the use of a software cursor.

The use of the P2 and P3 parameters above (e.g., "\E[?17;0;64c")
is apparently triggering a software defined cursor.  I looked at
the source code, but did not spend enough time to figure out
exactly what it is supposed to be doing.  The code in the Linux
distribtuion is file .../drivers/char/vt.c, function
add_softcursor().

An easy way to experiment with it is this command line (note the
added semicolon, which is optional),

   $ echo -e "\033[?2;8;32;c"

The first parameter is supposed to be one of the following (
as shown in the /usr/include/linux/console_struct.h header),

  0  Don't change
  1  No cursor
  2  Underline
  3  Lower third of the block
  4  Lower half of the block
  5  Two thirds of the block
  6  Block cursor

However, setting P1 to greater than 15 causes a non-blinking
block (default) cursor, and setting P2 and P3 can vary the color
of that block.  Here are two examples

   echo -e "\033[?17;0;32;c"
   echo -e "\033[?17;0;64;c"

or perhaps more useful,

   echo -e "\033[?17;86;32;c"

Multiples of 16 change the color of the block, and intermediate
values change the foreground (text) color.

-- 
Floyd L. Davidson            <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@apaflo.com


reply via email to

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