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

Re: systemd service file per lanciare fluidsynth all'avvio



Grazie Carlo!

Il giorno lun 29 set 2014 alle 9:26, Carlo <carlodoro88@gmail.com> ha scritto:
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.

La direttiva forking è sconsigliata in 'man daemon'.

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


# systemctl status -l fluidsynth.service
fluidsynth.service - FluidSynth Synthesizer
   Loaded: loaded (/etc/systemd/system/fluidsynth.service; disabled)
   Active: inactive (dead)

set 29 23:31:18 fede-xps pulseaudio[30299]: [pulseaudio] authkey.c: Failed to load authorization key '/home/fede/.config/pulse/cookie': File o directory non esistente
set 29 23:31:18 fede-xps pulseaudio[30299]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
set 29 23:31:18 fede-xps pulseaudio[30299]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

Il primo errore l'ho risolto con:
rm -r ~/.pulse*

Il secondo aggiungendo questa riga nella sezione [Service]:
Environment=DISPLAY=:0

Ora il servizio resta attivo ma mi resta un errore:

# systemctl status -l fluidsynth.service
fluidsynth.service - FluidSynth Synthesizer
   Loaded: loaded (/etc/systemd/system/fluidsynth.service; disabled)
   Active: active (running) since mar 2014-09-30 00:06:40 CEST; 7min ago
 Main PID: 30969 (pulseaudio)
   CGroup: /system.slice/fluidsynth.service
           └─30969 /usr/bin/pulseaudio --start --log-target=syslog

set 30 00:06:40 fede-xps pulseaudio[30969]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11





Reply to: