corrad1nho / qomui

Qomui (Qt OpenVPN Management UI)
GNU General Public License v3.0
552 stars 58 forks source link

Increase compatibility with different init systems #26

Open baimafeima opened 5 years ago

baimafeima commented 5 years ago

You probably know Fruho, a somewhat similar project which only works on non-systemd systems. See: https://fruho.com/ and https://github.com/fruho/fruhoapp

Does qomui currently only work on operating systems with systemd? If yes, do you have any plans to increase compatibility so that it could also be used on operating systems such as Devuan (sysvinit) or Void Linux (runit)?

corrad1nho commented 5 years ago

I have seen Fruho, but I had the impression it was an abandoned project. Qomui is designed to work with systemd and offers no particular support for other init systems. The reasoning is that systemd is the de facto standard for most GNU/Linux distributions nowadays. However, it should be possible to use Qomui without any init system at all - only dbus is required. The background service that would normally be controlled by systemd can be started manually via "sudo qomui-service". So it should be possible to write configuration files for Qomui for other init systems. The installation scripts will copy systemd service files to the system, though. I haven't tested if that would cause installations to fail on non-systemd systems. If that's the case, the setup.py must be modified slightly. DEB & RPM and possibly AUR packages will fail, too, so installation from source is recommended if you want to avoid systemd. Also, there are some instances where Qomui tries to start or reload the service via systemd:

Those would obviously fail on non-systemd distributions - but this can be avoided by starting/restarting qomui-service manually.

I will likely not offer any further support for other init systems myself beyond a modified setup.py that excludes systemd-specific files. I'll have to test it on Devuan/Void first, though.

baimafeima commented 5 years ago

Thanks a lot for your detailed feedback. If needed, I try to get in touch with Devuan or Void developers on IRC to see if they have any ideas to develop a strategy for more init-independence. I am currently mostly using a systemd distribution so these issues wouldn't affect me immediately but I am thinking of switching to either of these two or, alternatively, MX Linux (which is based on Debian but follows Devuan in terms of its init-system) in the near future. I have checked with MX Linux and they wrote this on their wiki:

MX Linux ships with systemd present but disabled by default. The MX Linux team strongly urges users to remain with this configuration which uses sysvinit instead. This page simply provides information for those interested in the question.

See also: https://mxlinux.org/wiki/system/systemd

corrad1nho commented 5 years ago

I'll be quite busy the next few days but after that I'll try Qomui on Devuan to check how it behaves. I actually run Qomui without systemd all the time for development - the only real problem as I mentioned is installation: You wouldn't want Qomui to copy systemd service files to your system if you run sysvinit or runit. The other thing is convenience: I decided to use systemd so the dbus service can be enabled more easily instead of having to do that either manually each time before you start the gui or write your own init scripts.