Skip to content

Initial support for system-installed plugins in Linux

Adam Honse requested to merge system_plugins into master

I would like to make system plugins (plugins installed by distro packages or otherwise handled outside of the OpenRGB application) official. We already had OPENRGB_EXTRA_PLUGIN_DIRECTORY for distro package maintainers to specify an extra plugin directory, but the application did not handle these any differently than the plugins installed in the user's .config directory. The main thing is that the OpenRGB application would offer to remove these plugins from the system even though OpenRGB did not install them in the first place and likely does not have access rights to the directory where they are located.

In this MR, I've implemented an is_system flag in the plugin entry pipeline to track whether a plugin came from the user directory or the system directory (renamed to OPENRGB_SYSTEM_PLUGIN_DIRECTORY and defaulted to /usr/lib/openrgb/plugins in the OpenRGB.pro). If the plugin came from the system directory it can still be enabled/disabled, but it cannot be removed. Checks have been added to not enable clicking the Remove button when a system plugin is selected and a safety check in the Remove button code to break out if an attempt to remove a system plugin is made.

We probably should have checks for attempting to replace a system plugin as well. This would allow us to make official .deb/.rpm packages of the plugins and hopefully standardize /usr/lib/openrgb/plugins as the directory that all package maintainers use for packaged plugins not handled by us.

However, I'm not super familiar with how external maintainers would package plugins, so I'm open to feedback on this implementation.

Merge request reports