title: How to set cursor color in bash shell
body: <p>I have found that I can get my cursor to blink by including the following instruction in my .bashrc file:</p>
  
  <pre><code>echo -ne "\x1b[1 q"
  </code></pre>
  
  <p>But I also want to change the color of the blinking cursor.  I know that my terminal supports color because I can set the prompt colors and print text in color, but I just can't change the cursor color.  Any suggestions?</p>
  
  <p>I'm adding the following comment, that I'm aware of how to change the color of text that is displayed on the terminal, but that is not the same as changing the color of the the cursor.  So my question is not addressed in <a href="https://stackoverflow.com/questions/5947742">that other question</a>.</p>
  
  <p>But I did find a workaround in my terminal emulator software, provided below.
  Thanks for the feedback, especially the part about making the selection of the proper escape codes portable across terminal types.</p>