From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: floyd@apaflo.com (Floyd L. Davidson) Newsgroups: gmane.emacs.help Subject: Re: tty blinking cursor Date: Sun, 09 Apr 2006 10:12:44 -0800 Organization: __________ Message-ID: <87y7ye39er.fld@apaflo.com> References: <87ek097fay.fsf@tallis.ilo.ucl.ac.uk> <87odzc7yby.fsf@tallis.ilo.ucl.ac.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1144608037 15188 80.91.229.2 (9 Apr 2006 18:40:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 9 Apr 2006 18:40:37 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 09 20:40:34 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FSepp-0004WW-Hq for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Apr 2006 20:40:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FSepp-00019t-2w for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Apr 2006 14:40:29 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!sn-xt-sjc-15!sn-xt-sjc-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.5 Cancel-Lock: sha1:7Fi8ORSDmvxtBhvRIC/5c0C8PRU= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 76 Original-Xref: shelby.stanford.edu gnu.emacs.help:138643 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34261 Archived-At: Bastien 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 Ukpeagvik (Barrow, Alaska) floyd@apaflo.com