anyway change the cursor "vertical line" instead of a box?

toughtalker picture toughtalker · Dec 11, 2010 · Viewed 9.9k times · Source

Is there any way to change the cursor to a "vertical line" instead of a box in XTERM?

box: ■

line: |

Answer

Guy with crooked face picture Guy with crooked face · Jun 14, 2013

It seems xterm has added support for the vertical bar or I-beam cursor.

You can change the cursor by inserting one of the following lines in your ~/.bashrc file (if you use bash):

echo -e -n "\x1b[\x30 q" # changes to blinking block
echo -e -n "\x1b[\x31 q" # changes to blinking block also
echo -e -n "\x1b[\x32 q" # changes to steady block
echo -e -n "\x1b[\x33 q" # changes to blinking underline
echo -e -n "\x1b[\x34 q" # changes to steady underline
echo -e -n "\x1b[\x35 q" # changes to blinking bar
echo -e -n "\x1b[\x36 q" # changes to steady bar

References: