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
Support for Automatic udev Rules Installation and Kernel Module Management Inside Flatpak #3266
Comments
As alluded to in the original Flatpak request by @X9VoiD, this is the blocker for why Flatpak hasn't been implemented yet:
I see many reasons to want to fix this (including proper tablet permissions support for osu!lazer), but given OpenTabletDriver is a userspace program with plugin support (allowing for arbitrary code execution), any type of permission that requires elevation is not ideal. While I can't speak on our developers behalf, I would really prefer that this is better handled in Flatpak, since device access is not entirely within scope of the project. We generally try to keep any platform-specific code to a minimum in the project where it's possible. What I'm trying to say is that if a change like this were to be implemented, I think it would be wise to instead apply these concepts as widely as possible (ie. the checks should run on Linux generally, not just Flatpak). We already warn on default drivers being loaded, so any improvements to that is welcome. However, copying a file to a (mostly) system folder ( The best compromise I can come up with is a separately shipped system package that includes udev rules and/or the module blacklist files. Shipping udev rules would definitely allow us to solve the osu!lazer issue. Seeing what other direct-access Flatpak (any other driver, really, including Steam) does should be worthwhile. Sorry if this isn't the response you were hoping for. But as mentioned, solving this is necessary for the Flatpak package to be submitted, hence why nobody had submitted a Flatpak package before now. |
I have already submitted a package to Flathub. Indeed, as you mentioned, this does cause issues when the Flatpak package is uninstalled. That's why I believe this action should be included in the setup wizard or as a feature. We need to make sure the user is aware they have performed this operation. Additionally, I think there should be a feature within the software to reverse this change. You suggested that this check should not be limited to Flatpak. However, if the installation is not done via Flatpak, actions like blacklisting kernel modules are automatically handled by the package manager, making such manual operations unnecessary. |
Or at least, when access to the device is blocked and the software is running under Flatpak, inform the user about what the problem is and the corresponding solutions, because this is a widespread issue rather than an isolated case. Automatically informing the user about what happened would greatly improve usability. |
A separate system package is best to provide the rules and the blacklist. That also takes care of if the system is FHS or non-FHS compliant. On the UI side, it should tell and guide users (to the website, or built-in troubleshooting) when the system is in an unexpected state for OpenTabletDriver to run normally. |
This is also a viable solution, identifying the issue and offering a URL that outlines a resolution method. However, if providing a system package, it might be more efficient to install OpenTabletDriver directly through the system package manager. Thus, it may be beneficial to present a webpage guiding users on manually installing udev rules and blacklisting kernel modules upon detecting the problem, or alternatively, offering a script for automatic installation. |
Wouldn't just the -> Reminder for |
good idea |
Description
After packaging as a Flatpak, the tasks of setting up udev rules and blacklisting kernel modules have to be done manually. To make OpenTabletDriver more user-friendly, I propose that if the software detects it's running inside Flatpak, it should offer a diagnostic feature and run it on the first launch. I'm not familiar with C#, so I apologize for not being able to offer substantial help. Below is the pseudocode I generated with ChatGPT, which might be of assistance.
Although this method requires the permission
--talk-name=org.freedesktop.Flatpak
, I believe it's feasible, as demonstrated by the successful case of https://github.com/flathub/com.leinardi.gst. For testing software, Flatpak offers parameters to temporarily toggle permissions. Here's a reference issue for more information: flatpak/flatpak#5435.Acknowledgements
The text was updated successfully, but these errors were encountered: