unclutter: hide the mouse cursor after a period of inactivity
March 27th, 2007 edited by lucasEntry based on submissions from Oliver Kiddle, Tore Morkemo and Gwern Branwen. Yes! Three independent readers wrote about it, it must be good :-)
Remember, DPOTD needs your help, please contribute !
Do you ever find that occasionally the mouse pointer obscures just the bit of the screen with the word you’re currently reading? Having to move the mouse or guess the word under the pointer is only a minor irritation but it can be an irritation none-the-less.
Unclutter is a small but unique package for X11. What it does is very simple: if you aren’t using the mouse, it hides the mouse. This is useful simply because if you aren’t using the pointer, there’s no reason for it to be visible. This may not sound particularly useful, but making the mouse be invisible frees up screen real estate, prevents it from distracting you, and just generally makes for a much more pleasant experience, particularly when reading a document or using primarily keyboard-based applications.
Unclutter is easy to use. Just put a line like this in your .xsession, .gnomerc, “Startup Programs” or wherever you enter commands to be run at startup/login:
unclutter &
Now, if you stop moving your mouse, the cursor will disappear after 5 seconds.
Unclutter has a few nice arguments worth checking out:
- -idle 2 : hide the mouse after 2 seconds, instead of the default (5).
- -keystroke : tells unclutter to hide the mouse cursor when you start typing on the keyboard.
- -not : don’t hide the cursor in windows listed as arguments.
There are more options, just check out the man page.
Unclutter is a maintained, stable & largely bug-free package which has been included in basically all versions of Debian and Ubuntu.
March 27th, 2007 at 6:53 am
If you have problems with a “randomly” moving cursor in some SDL applications (like xmoto, Quake3-based games, etc.), try to kill it.
March 27th, 2007 at 12:12 pm
Thank you, thats a great trick! :D
March 27th, 2007 at 1:43 pm
Did that happen to you?
It took me a few days to find out why my cursor went crazy, as I was also hacking my window manager (dwm) at the time I started using unclutter…
March 27th, 2007 at 4:25 pm
I use unclutter too, and that nasty “randomly moving” cursor bug Geoffroy referred to bite me a few times and because i play very rarely (once a year maybe) I always have to rediscover it from scratch… *sigh*
March 27th, 2007 at 9:48 pm
This is an excellent little utility. I would never have found it !
March 28th, 2007 at 12:00 am
Nice and simple utility.
March 28th, 2007 at 8:02 pm
It’s not working for me.
I’m starting unclutter from ~/.kde/Autostart. The process is running but my cursor won’t disappear.
Did I miss something?
March 29th, 2007 at 11:40 am
you should SUBMIT LINKS to homepage of any revieved application. Searching for “unclutter: hide the mouse cursor after a period of inactivity” in Google won’t show me the homepage with sources
March 29th, 2007 at 3:06 pm
Use apt-get, patpi.
March 29th, 2007 at 7:40 pm
Jared, it’s Debian Package of the Day but i use KateOS :P
This suit is good resource even for non-debian users :)
March 30th, 2007 at 5:22 am
patpi: that’s great, but don’t expect the site to be tailored for non-{debian,ubuntu} users :)
In fact, many times the homepage of the application is linked, but we’ll take the suggestion.
For unclutter, I couldn’t find the homepage, maybe it hasn’t got one.
June 12th, 2007 at 1:40 am
Wanted to add that this is the perfect addition to Beryl’s “Input Enabled zoom” plugin.
Thanks for sharing this!
October 20th, 2007 at 2:12 pm
This is great. Why did we always leave the mouse pointer sitting there like a gooseberry when we didn’t want it!!!!
February 13th, 2008 at 8:18 am
Could anyone help with this problem? I’ve installed unclutter but it doesn’t seem to work. Ie my cursor doesn’t go away. I would also like to add arguments (ie to make the cursor disappear after 1 second) but I’m new to linux and can’t work out how to do it. Many thanks in advance for any advice.
February 21st, 2008 at 7:56 am
luke: you’ve installed the software, now you have to start it.
Give the command:
unclutter -idle 1 &
(in a terminal).
April 10th, 2008 at 8:21 pm
Niftyy! OK, so if someone is interested in hiding the mouse cursor as long as this app is running (even when a mouse is clicked or a key is pressed) - you can change the line in unclutter.c from:
#define ANYBUTTON (Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask)
to:
#define ANYBUTTON (’ ‘)
Recompile (just a simple “make” in the source directory will do) and run the program with the command:
./unclutter -idle 0 -root
This can be useful when running windows applications with wine.
May 7th, 2008 at 4:27 am
ingenious! do they have this in Windows?
June 28th, 2008 at 10:09 pm
In my ~/.bashrc from ancient suse release:
# Kludge to handle the su problem and VNC if I’m in an xterm
if [ $TERM = "kterm" ]; then
xhost +jumbo >> /dev/null
xhost +shrimp >> /dev/null
xhost +opihi >> /dev/null
xhost +clam >> /dev/null
# A couple of other things turnoff screen blanking and the cursor…
xset s off
xset s noblank
if [ "`ps aux | grep unclutter | grep -v grep`" = "" ] ;
then
unclutter &
fi
fi
September 16th, 2008 at 12:08 pm
unclutter -display :0.0 -idle 1
October 3rd, 2008 at 4:12 pm
the -keystroke option does not work as described in this article … i’m not sure what it really does but i won’t be using this app after all
December 28th, 2008 at 5:58 am
If you wanted unclutter to only hide the pointer on certain windows, a special regex can be used to reverse the -not* options -
unclutter -regex -notclass ‘[^(MPlayer)]+’
March 25th, 2009 at 9:03 pm
Doesn’t work in terminal applications. Using urxvt here.