How to hide mouse pointer on secondary / TV screen

So you have set up your Ubuntu / Kubuntu system with two separate X screens, one of them being a TV screen you only use to play fullscreen video. Now how do you prevent the mouse cursor to show on the TV screen ? That’s an easy one :

1. Create an empty bitmap file, eg. using a very basic program called “bitmap” :

user@box:~$ bitmap &

Click “New” and save the empty file with the name blank.bmp in your home dir.

2. Tell X to use that empty bitmap as mouse pointer and mask on the secondary display (it is called “:0.1″ on my box)

user@box:~$ sudo xsetroot -display ":0.1" -solid black -cursor ~/blank.bmp ~/blank.bmp

Of course you probably want to run that automatically everytime X starts.
With Kubuntu 9.04, I suggest putting the blank.bmp file in /usr/share/X11/ and add the following to /etc/kde4/kdm/Xsetup :

#! /bin/sh
# Xsetup - run as root before the login dialog appears
xsetroot -display ":0.1" -solid black -cursor /usr/share/X11/blank.bmp /usr/share/X11/blank.bmp

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>