Hi, as a FreeCad User on a systemd system, I was sick off to use the "xhost +" command before starting spacenavd and then FreeCad.
So I implemented a simple user context switching. Now it's possible to start the daemon as a privilege user (root), but the mainpart is executed under an other user or group id.
For this, I added the -u / -g option and also the configfile keys user / group.
Before I submit a PR, I would be glad if you could take a look at the comparison of the branches: master...thecky:daemon_privileges
If the code - and the options - are sensible in your eyes, I would submit a PR.
Thanks and regards, Thomas.