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.
This commit is contained in:
2026-05-03 11:47:05 +02:00
parent 56c3406f25
commit aa747dcc85
3 changed files with 5 additions and 3 deletions

View File

@@ -28,4 +28,4 @@ plymouth quit
# Start X in /home/pi # Start X in /home/pi
cd /home/pi cd /home/pi
sudo -u pi startx sudo -u pi startx -- -nocursor

View File

@@ -34,7 +34,9 @@ plymouth quit 2>/dev/null || true
# late-boot units (bbctrl logrotate, etc.) don't block on it. Output # late-boot units (bbctrl logrotate, etc.) don't block on it. Output
# is redirected so the journal doesn't fill up with X warnings. # is redirected so the journal doesn't fill up with X warnings.
cd /home/pi 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 disown
exit 0 exit 0

View File

@@ -75,7 +75,7 @@ sed -i 's/^PARTUUID=.*\//\/dev\/mmcblk0p2 \//' /etc/fstab
# Enable browser in xorg # Enable browser in xorg
sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config 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/xinitrc /home/pi/.xinitrc
cp /mnt/host/ratpoisonrc /home/pi/.ratpoisonrc cp /mnt/host/ratpoisonrc /home/pi/.ratpoisonrc
cp /mnt/host/xorg.conf /etc/X11/ cp /mnt/host/xorg.conf /etc/X11/