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

Can fusuma use flatpak: device=input|all permission instead of requiring input group? #335

Open
KAGEYAM4 opened this issue Jan 20, 2025 · 3 comments

Comments

@KAGEYAM4
Copy link

Is your feature request related to a problem? Please describe.

IMPORTANT: This makes /dev/input/ readable, so if that's an issue for you for some reason (like for privacy- or securityconcerns etc. or if it causes other parts of your OS to misbehave), consider this your heads-up.

Describe the solution you'd like
Can flatpak solve this ? https://docs.flatpak.org/en/latest/sandbox-permissions.html#device-access

@KAGEYAM4 KAGEYAM4 changed the title Can fusuma use flatpak -> device=input|all instead of requiring input group? Can fusuma use flatpak: device=input|all instead of requiring input group? Jan 20, 2025
@KAGEYAM4 KAGEYAM4 changed the title Can fusuma use flatpak: device=input|all instead of requiring input group? Can fusuma use flatpak: device=input|all permission instead of requiring input group? Jan 20, 2025
@iberianpig
Copy link
Owner

I'm not very familiar with Flatpak, but for Fusuma, if we can control access to /dev/input, we might not need the input group for libinput.
Also, fusuma-plugin-remap uses /dev/uinput to create virtual devices, which needs extra permissions.

Projects that use Flatpak, like Steam or other key remappers, might be useful to look at.

It could also be useful to see if we can run without the input group by using systemd to run as root.

@KAGEYAM4
Copy link
Author

a Flatpak app runs as your user, so at best it can do what your user can do. --device=input merely provides access to the device nodes.

I asked on flatpak-Matrix, and flatpak solution won't work.

@KAGEYAM4
Copy link
Author

KAGEYAM4 commented Jan 28, 2025

@iberianpig found it on how steam-input works --> (TLDR: udev-rule granting tag:uaccess)

Granting access to uinput and touchpad is better that being part of input group.

Here's an example of udev rule for touchpad that i am using.

  • Got the attributes by running sudo evtest and then selecting events which i though belong to touchpad, performing action on touchpad to see if output shows in evtest. Then using $ udevadm info --attribute-walk --name=/dev/input/<event-id> to get attributes.
  • Using udev rule from steaminput for uinput

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

No branches or pull requests

2 participants