Skip to content

Add option to hide the mouse pointer - #24

Closed
taucher4000 wants to merge 1 commit into
puterboy:mainfrom
taucher4000:hide-mousepointer
Closed

Add option to hide the mouse pointer#24
taucher4000 wants to merge 1 commit into
puterboy:mainfrom
taucher4000:hide-mousepointer

Conversation

@taucher4000

Copy link
Copy Markdown

I've added an option to be able to hide the mouse pointer in the UI. This is especially helpful for touch screens as you don't want to see the mouse pointer on touch screens.

@puterboy

puterboy commented Aug 7, 2025

Copy link
Copy Markdown
Owner

Thanks - great addition.
Couple of thoughts:

  1. Actually, I think may be better to have configure variable be cursor_timeout/CURSOR_TIMEOUT with default of say 30 seconds, that is consistent with the screen timeout usage and follows screen_timeout
    Interpret as follows:
  • If timeout = 0, then don't run 'unclutter-xfixes' (this is current behavior)
  • If timeout > 0, then run:
    unclutter-xfixes --start-hidden --hide-on-touch --timeout CURSOR_TIMEOUT &

Note the disable with timeout = 0 is consistent with usage for screen_timeout. Also if you have a touchscreen and don't move the mouse then it will remain hidden regardless of value of --timeout.
Note even for a mouse, you may want the cursor to timeout as it is distracting
The README_MD and translations.yaml should be updated to explain this behavior

The reason I prefer this is that timeout is also good for mouse users as even as a mouse user, you probably are using it mostly to display and the pointer can be annoying when not using mouse.
Conversely, some touch users might want the mouse pointer.
So this approach give best of both worlds and also is consistent with screen_timeout logic and variable

  1. Please show PR relative to latest testing

@taucher4000

Copy link
Copy Markdown
Author

Just for your information: I had not time to further investigate the root cause but touch is not working with the new testing version 1.0.0 . It works fine with 0.9.9 but not in the testing branch.

@puterboy

puterboy commented Aug 8, 2025

Copy link
Copy Markdown
Owner

Ahhh definitely want to fix this as the new libinput input handling is much better than the older evdev method.
The logs should be helpful as they print out what devices have been detected generally and which have been categorized as touch.

@taucher4000

Copy link
Copy Markdown
Author

sorry for the delay in my response. Here the the log of the testing branch with not working touch.


################################################################################
[15:07:07] INFO: ######## Starting HAOSKiosk ########
[15:07:08] INFO: HA_USERNAME=kiosk
[15:07:08] INFO: HA_PASSWORD=XXXXXX
[15:07:08] INFO: HA_URL=http://localhost:8123
[15:07:08] WARNING: Config key 'ha_dashboard' unset, setting to default: ''
[15:07:08] INFO: HA_DASHBOARD=
[15:07:08] INFO: HA_THEME=dark
[15:07:08] INFO: HA_SIDEBAR=none
[15:07:08] INFO: LOGIN_DELAY=1.0
[15:07:08] INFO: ZOOM_LEVEL=100
[15:07:08] INFO: BROWSER_REFRESH=600
[15:07:09] INFO: SCREEN_TIMEOUT=0
[15:07:09] INFO: OUTPUT_NUMBER=1
[15:07:09] INFO: ROTATE_DISPLAY=normal
[15:07:09] INFO: MAP_TOUCH_INPUTS=true
[15:07:09] INFO: KEYBOARD_LAYOUT=us
[15:07:09] WARNING: Config key 'xorg_conf' unset, setting to default: ''
[15:07:09] INFO: XORG_CONF=
[15:07:09] INFO: XORG_APPEND_REPLACE=append
[15:07:09] INFO: DEBUG_MODE=false
[15:07:09] INFO: Attempting to remount /dev as 'ro' and (temporarily) delete /dev/tty0...
[15:07:09] INFO: Deleted /dev/tty0 successfully...
[15:07:09] INFO: Starting 'udevd' and (re-)triggering...
starting version 3.2.14
[15:07:09] INFO: Tagging USB input devices for use by 'libinput'...
event0: Skipped (non-USB)
libinput list-devices found:
[15:07:10] INFO: No user 'xorg.conf' data provided, using default...
.
####################################xorg.conf###################################
################################################################################
# Add-on: HAOS Kiosk Display (haoskiosk)
# File: xorg.conf
# Version: 1.0.0
# Copyright Jeff Kosowsky
# Date: July 2025
#
# Minimal xorg.conf to work with OpenGL/DRI video and libinput mice & keyboards
#
################################################################################
Section "ServerLayout"
    Identifier     "DefaultLayout"
    Screen         0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Touchscreen0" "CorePointer"
