Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to change the cursor in xterm to an I-beam or vertical bar. From what I can see, there may be support for this. My question is what do I insert into my ~/.Xdefaults or ~/.bashrc in order to enable the vertical bar cursor?

Reference:

share|improve this question

migrated from stackoverflow.com Jun 14 '13 at 4:33

This question came from our site for professional and enthusiast programmers.

    
Got it :D For steady vertical bar, add to you ~/.bashrc: 'echo -e -n "\x1b[\x35 q"' For blinking vertical bar, add to your ~/.bashrc: 'echo -e -n "\x1b[\x36 q"' References: code.google.com/p/iterm2/issues/detail?id=2248 – Guy with crooked face Jun 14 '13 at 3:02
    
Added the answer to pastebin so it's indexed by Google: pastebin.com/8hRENZhu – Guy with crooked face Jun 14 '13 at 3:08
    
Why didn't you post it as an answer here? – Carl Norum Jun 14 '13 at 3:28
    
I tried to but I don't have enough points, or karma, or whatever :/ So, I did what I could until seven hours go by and I'm able to post a complete answer. In the interim I posted the whole answer on pastebin and provided a link to it. Sorry 'bout the confusion :) – Guy with crooked face Jun 14 '13 at 4:01

Posting what I found so others can find the answer as well.

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:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .