From aa747dcc858aaab3355bad6ddade2e40cd2a67f9 Mon Sep 17 00:00:00 2001 From: Henrik Muehe Date: Sun, 3 May 2026 11:47:05 +0200 Subject: [PATCH] Hide X cursor on kiosk (touchscreen) Pass -nocursor to startx so the mouse pointer never appears on the\nOnefinity touchscreen. Patched in all three boot paths: rc.local.fast\n(active), legacy rc.local, and the setup_rpi.sh bootstrap. --- scripts/rc.local | 2 +- scripts/rc.local.fast | 4 +++- scripts/setup_rpi.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/rc.local b/scripts/rc.local index 43e549a..1ea5f46 100644 --- a/scripts/rc.local +++ b/scripts/rc.local @@ -28,4 +28,4 @@ plymouth quit # Start X in /home/pi cd /home/pi -sudo -u pi startx +sudo -u pi startx -- -nocursor diff --git a/scripts/rc.local.fast b/scripts/rc.local.fast index 182dde2..1f4de03 100644 --- a/scripts/rc.local.fast +++ b/scripts/rc.local.fast @@ -34,7 +34,9 @@ plymouth quit 2>/dev/null || true # late-boot units (bbctrl logrotate, etc.) don't block on it. Output # is redirected so the journal doesn't fill up with X warnings. cd /home/pi -nohup sudo -u pi startx >/var/log/onefin-x.log 2>&1 & +# `-- -nocursor` hides the X pointer; this is a touchscreen kiosk and +# the mouse cursor only gets in the way. +nohup sudo -u pi startx -- -nocursor >/var/log/onefin-x.log 2>&1 & disown exit 0 diff --git a/scripts/setup_rpi.sh b/scripts/setup_rpi.sh index 11f4db7..3b92211 100644 --- a/scripts/setup_rpi.sh +++ b/scripts/setup_rpi.sh @@ -75,7 +75,7 @@ sed -i 's/^PARTUUID=.*\//\/dev\/mmcblk0p2 \//' /etc/fstab # Enable browser in xorg sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config -echo "sudo -u pi startx" >> /etc/rc.local +echo "sudo -u pi startx -- -nocursor" >> /etc/rc.local cp /mnt/host/xinitrc /home/pi/.xinitrc cp /mnt/host/ratpoisonrc /home/pi/.ratpoisonrc cp /mnt/host/xorg.conf /etc/X11/