[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: systemd service file per lanciare fluidsynth all'avvio



Ciao credo che ci sia una piccola imperfezione nel tuo script
.service, probabilmente devi settare il nome tuo utente /gruppo e con
la direttiva forking, altrimenti fa partire il programma da root e
potrebbe crashare.

Provare non costa nulla, modifica il file
/etc/systemd/system/fluidsynth.service con questo contenuto:

####################

[Unit]
Description=FluidSynth Synthesizer
After=syslog.target

[Service]

Type = forking
User = INSERISCI QUI IL TUO USERNAME
Group = INSERISCI IL GRUPPO A CUI APPARTIENE IL TUO USERNAME (di
solito group name = user name)

ExecStart=/usr/bin/fluidsynth -s -a alsa /usr/share/sounds/sf2/FluidR3_GM.sf2
#Restart=restart-always

[Install]
WantedBy=multi-user.target

####################

Salvi e dai una bella riavviata:

# systemctl daemon-reload
# systemctl start fluidsynth.service

dopo controlla lo status se tutto è andato a buon fine.


Facci sapere. ciao.

Il 29 settembre 2014 08:28, Federico Bruni <fede@inventati.org> ha scritto:
> Sto cercando di far sì  che fluidsynth sia avviato al boot, per usarlo con
> un'altra applicazione (Frescobaldi) senza dover passare da Qsynth. Da quel
> che ne so, devo creare un servizio di systemd.
> Ho aperto questo bug report:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760210
>
> Qualcuno ha esperienza con systemd?
> Ricopio qui quello che ho fatto.
> Ho creato il file /etc/systemd/system/fluidsynth.service con questo
> contenuto:
>
> ####################
>
> [Unit]
> Description=FluidSynth Synthesizer
> After=syslog.target
>
> [Service]
> ExecStart=/usr/bin/fluidsynth -s -a alsa
> /usr/share/sounds/sf2/FluidR3_GM.sf2
> #Restart=restart-always
>
> [Install]
> WantedBy=multi-user.target
>
> ####################
>
> L'ho avviato:
>
> # systemctl daemon-reload
> # systemctl start fluidsynth.service
>
>
> Ma crasha.
>
> Attenzione: il comando di fluidsynth funziona benissimo se lo lancio da
> terminale.
>
>
>  # systemctl status -l fluidsynth.service
>
> fluidsynth.service - FluidSynth Synthesizer
>
>    Loaded: loaded (/etc/systemd/system/fluidsynth.service; disabled)
>
>    Active: inactive (dead)
>
>
> set 28 22:05:12 fede-xps systemd[1]: Starting FluidSynth Synthesizer...
>
> set 28 22:05:12 fede-xps systemd[1]: Started FluidSynth Synthesizer.
>
> set 28 22:05:13 fede-xps fluidsynth[26958]: fluidsynth: warning: Requested a
> period size of 64, got 940 instead
>
> set 28 22:05:13 fede-xps fluidsynth[26958]: fluidsynth: warning: Requested
> 16 periods, got 8 instead
>
> set 28 22:05:13 fede-xps fluidsynth[26958]: FluidSynth version 1.1.6
>
> set 28 22:05:13 fede-xps fluidsynth[26958]: Copyright (C) 2000-2012 Peter
> Hanappe and others.
>
> set 28 22:05:13 fede-xps fluidsynth[26958]: Distributed under the LGPL
> license.
>
> set 28 22:05:13 fede-xps fluidsynth[26958]: SoundFont(R) is a registered
> trademark of E-mu Systems, Inc.
>
> set 28 22:05:13 fede-xps fluidsynth[26958]: Type 'help' for help topics.
>
> set 28 22:05:13 fede-xps fluidsynth[26958]: >
>
>


Reply to: