You are not logged in.

#1 2018-01-14 19:56:57

lazystring
Member
Registered: 2018-01-12
Posts: 7

[SOLVED] Autostart plank using systemd

I'm currently attempting to write a unit file to automatically start plank upon boot by following this guide.

What I have so far is this:

/usr/lib/systemd/user/plank.service
---------------------------------------------------------
[Unit]
Description=Plank dock

[Service]
Type=simple
ExecStart=/usr/bin/plank

[Install]
WantedBy=default.target

This works fine if I just want to start the service at some arbitrary time, but when enabling to start at boot, it fails with the following log messages:

Jan 14 11:39:42 hostname plank[798]: Unable to init server: Could not connect: Connection refused
Jan 14 11:39:42 hostname systemd[792]: plank.service: Main process exited, code=exited, status=1/FAILURE
Jan 14 11:39:42 hostname systemd[792]: plank.service: Failed with result 'exit-code'.

I'm assuming there is probably a dependency of plank that I'm not including in the unit file. Possibly something to do with X.Org Server or Gnome?

Any help (and possibly a short explanation of the dependencies here) would be much appreciated.

Last edited by lazystring (2018-01-14 20:48:01)

Offline

#2 2018-01-14 20:02:07

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] Autostart plank using systemd

Why start it from systemd and not the startup files of your your wm/de?


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2018-01-14 20:03:32

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Autostart plank using systemd

Writing a systemd service file is the wrong approach for this.

https://wiki.archlinux.org/index.php/Autostarting

Last edited by Slithery (2018-01-14 20:05:34)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2018-01-14 20:47:46

lazystring
Member
Registered: 2018-01-12
Posts: 7

Re: [SOLVED] Autostart plank using systemd

Awesome, thanks! I was able to add it as a startup application through the gnome-tweak-tool.

Offline

Board footer

Powered by FluxBB