Xterm, removing text cursor


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Xterm, removing text cursor
# 1  
Old 06-08-2013
Xterm, removing text cursor

I have been trying for a few days now and I can't figure out how to remove the text cursor in xterm.
Or, at least make the hollow box when the terminal is not active disapear.
example of what happens:

Code:
xterm*background:      black
xterm*cursorColor:       red
xterm*foreground:        white
Result------> xterm cursor red

-----------------------------------------------------

Code:
xterm*background:      black
xterm*cursorColor:       black
xterm*foreground:        white
Result--------> xterm cursor white

-----------------------------------------------------

I would be ok with cursor being white when window is active but really would like the hollow box to disapear when window is inactive.

thanks

Moderator's Comments:
Mod Comment Please take a moment and review the site rules; CODE tags are required.

Last edited by Don Cragun; 06-09-2013 at 03:14 AM.. Reason: Added CODE tags
# 2  
Old 06-09-2013
You could try:-

Code:
setterm -cursor off
setterm -cursor on

OR

Code:
tput civis
tput cnorm

Depending which command you have...

Both disable and enable the cursor in that order...
This User Gave Thanks to wisecracker For This Post:
# 3  
Old 06-09-2013
I did not know about either of the commands and both worked.
Yet they are both only temporary.
When I enter a program and quit, the cursor returns, but only when it is a program that runs in the current terminal i.e., emacs. If I invoke a program to open in a separate window i.e., xemacs and exit the cursor is still gone.
I will read up tomorrow on those commands and see if there is a way to make this change permanent.
Thanks
# 4  
Old 06-09-2013
There is the possibility of _fixing_ the cursor so that the empty rectangle does not appear when the window is not in the primary focus.

Launch "xterm" like this:-
Code:
xterm -ah

Then click on another window...
# 5  
Old 06-10-2013
Quote:
Originally Posted by demoreal
I did not know about either of the commands and both worked.
Yet they are both only temporary.
When I enter a program and quit, the cursor returns, but only when it is a program that runs in the current terminal i.e., emacs. If I invoke a program to open in a separate window i.e., xemacs and exit the cursor is still gone.
I will read up tomorrow on those commands and see if there is a way to make this change permanent.
Thanks
Try putting it in your terminal prompt.
This User Gave Thanks to Corona688 For This Post:
# 6  
Old 06-14-2013
thank you for the help, combining the advice I got
I changed the following line in my .bashrc
Code:
PS1='[\u@\h \W]\$ '

to
Code:
PS1='\[$(tput civis)\][\u@\h \W]\$ '

This removed the cursor
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Removing \n from a text file

Hi All, I have a question regarding text substitution. I have a file that contains a lot of text. Some of the text is separated with a \n like: TEST\nTEST2\nTEST3 BLA\nBLA2\nBLA3 So there are both actual newlines and 'used to be newlines' in the text. using tr tr "\n" "," or... (5 Replies)
Discussion started by: JaapSchuurman
5 Replies

2. UNIX for Dummies Questions & Answers

Removing PATTERN from txt without removing lines and general text formatting

Hi Everybody! First post! Totally noobie. I'm using the terminal to read a poorly formatted book. The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this. I was hoping to use grep -v " -- "... (5 Replies)
Discussion started by: AxeHandle
5 Replies

3. Shell Programming and Scripting

removing lines without text

How do I remove line that do not contain text, but that do contain tabs? I have tried the command cat file | awk NF but that doesn't work when the lines contain tabs (and spaces). I have also tried: cat file | sed '/^$/d' (9 Replies)
Discussion started by: locoroco
9 Replies

4. UNIX and Linux Applications

Passing the value of a cursor to another cursor

i have 2 cursors. i want to assign the value of first cursor(employee_id) to the where condition of cursor c2(please refer the bold statement). how do i do if i want to assign the value of c1 to where condition of cursor c2? declare cursor c1 IS select employee_id from employee cursor c2... (1 Reply)
Discussion started by: vkca
1 Replies

5. Shell Programming and Scripting

Help with removing line from text

Hey everyone, I kinda new to shell programming and learning bits and pieces of stuff from tutorials. I got this problem, where I asked my user to enter a string, which will delete a specific line in the string, which I'm unable to do it. Text file(BookDB.txt) as shown: Three Little... (4 Replies)
Discussion started by: aLHaNz
4 Replies

6. UNIX for Advanced & Expert Users

unix command : how to insert text at the cursor location via command line?

Hi, Well my title isn't very clear I think. So to understand my goal: I have a script "test1" #!/bin/bash xvkbd -text blabla with xbindkeys, I bind F5 key in order it runs my test1 script So when I press F5, test1 runs. I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
Discussion started by: xib.be
0 Replies

7. UNIX for Advanced & Expert Users

Changing text color in existing xterm or dtterm

On solaris and irix systems, I'm using csh in an existing xterm or dterm and would like to change the text colors. How do I accomplish this? Thanks (1 Reply)
Discussion started by: fjc
1 Replies

8. Shell Programming and Scripting

Removing matching text

Hello Everyone! Of course I am rather new to these forums, but I have been browsing the forums for awhile, always has a lot of useful information :) This time however, I can not find the information I need, well, not completely. So here is the problem, I am a linux admin (dealing mostly with... (1 Reply)
Discussion started by: Rhije
1 Replies

9. UNIX for Dummies Questions & Answers

how to disable color text in xterm window

Hello, Anyone knows how to disable color text displayed on xterm window screen? I hate that color making me hard to read when front and background color are similar. Thanks, M. (1 Reply)
Discussion started by: modemer
1 Replies

10. Shell Programming and Scripting

changing size of text at xterm

hi all, i log into an xterm with bash shell but the character size of the xterm shell is too small. how can i enlarge the size of text on this xterm bash shell? (3 Replies)
Discussion started by: armen
3 Replies
Login or Register to Ask a Question