Open sidevesh opened 1 year ago
I came from Reddit, tried to install the software and was searching for flatpak. @sidevesh is this the only issue with flatpak or same goes for snap too?
Snap has the same issue sadly, I will investigate into flatpak packaging (don't use snap and don't intend to) once ddcutil figures out flatpak packaging
Sorry, but I was also not requesting you for snap. But, I have read people discussing in linux subs as cli tools can also be packaged as snaps. I am no expert on the basis of that, I was just asking because of not knowing. I like flatpaks and will be watching the project for future releases.
Its not about this being a cli tool, ddcutil needs access to i2c devices that normally only root can access, but ddcutil installs a udev rule that gives access to those devices for non root users too, along with that, this app also needs access to backlight class devices and for that this installs another udev rule, flatpak packages can't do that. As I understand, flatpak packaging of this can work if the user themselves installs the udev rule and then gives access to those files via something like flatseal manually, but by then the sandbox model of flatpak is broken and this many manual steps means most users won't be able to do it and would lead to unnecessary issue reports, not to mention immutable distros won't be able to use it either. Something like this is better kept as a native package I think
Not ideal but for now you can use the host ddcutil
from inside the Flatpak using flatpak-spawn --host
.
You could show an explainer into how to install ddcutil
in case it's not available on the host.
This uses the ddcbc C library to interface with ddcutil and make the changes, using ddcutil from cmd would change things quite a bit in how the app works, also I found the current setup to work best for controlling monitors reliably, have had issues in the past using ddcutil from cmd although that might have improved now.
Probably not possible since ddcutil itself can't work from inside flatpak without installing the udev files, this project also requires the udev file to get permission to modify the /sys/class/backlight entries on top of the ddcutil one.