[systemd-devel] How to create a systemd service?

jenia.ivlev jenia.ivlev at gmail.com
Tue Dec 16 18:34:49 PST 2014


Hello. 

I want to start synapse (its a program that allows to run programs more
easily) at login using systemd. So I created this systemd-service config file:

    [Unit]
    Description=Syanpse start up
    After=lxdm.service

    [Service]
    User=jenia
    ExecStart=/usr/bin/synapse

    [Install]
    WantedBy=multi-user.target

I doesnt work neither automatically, nor by calling
/usr/lib/systemd/system/synapse.service as so:
    systemctl start synapse

It tells me:

    ● synapse.service - Syanpse start up
       Loaded: loaded (/usr/lib/systemd/system/synapse.service; enabled)
       Active: failed (Result: exit-code) since Tue 2014-12-16 21:23:11 EST; 8min ago
      Process: 8545 ExecStart=/usr/bin/synapse (code=exited, status=1/FAILURE)
     Main PID: 8545 (code=exited, status=1/FAILURE)
    
    Dec 16 21:23:11 station1 systemd[1]: Started Syanpse start up.
    Dec 16 21:23:11 station1 synapse[8545]: [02:23:11.039206 Info] Starting up...
    Dec 16 21:23:11 station1 synapse[8545]: [02:23:11.040620 Gtk-Warning] cannot open display:
    Dec 16 21:23:11 station1 systemd[1]: synapse.service: main process exited, code=exited, status=1/FAILURE
    Dec 16 21:23:11 station1 systemd[1]: Unit synapse.service entered failed state.
    Dec 16 21:23:11 station1 systemd[1]: synapse.service failed.

How do I make this work, can someone please tell me?

Thanks in advance for your help and kind concern.

    
    



More information about the systemd-devel mailing list