I ran into a new problem on Fedora.
- When
spacenavdis started as root (as a service), it can't access the user X server, and Houdini can't talk to it ("failed to open X11 display"in /var/log/spnavd.log).
- If I start
spacenavdmanually, it works fine. But I want it running as a service.
- If I start
spacenavdas a user service, it fails due to lacking permission to (create?) the socket file in /var/run/spnav.sock.
The solution I found is to keep running
spacenavdas a service (root), but give root access to the user X server. To do this on each login I added the following to
~/.zlogin:
xhost +si:localuser:root > /dev/null
If using bash (default), you would probably add it to
~/.profileinstead.
This is not ideal. If running as a user service instead it would have access to the X server, and it could delay starting up until the X server is actually running (unlike the root service, which fails to connect a couple of times). But I have not found a working solution for that, and would probably need to modify the
spacenavdcode to handle the socket file differently.