EndSection
Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "libinput"
EndSection
Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "libinput"
EndSection
Section "InputDevice"
    Identifier  "Touchscreen0"
    Driver      "libinput"
    Option      "Tapping" "on"
EndSection
Section "Device"
    Identifier  "Card0"
    Driver      "modesetting"
    Option      "DRI" "3"
    Option "kmsdev" "/dev/dri/card1"
EndSection
Section "Monitor"
    Identifier "Monitor0"
EndSection
Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    DefaultDepth 24
EndSection
################################################################################
.
[15:07:10] INFO: Starting X on DISPLAY=:0...
X.Org X Server 1.21.1.18
X Protocol Version 11, Revision 0
Current Operating System: Linux local-haoskiosk 6.12.25-haos-raspi #1 SMP PREEMPT Wed Jul  9 14:31:20 UTC 2025 aarch64
Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 cgroup_disable=memory numa_policy=interleave snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 clk_ignore_unused  smsc95xx.macaddr=DC:A6:32:84:B0:0B vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty0 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u,125f:a88a:u,152d:a583:u,152d:a578:u zram.enabled=1 zram.num_devices=3 rootwait systemd.machine_id=0a3d5b514275416f86a213980226fea4 cgroup_enable=memory fsck.repair=yes  root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd ro rauc.slot=A
Current version of pixman: 0.46.4
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Aug 13 15:07:10 2025
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
[15:07:11] INFO: Restored /dev/tty0 successfully...
[15:07:11] INFO: X server started successfully after 1 seconds...
[15:07:12] INFO: Openbox started successfully...
[15:07:12] INFO: Screen timeout disabled...
[15:07:12] INFO: All video outputs: Screen DSI-1 FIXED_MODE
[15:07:12] INFO: Connected video outputs: (Selected output marked with '*')
[15:07:12] INFO:   *[1] DSI-1
[15:07:12] INFO: Setting Keyboard Layout: us
rules:      evdev
model:      pc105
layout:     us
[15:07:12] INFO: Launching Luakit browser: http://localhost:8123/
[    0.782909] I [core/luah]: Loading rc: /etc/xdg/luakit/rc.lua
[    1.021268] I [lua/adblock]: found 0 filter lists
[    1.021688] I [lua/adblock]: subscriptions file '/root/.local/share/luakit/adblock/subscriptions' doesn't exist
[    1.336260] I [lua/styles]: found 0 user stylesheets
[    3.021082] I [lua/webview]: Requested link: http://localhost:8123/ (text/html)
[    3.052670] W [glib]: (unknown): webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
[    3.218040] I [lua/userconf]: URI: http://localhost:8123/
[    3.222966] I [lua/userconf]: Setting passthrough mode...
[    3.223257] I [lua/userconf]: Applying HA settings on dashboard http://localhost:8123/: theme={"dark":true}, sidebar="always_hidden"
[    3.223380] I [lua/userconf]: Injecting refresh interval: http://localhost:8123/
http://localhost:8123/frontend_latest/app.7f0fd7dbfdd646d0.js:14:38858: CONSOLE JS ERROR Fetch API cannot load http://localhost:8123/static/locale-data/intl-numberformat/en.json due to access control checks.
[    5.312672] I [lua/webview]: Requested link: http://localhost:8123/auth/authorize?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8123%2F%3Fauth_callback%3D1&client_id=http%3A%2F%2Flocalhost%3A8123%2F&state=eyJoYXNzVXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4MTIzIiwiY2xpZW50SWQiOiJodHRwOi8vbG9jYWxob3N0OjgxMjMvIn0%3D (text/html)
http://localhost:8123/frontend_latest/app.7f0fd7dbfdd646d0.js:74:135000: CONSOLE JS ERROR Unhandled Promise Rejection: TypeError: Load failed
[    5.365981] W [glib]: (unknown): webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
[    5.407999] I [lua/userconf]: URI: http://localhost:8123/auth/authorize?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8123%2F%3Fauth_callback%3D1&client_id=http%3A%2F%2Flocalhost%3A8123%2F&state=eyJoYXNzVXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4MTIzIiwiY2xpZW50SWQiOiJodHRwOi8vbG9jYWxob3N0OjgxMjMvIn0%3D
[    5.408590] I [lua/userconf]: Authorizing: http://localhost:8123/auth/authorize?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8123%2F%3Fauth_callback%3D1&client_id=http%3A%2F%2Flocalhost%3A8123%2F&state=eyJoYXNzVXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4MTIzIiwiY2xpZW50SWQiOiJodHRwOi8vbG9jYWxob3N0OjgxMjMvIn0%3D
[    5.410128] I [lua/userconf]: Logging in: (username: kiosk): http://localhost:8123/auth/authorize?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8123%2F%3Fauth_callback%3D1&client_id=http%3A%2F%2Flocalhost%3A8123%2F&state=eyJoYXNzVXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4MTIzIiwiY2xpZW50SWQiOiJodHRwOi8vbG9jYWxob3N0OjgxMjMvIn0%3D
[    5.410980] I [lua/userconf]: Injecting refresh interval: http://localhost:8123/auth/authorize?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8123%2F%3Fauth_callback%3D1&client_id=http%3A%2F%2Flocalhost%3A8123%2F&state=eyJoYXNzVXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4MTIzIiwiY2xpZW50SWQiOiJodHRwOi8vbG9jYWxob3N0OjgxMjMvIn0%3D
[    8.789993] I [lua/webview]: Requested link: http://localhost:8123/?auth_callback=1&code=4b0ae05ab0cd4a1d97ab67591c745dfe&state=eyJoYXNzVXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4MTIzIiwiY2xpZW50SWQiOiJodHRwOi8vbG9jYWxob3N0OjgxMjMvIn0%3D&storeToken=true (text/html)
[    8.821481] W [glib]: (unknown): webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
[    8.841782] I [lua/userconf]: URI: http://localhost:8123/?auth_callback=1&code=4b0ae05ab0cd4a1d97ab67591c745dfe&state=eyJoYXNzVXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4MTIzIiwiY2xpZW50SWQiOiJodHRwOi8vbG9jYWxob3N0OjgxMjMvIn0%3D&storeToken=true
[    8.842926] I [lua/userconf]: Injecting refresh interval: http://localhost:8123/?auth_callback=1&code=4b0ae05ab0cd4a1d97ab67591c745dfe&state=eyJoYXNzVXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4MTIzIiwiY2xpZW50SWQiOiJodHRwOi8vbG9jYWxob3N0OjgxMjMvIn0%3D&storeToken=true
http://localhost:8123/frontend_latest/22549.00e27826d4c6955d.js:2:2541: CONSOLE WARN The Material theme is deprecated and will be removed in Vaadin 25.

