aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2020-06-14 09:23:15 -0700
committerGitHub <noreply@github.com>2020-06-14 09:23:15 -0700
commite8ff48cf11ed07c8a3d105bfe5381c4407b2e925 (patch)
treeb59bb39f6dc5d4322501f046f7321639915635fe
parentMerge branch 'pull/751' (diff)
parentAdd a FAQ entry on issues with running via systemd (diff)
downloadredshift-ng-e8ff48cf11ed07c8a3d105bfe5381c4407b2e925.tar.gz
redshift-ng-e8ff48cf11ed07c8a3d105bfe5381c4407b2e925.tar.bz2
redshift-ng-e8ff48cf11ed07c8a3d105bfe5381c4407b2e925.tar.xz
Merge pull request #753 from WhyNotHugo/systemd-tweaks
Tweak systemd service files to avoid early startup failures
-rw-r--r--README.md12
-rw-r--r--data/systemd/redshift-gtk.service.in4
-rw-r--r--data/systemd/redshift.service.in4
3 files changed, 16 insertions, 4 deletions
diff --git a/README.md b/README.md
index 453b32a..e5ff74c 100644
--- a/README.md
+++ b/README.md
@@ -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
--------------------------------
diff --git a/data/systemd/redshift-gtk.service.in b/data/systemd/redshift-gtk.service.in
index 4675ccf..79e6165 100644
--- a/data/systemd/redshift-gtk.service.in
+++ b/data/systemd/redshift-gtk.service.in
@@ -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
diff --git a/data/systemd/redshift.service.in b/data/systemd/redshift.service.in
index bc51514..aad31ca 100644
--- a/data/systemd/redshift.service.in
+++ b/data/systemd/redshift.service.in
@@ -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