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

Tweak systemd service files to avoid early startup failures #753

Merged
merged 3 commits into from
Jun 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,18 @@ Please go to [the issue tracker](https://github.com/jonls/redshift/issues) and
check if your issue has already been reported. If not, please open a new issue
describing you problem.


**When running as a systemd service, redshift fails to connect to
Xorg/Wayland**

You need to export your environment variables when you window manager or
compositor start up. Typically, you want to run this as part of its startup:

systemctl --user import-environment; systemctl --user start graphical-session.target

See your compositor's (or window manager's) documentation for further details
of setting up the systemd user session.

Latest builds from master branch
--------------------------------

Expand Down
4 changes: 2 additions & 2 deletions data/systemd/redshift-gtk.service.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[Unit]
Description=Redshift display colour temperature adjustment (GUI)
Documentation=http://jonls.dk/redshift/
After=display-manager.service
After=graphical-session.target

[Service]
ExecStart=@bindir@/redshift-gtk
Restart=always

[Install]
WantedBy=default.target
WantedBy=graphical-session.target
4 changes: 2 additions & 2 deletions data/systemd/redshift.service.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[Unit]
Description=Redshift display colour temperature adjustment
Documentation=http://jonls.dk/redshift/
After=display-manager.service
After=graphical-session.target

[Service]
ExecStart=@bindir@/redshift
Restart=always

[Install]
WantedBy=default.target
WantedBy=graphical-session.target