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
systemd integration #342
Comments
Looks good, nice. I think it kinda addresses #66. Will try this for the openSUSE rpm package, on success will integrate it. |
to enable running fluidsynth as user service. Fixes #342
@derselbst damn, I think I made some false assumptions! Although the templating file "works", the lvalue Also, it seems, that my system was crapping out because of a kernel update and no reboot, so now also the following systemd user service works (the MIDI issue seems to have been related to the new files, etc.):
You can easily test the above by placing it into |
Note, the |
Ok. Did you intentionally remove |
Yes. For user services that doesn't work. So, there are two ways of going about it: A templated system service (from the initial post), or a user service (from the previous post). However, only the first case can autostart by default (that only makes sense, if your audio system is up and running automatically as well). |
aa3703b should implement the user service properly. Havent tested it yet. The idea is that a packager sets the cmake -DFLUID_DAEMON_ENV_FILE=/usr/lib/systemd/whatever/sysconfig.fluidsynth .. The packager is responsible to properly install those files then, because their location varies too much between distributions and I dont think introducing even more Note that I've removed the |
@derselbst looks good to me! |
Maybe next week if I find time this weekend.
|
to enable running fluidsynth as user service. Fixes #342
FluidSynth version
1.1.9
Current behavior
fluidsynth is run as a systemd system service
Expected behavior
fluidsynth should really run as a user service
Steps to reproduce
Run
systemctl start fluidsynth
Other information
On Arch Linux the packager crafted a fluidsynth systemd system service. However, those are started as root, which is really not a great solution for an automated user service (as it doesn't see the user's JACK server).
Additionally, running fluidsynth as root is a potential security risk.
There are also systemd user services, run as the user starting them. However, with them the alsa midi seqencer fails to initialize, as it requires the group
audio
:In user services though, additional groups can not be set leading to the above problem.
There is the possibility to run a system service with user privileges though, using a templated unit.
I created something like
and it works!
I'd be happy, if you'd considered adding this file as a feature, as I think other distributions would benefit from this, too.
I think some more security features, that systemd offers can be added, but I have to work on some other things right now.
Would be great to get some feedback for this, though!
The text was updated successfully, but these errors were encountered: