Share this...

One of the most annoying things I run into when using a computer is that I click in a box to start typing, and the cursor is blocking what I’m typing, so I can’t see it. (This also happens at work when I’m Windows 11.) It’s annoying, because sometimes I make a typo and I don’t realize it until later. 

I don’t have any control over my work laptop, but I do have control over my personal laptop, so I decided to figure how to fix this.

The solution is pretty simple: just install xbanish. Fortunately, this is available in Ubuntu, so it’s easy to install with 

$ sudo apt install xbanish -y

To run it, just type:

$ setsid xbanish

And your cursor disappears when you start typing and reappears when you move the mouse. I now consider my mischief managed. 

If you’re wondering what setsid does, it runs the xbanish command in a different session, meaning that it doesn’t tie up your terminal. You can open your terminal, run the command, close your terminal, and then go on about your business as usual.

Running at Startup

I admit, it’s a little inconvenient to run that command every time you start up your computer. However, it’s easy enough to get your system to run it automatically at startup. Here’s how I did it on Ubuntu:

I opened my Startup Applications program, and clicked on “Add”. In the window that popped up, I typed “hide the cursor” in the “Name” field so I would remember what this is for, and then typed “setsid xbanish” in the “Command field. It looked like this:

Adding a command to the startup applications preferences.

And that’s it! The command runs automatically at startup every single time.

To check if it’s running after a restart, just issue the following command:

$ ps aux | grep xbanish

and you should get something like this:

Output of the ps aux | grep xbanish command.

About the Title

What you call the thing that gets in your way when you’re typing is apparently a point of great contention in some corners of the internet. Technically, what I wanted to get rid of is the “mouse pointer”, but which many people call a “cursor”. Really, either one is correct. But some people do like to be pedantic about. One of the first links I found was to this Reddit conversation:

Screenshot of a Reddit confrontation

Oh my. It never pays to be pedantic on the internet, much less in real life. But I love how the purple guy’s definition of a troll is “someone who provides a link that proves me wrong”. 


Share this...
Except for material released under a Creative Commons License: ©2021 Kenneth John Odle All Rights ReservedPermalink for this article:
https://techblog.kjodle.net/2024/08/03/make-your-cursor-i-e-mouse-pointer-disappear-in-linux-when-youre-typing-that-is/