FreeCAD / system details
OS: Ubuntu 16.04.6 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
I've got a spacemouse compact from 3Dconnexion for the first time. I've checked the wiki site 3Dconnexion_input_devices and installed spacenavd and libspnav-dev via the terminal
Code: Select all
sudo apt-get install spacenavd libspnav-dev
Code: Select all
cp ~/.Xauthority /root/
/usr/bin/spnavd_ctl x11 stop
signalled spacenavd to stop sending X events.
Code: Select all
/usr/bin/spnavd_ctl x11 start
You must have an X server running before starting up spacenavd-X11 events.
Code: Select all
sudo /etc/init.d/spacenavd restart
Code: Select all
sudo /etc/init.d/spacenavd stop
sudo xhost +
sudo /etc/init.d/spacenavd start
To take FreeCAD out of the equation, I've compiled the examples, which came with the libspnav-dev package (running sudo make within the example folders and after extracting the archive within the cube example).
simple_af_unix
Code: Select all
/usr/share/doc/libspnav-dev/examples/simple$ ./simple_af_unix
without restarting the spacenav daemon (not working):
Code: Select all
connect failed: No such file or directory
failed to connect to the space navigator daemon
Code: Select all
got motion event: t(0, 0, 0) r(0, 0, 0)
simple_x11
Code: Select all
/usr/share/doc/libspnav-dev/examples/simple$ ./simple_x11
with or without restarting the daemon (not working):
Code: Select all
failed to connect to the space navigator daemon
cube
Code: Select all
/usr/share/doc/libspnav-dev/examples/cube$ ./cube
Code: Select all
failed to connect to the space navigator daemon
What I didn't expect: The spacemouse is working with all of the examples described above and with FreeCAD when I'm using this command in advance:
Code: Select all
sudo spacenavd -d
Code: Select all
sudo /etc/init.d/spacenavd stop
Code: Select all
Spacenav daemon 0.6
failed to open config file /etc/spnavrc: No such file or directory. using defaults.
adding device.
device name: 3Dconnexion SpaceNavigator
using device: /dev/input/event6
Why am I posting this?
I was really surprised that I've got it to work this way. I'm hoping to get an explanation here, because I've no idea what is really going on. Is there a way to avoid running spacenavd -d with sudo? Here is the output without using sudo:
Code: Select all
Spacenav daemon 0.6
failed to open config file /etc/spnavrc: No such file or directory. using defaults.
adding device.
failed to open device: Permission denied
removing device:
adding device.
failed to open device: No such file or directory
removing device:
failed to find any supported devices
failed to bind unix socket: /var/run/spnav.sock: Permission denied
I'm looking forward to your help
Regards
Max