[Plasma Desktop] TriggerHappy Daemon (THD) refuses to function if being run as a service
Describe your issue
What's the current behaviour?
TriggerHappy Daemon (THD) is running, but it's not functioning as designed.
How to reproduce your issue?
Follow the postmarketOS Wiki: # rc-update add triggerhappy default
Or # rc-service triggerhappy start
What's the expected behaviour?
# rc-service triggerhappy stop
thd --triggers /etc/triggerhappy/triggers.d/ --socket /run/thd.socket --deviceglob /dev/input/event* --pidfile=/run/triggerhappy.pid --daemon
Now everything is OK!
What device are you using?
xiaomi-rolex
On what postmarketOS version did you encounter the issue?
-
edge ( master
branch) -
v22.06
(supported until 2023-01-18) -
v22.12
-
I confirm that the issue still is present after running sudo apk upgrade -a
On what environment did you encounter the issue?
Environments
-
Phosh -
Plasma Mobile -
Sxmo (Wayland/Sway) Please post the output of sxmo_version.sh
-
Other: Plasma Desktop
How did you get postmarketOS image?
-
from https://images.postmarketos.org -
I built it using pmbootstrap -
It was preinstalled on my device
What's the build date of the image? (in yyyy-mm-dd format)
Additional information
Also, THD as a service doesn't function in Kubuntu if it's being run as nobody or root. If being run as the current user the service does its job although with some minor issues. The solution for Kubuntu (systemd) was found here. For Plasma Desktop (openrc) the only solution I've got is to create the triggerhappy.desktop
file in ~/.config/autostart/