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

Set Udev rules through AppImage / Flatpak #435

Open
szszszsz opened this issue Nov 5, 2019 · 1 comment
Open

Set Udev rules through AppImage / Flatpak #435

szszszsz opened this issue Nov 5, 2019 · 1 comment

Comments

@szszszsz
Copy link
Member

szszszsz commented Nov 5, 2019

Automatically set Udev rules, when installing from AppImage or Flatpak.
From #431:

@enleth BTW any idea, how to insert Udev rules into mentioned?

AppImage can do pre-sandbox wrapper scripts and some developers seem to be using those to invoke a script through sudo that would "install" the udev rules, such as:
EspoTek/Labrador#22 (comment)
JvanKatwijk/qt-dab#34 (comment)

Maybe there is a way to do this that doesn't look really scary and hacky, not sure. First things first, something like that probably shouldn't add unmanaged files to /etc/. Instead, /run/udev/rules.d/ could be used - this seems to be a little known feature of udev despite being mentioned in the literally first sentence of the "RULES FILES" section of udev(7). Still requires root access, though, and is arguably even worse from the UX point of view - instead of asking for root once and leaving a mess in /etc/udev/rules.d/, the app requests root access after every system reboot because /run/udev/rules.d/ is volatile.

Flatpak doesn't even have that. Not even Valve managed to get around this for Flatpak version of Steam and the Steam Controller:
flathub/flathub#278
flathub/com.valvesoftware.Steam#8

In effect, both work nice as a quick upgrade path for when your distro does include nitrokey-app but doesn't update it fast enough - so you can keep the distribution package installed for the udev rules but actually use the AppImage or Flatpak version. Otherwise it's horrible hacks, or manual changes to udev rules, or nothing. Honestly, I can't think of a proper way out at the moment.

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

No branches or pull requests

1 participant