Hide mouse pointer on Chromium kiosk

26.2k views Asked by At

Web application with xHTML UI is shown on self-service kiosk, using Chromium in fullscreen kiosk mode. As the kiosk display is intended only for visual feedback, there is no mouse/touchscreen connected.

While it's very easy to hide the mouse pointer via the CSS:

html { cursor: none; }

This approach has one essential problem - user MUST move mouse at least few pixels for pointer to disappear. As I mentioned above, this kiosk has no input methods, and, as a result, after UI is loaded, cursor is still visible right in the middle of screen for rest of the time.

I know that it's possible to simply set transparent cursor in OS options, but unfortunately few of these kiosks has already been shipped to clients, so we can only change the displayed HTML/CSS/JS content remotely, not access and configure the underlying OS itself.

Also I googled around and it seems that there is no way to move the mouse via the jQuery. Can anyone suggest how to deal with this problem?

2

There are 2 answers

0
zion On

For those searching for a SO level solution:

I suggest using nano, so on terminal type sudo nano /etc/lightdm/lightdm.conf to edit this file and add this line below:

xserver-command=X -nocursor

Important: You must add this line after [Seat*] declaration.

Solution used in Raspbian linux distribution.

3
Szymon Dziewanowski On

You cant do this only via browser && CSS/JS (belive me, i tried). For me solution was to install unclutter on the client:

sudo apt-get install unclutter

And turn cursor off, by adding to autostart

nano ~/.config/lxsession/LXDE/autostart

line:

@unclutter -idle 0.1

It will make your coursor disappear after not moving for 0.1s, so if you want to use mouse - you still can.