@puterboy

Copy link
Copy Markdown
Owner

Well the problem is clearly here in the logs:

[15:07:09] INFO: Starting 'udevd' and (re-)triggering...
starting version 3.2.14
[15:07:09] INFO: Tagging USB input devices for use by 'libinput'...
event0: Skipped (non-USB)
libinput list-devices found:
[15:07:10] INFO: No user 'xorg.conf' data provided, using default...

It seems like input devices are not being detected.
Suggest you look at tag-input-devices.sh and see what is happening.
Instrument it with more debug statements to see exactly where it is failing.

What is your hardware setup?

@taucher4000

Copy link
Copy Markdown
Author

What is your hardware setup?

I'm using a Raspberry Pi 4 with a Waveshare 5 Inch DSI Display https://www.waveshare.com/wiki/5inch_DSI_LCD_(B)

@taucher4000

Copy link
Copy Markdown
Author

I made some changes on the haoskiosk/tag-input-devices.sh file and submitted a PR #29

@taucher4000

Copy link
Copy Markdown
Author

Back to the original PR. I've made the changes you've suggested and created a new PR against testing. Feel free to close this one.

#30

@puterboy puterboy closed this Aug 17, 2025
@puterboy puterboy reopened this Aug 17, 2025
@puterboy

Copy link
Copy Markdown
Owner

Addressed in #30 and associated comments...

@puterboy puterboy closed this Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants