elementary / dock

A quick app launcher and window switcher for Pantheon and elementary OS
https://elementary.io
GNU General Public License v3.0
87 stars 24 forks source link

Add SystemD units for Autostart #189

Closed danirabbit closed 7 months ago

Marukesu commented 9 months ago

I believe we should use a systemd unit instead of autostart file.

danirabbit commented 9 months ago

@Marukesu I was trying to go that way at first, but couldn't figure it out :sweat_smile: It looks like we're using an autostart .desktop for notifications and the panel currently so I was having a hard time finding examples. Help appreciated!

tintou commented 9 months ago

Something like:

io.elementary.dock.target:

[Unit]
Description=GNOME Shell
DefaultDependencies=no

Requisite=gnome-session-initialized.target
PartOf=gnome-session-initialized.target
Before=gnome-session-initialized.target

Wants=io.elementary.dock.service

io.elementary.dock.service:

[Unit]
Description=Pantheon Dock

After=io.elementary.gala.target

Requisite=gnome-session-initialized.target
PartOf=gnome-session-initialized.target
Before=gnome-session-initialized.target

[Service]
Slice=session.slice
Type=notify
ExecStart=@bindir@/io.elementary.dock

# Lower down dock's OOM score to avoid being killed by OOM-killer too early
OOMScoreAdjust=-1000
danirabbit commented 9 months ago

@tintou pushed but I can't confirm that it works :grimacing: