Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpaceMouse Support #61

Open
mattiasgronlund opened this issue Sep 24, 2022 · 6 comments
Open

SpaceMouse Support #61

mattiasgronlund opened this issue Sep 24, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@mattiasgronlund
Copy link

mattiasgronlund commented Sep 24, 2022

I had problems getting my SpaceMouse working with the FreeCAD snap.
According to the instructions I should copy my ~/.Xauthority file, but I did not have that file...

After some investigation I understood that it should work without X11 permissions, instead using the UNIX domain socket /run/spnav.sock.

After some digging I come to the conclusion that I can get it to work by adding the /run/spnav.sock rw, to /var/lib/snapd/apparmor/profiles/snap.freecad.freecad. As I understands it /etc/spnavrc r, should also be added to get configuration management fully working.

I have no previous knowledge regarding snaps, so I have no clue how one could add that to the snap.

Hope this information might be helpful making the SpaceMouse just work for end users.

@ppd
Copy link
Collaborator

ppd commented Sep 24, 2022

Wow, thanks for debugging this :)
I'll see what I can do later today.

@mattiasgronlund
Copy link
Author

I realized that I had missed the "rw ," and r, ends of the lines so I updated the initial comment.

If you dig deeper into this it would be interesting to understand when/why most apps like X11... use abstract AF_UNIX sockets (@/var/run/spnav.sock) instead of the normal filesystem sockets.

I have local changes adding that abstract AF_UNIX support to both spnavd and libspnav, as I initially thought that could have been the problem.
That seems not to be needed, but I thought it could be good to know, as I do not understand when/why abstract vs path based AF_UNIX socket.

With abstract socket support, one can add unix (connect, send, receive) peer=(addr="@/var/run/spnav.sock"), and use that instead.

@ppd ppd self-assigned this Sep 26, 2022
@ppd
Copy link
Collaborator

ppd commented Sep 26, 2022

Observations:

Options:

  • Propose new interface in snapd
  • Simply ship spacenavd in the snap itself as spacemouses present themselves as USB HID devices. This seems quite promising and also like the best UX. PR for testing incoming.

@ppd ppd added the enhancement New feature or request label Sep 26, 2022
@luzpaz
Copy link
Collaborator

luzpaz commented Sep 26, 2022

JFYI, libspnav current is v1.0

@basak
Copy link

basak commented Oct 9, 2023

Hi. Thank you for providing the FreeCAD snap! I am finding it very useful already.

I see there hasn't been any activity on this for a while, and just wanted to register that I'm another person who would find this issue being resolved very helpful.

Thanks again for your work!

@doucettom
Copy link

unix (connect, send, receive) peer=(addr="@/var/run/spnav.sock"),

Can you please tell me where in the file should I add this and do I have anything to do once done ? I'm trying this on realthunder's version w/o any success so far AppImages are working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants