Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SystemD units for Autostart #189

Merged
merged 11 commits into from
Jan 5, 2024
Merged

Add SystemD units for Autostart #189

merged 11 commits into from
Jan 5, 2024

Conversation

danirabbit
Copy link
Member

No description provided.

@danirabbit danirabbit requested a review from a team November 7, 2023 21:16
@Marukesu
Copy link
Contributor

Marukesu commented Nov 7, 2023

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

@danirabbit
Copy link
Member Author

@Marukesu I was trying to go that way at first, but couldn't figure it out 😅 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
Copy link
Member

tintou commented Nov 9, 2023

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
Copy link
Member Author

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

@danirabbit danirabbit changed the title Add desktop to autostart Add SystemD units for Autostart Nov 9, 2023
data/dock.service.in Outdated Show resolved Hide resolved
data/dock.service.in Outdated Show resolved Hide resolved
data/dock.target Outdated Show resolved Hide resolved
@danirabbit danirabbit requested a review from Marukesu January 4, 2024 19:48
Copy link
Contributor

@Marukesu Marukesu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@danirabbit danirabbit merged commit 70deba9 into main Jan 5, 2024
4 checks passed
@danirabbit danirabbit deleted the danirabbit/autostart branch January 5, 2024 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants