Open nintyfan opened 4 years ago
Hmm, this request reminds me of the Documentation= field we carry in units, i.e. which just carries some metadata for a unit we display in "systemctl status".
I never look at systemd sources.
I think, systemctl should compare window manager env variable with strings in configuration. User could also bypass own string. Syntax in unit could be: Configuration[GNOME3]=apache2-gtk3-config Configuration[Plasma5]=apache2-kde-config Configuration[TUI]=apache2-menu-console
Maybe integrate this with Flatpak? You need to:
Another example: /etc/apache2/httpd.conf: (from manual) - file contains basic www service configuration Belongs to: apache2 This package contains www server daemon + configuration You select to install apache2 configuration UI, written in GTK+, which needs to access apache2 configuration files.
Is your feature request related to a problem? Please describe. In past, some distribution allow to setup daemon during package installation. That's bad idea, but some admins may like to configure daemon/unit by fast tool.
Describe the solution you'd like I'm author of Bonsole - Browser console program and related libraries. To communicate with Bonsole, program must be linked with special library. This library supports many backends. One is native - it sends document tree to Bonsole. Another is console, which uses XSLT to translate document tree into string with escape sequences. Bonsole and app communicate via DBUS and file description passed via DBus or on process creation, so both tools could works with different rights.
Idea is to add field ConfigurationTool in unit files, so system administrators could call systemd-configure apache (for example). Additionally, there's should exists systemd-asks-for-configure [unit-name] to tell admin that this unit need to be configured. Admin could be informed via e-mail or in other ways.
Describe alternatives you've considered Add more general approach, language such like udev, to select which config tool ran. Systemd-configre will pass some environment variables to run configuration tool for console, Plasma5, GNOME, etc. It's harder and worse idea than previous, but maybe there's way to enhance it.