I have a raspberry pi with chilipie in kiosk mode.
On the website I show, there are a couple of select inputs. I have managed to hide the cursor throughout the website but when the user clicks on a selector and the options appear, the cursor is shown.
How can I prevent this or always make the cursor disappear?
Select tag example:
<select id="s-entorno" name="entorno" class="form-select" aria-label="Entorno">
<option <?= (!in_array($entorno, [0,1,2])) ? 'selected' : '' ?>><?= gettext('Seleccionar entorno')?></option>
<option value="0" <?= ($entorno == 0) ? 'selected' : '' ?>>DES</option>
<option value="1" <?= ($entorno == 1) ? 'selected' : '' ?>>TEST</option>
<option value="2" <?= ($entorno == 2) ? 'selected' : '' ?>>PRO</option>
</select>
This is my .xsession:
#!/bin/bash
export DISPLAY=:0.0
# Start cursor at the top-left corner, as opposed to the default of dead-center
# (so it doesn't accidentally trigger hover styles on elements on the page)
xdotool mousemove 0 0
# Set some useful X preferences
xset s off # don't activate screensaver
xset -dpms # disable DPMS (Energy Star) features.
xset s noblank # don't blank the video device
# Set X screen background
sudo nitrogen --set-centered background.png
# Hide cursor afer 5 seconds of inactivity
unclutter -idle 0.1 &
# Make sure Chromium profile is marked clean, even if it crashed
if [ -f .config/chromium/Default/Preferences ]; then
cat .config/chromium/Default/Preferences
| jq '.profile.exit_type = "SessionEnded" | .profile.exited_cleanly = true'
> .config/chromium/Default/Preferences-clean
mv .config/chromium/Default/Preferences{-clean,}
fi
# Remove notes of previous sessions, if any
find .config/chromium/ -name "Last *" -exec rm {} +
# Get URL from file (if set)
URL=""
if [ -f /boot/chilipie_url.txt ]; then
URL="$(head -n 1 /boot/chilipie_url.txt)"
elif [ -f /home/pi/chilipie_url.txt ]; then
URL="$(head -n 1 /home/pi/chilipie_url.txt)"
fi
if [ -n "$URL" ]; then
SERIAL="$(cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2 | xargs)" # Get serial number
URL="$(echo $URL | SERIAL=$SERIAL envsubst '$SERIAL')"
fi
# Start and detach Chromium
# http://peter.sh/experiments/chromium-command-line-switches/
# Note that under matchbox, starting in full-screen without a window size doesn't behave well when you try to exit full screen (see https://unix.stackexchange.com/q/273989)
chromium-browser
--start-fullscreen
--window-position=9000,9000
--disable-infobars
--incognito
--kiosk
--disable-pinch
--overscroll-history-navigation=0
--check-for-update-interval=1 --simulate-critical-update
$URL &
# See https://github.com/futurice/chilipie-kiosk/issues/99#issuecomment-597119842 for the need for the fishy-sounding "--check-for-update-interval=1 --simulate-critical-update" switches; TODO: remove when not needed
# Hide Chromium while it's starting/loading the page
wid=`xdotool search --sync --onlyvisible --class chromium`
xdotool windowunmap $wid
sleep 10 # give the web page time to load
xdotool windowmap $wid
# Finally, switch process to our window manager
exec matchbox-window-manager -use_titlebar no