/var/run is a symlink to /run, which is not writable to unprivileged users. So you’ll have to edit the configuration file and change the path to the PIDFile. I would recommend putting it in /tmp instead.
I am suggesting that you edit the file /etc/spnavd.conf and change that line as I have shown above. The daemon already creates that environment variable, but it’s creating it with the wrong value.
It should normally have been provided as part of the software package, but yes, you’ll need it if you’re going to start this as a daemon by way of systemd. Use the one on the Arch Wiki as your example, but be sure to have the PIDFile line put the file in /tmp instead of /var/run.
[Unit]
Description=Userspace Daemon of the spacenav driver.
[Service]
Type=forking
PIDFile=/tmp/spnavd.pid
Environment=XAUTHORITY=/run/user/1000/gdm/Xauthority
ExecStart=/usr/bin/spacenavd
[Install]
WantedBy=multi-user.target
I’m not sure whether gdm would be correct in that Environment line, though. You’re using Plasma, and Plasma uses the sddm display manager — gdm is for GNOME.
I’m running Plasma too, and I don’t see anything relating to either gdm or sddm in /run/user/1000.
[nx-74205:/dev/pts/3][/home/aragorn]
[aragorn] > ls -l /run/user/1000/
total 4
drwx------ 2 aragorn aragorn 120 Aug 15 23:00 akonadi
drwx------ 2 aragorn aragorn 60 Aug 16 06:24 at-spi
srw-rw-rw- 1 aragorn aragorn 0 Aug 15 23:00 bus
drwx------ 3 aragorn aragorn 60 Aug 15 23:00 dbus-1
drwx------ 2 aragorn aragorn 60 Aug 16 14:15 dconf
dr-x------ 2 aragorn aragorn 0 Jan 1 1970 doc
drwx------ 2 aragorn aragorn 140 Aug 15 23:00 gnupg
srwx------ 1 aragorn aragorn 0 Aug 16 07:45 kio_http_cache_cleaner
-rw------- 1 aragorn aragorn 72 Aug 15 23:00 KSMserver__0
srwx------ 1 aragorn aragorn 0 Aug 15 23:00 kwallet5.socket
drwxr-xr-x 2 aragorn aragorn 60 Aug 15 23:00 p11-kit
drwx------ 2 aragorn aragorn 100 Aug 15 23:00 pulse
drwx------ 6 aragorn aragorn 160 Aug 15 23:00 systemd
But that begs the question: how did you install spacenavd? Is this the package from the AUR?
I’m sorry, but I’m afraid I cannot be of help anymore at this stage. According to the AUR page for spacenavd, it hasn’t been updated anymore in over a year.