You are not logged in.

#1 2009-04-09 23:27:30

jt512
Member
Registered: 2009-02-19
Posts: 262

[Solved] Stop blinking cursor in virtual terminal?

I've tried to google this numerous times over the years, and have never found an answer.  My question is, is it possible to stop the cursor from blinking in a virtual terminal?

Jay

Last edited by jt512 (2009-04-12 22:41:11)

Offline

#2 2009-04-11 03:08:57

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,563

Re: [Solved] Stop blinking cursor in virtual terminal?

Bow down before me, for my Google skills are infinitely superior to thine own. smile

http://www.jurta.org/en/prog/noblink

Offline

#3 2009-04-11 11:18:01

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [Solved] Stop blinking cursor in virtual terminal?

Ranguvar wrote:

Bow down before me, for my Google skills are infinitely superior to thine own. smile

http://www.jurta.org/en/prog/noblink

Just tried it. Adding

\033[?17;0;127c

to your existing PS1 definition string will provide you with a block cursor instead of the blinking underline in a virtual console, e.g.

export PS1='\033[?17;0;127c\u:\w\$ '

Last edited by bernarcher (2009-04-11 11:18:31)


To know or not to know ...
... the questions remain forever.

Offline

#4 2009-04-11 19:26:15

jt512
Member
Registered: 2009-02-19
Posts: 262

Re: [Solved] Stop blinking cursor in virtual terminal?

bernarcher wrote:
Ranguvar wrote:

Bow down before me, for my Google skills are infinitely superior to thine own. smile

http://www.jurta.org/en/prog/noblink

Just tried it. Adding

\033[?17;0;127c

to your existing PS1 definition string will provide you with a block cursor instead of the blinking underline in a virtual console, e.g.

export PS1='\033[?17;0;127c\u:\w\$ '

Thanks.  That solved the problem for everything except emacs, which continued to display a blinking white block cursor.  To get it to stop blinking in emacs, I followed these instructions.  I also found this explanation on how to modify the console cursor in general.

Jay

Offline

#5 2009-04-12 22:40:43

jt512
Member
Registered: 2009-02-19
Posts: 262

Re: [Solved] Stop blinking cursor in virtual terminal?

bernarcher wrote:
Ranguvar wrote:

Bow down before me, for my Google skills are infinitely superior to thine own. smile

http://www.jurta.org/en/prog/noblink

Just tried it. Adding

\033[?17;0;127c

to your existing PS1 definition string will provide you with a block cursor instead of the blinking underline in a virtual console, e.g.

export PS1='\033[?17;0;127c\u:\w\$ '

Actually, that PS1 caused a little problem in xfce Terminals.  If I typed a command that exceeded the width of the terminal, the terminal would not scroll, and instead, the continuation of the command would overwrite the start of the command.  Fixed it by making PS1 conditional on $TERM, in ~/.bashrc:

if [ $TERM = 'linux' -a $SHELL = '/bin/bash' ] ; then
    PS1='\033[?17;0;40c[\u@\h \W]\$ '
else PS1='[\u@\h \W]\$ '
fi

Jay

Offline

Board footer

Powered by FluxBB