Skip to content

The problem of launching spacenavd using systemd in Ubuntu 20.04 OS #112

Closed Answered by lninio
lninio asked this question in Questions and support
Discussion options

You must be logged in to vote

As I promised, I describe the solution to this problem. The reason for the failure turned out to be that systemd, from which the spacenavd fork is made, has only two environment variables (you can see the output sudo systemctl show-environment). In my case, the XAUTHORITY and DISPLAY environment variables are missing. Since the daemon is formed as a fork of systemd, it inherits only those environment variables that existed at the start of systemd. Therefore, in order to work around the problem, I added the appropriate variables to the unit file using the command sudo systemctl edit spacenavd.service as follows:

Environment=DISPLAY=":1"
Environment=XAUTHORITY="/run/user/1001/gdm/Xauthority" 

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@lninio
Comment options

@lninio
Comment options

@lninio
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jtsiomb
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants