I had plenty of issues trying to get redshift-gtk
to autostart on my laptop (running Mint KDE 18). In the end I manged to get the right systemd
configuration settings...
[Unit]
Description=Redshift display colour temperature adjustment
Documentation=http://jonls.dk/redshift/
After=display-manager.service
[Service]
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/redshift-gtk -l 51.5:-0.1
Restart=on-failure
RestartSec=2
[Install]
WantedBy=default.target
This should be saved as a user unit configuration file here:
~/.config/systemd/user/redshift-gtk.service
You can test the above by running:
systemctl --user start redshift-gtk
You should be able to see redshift-gtk
working, or you can check that it is working by running:
systemctl --user status redshift-gtk
NOTE: see the listing at the bottom for example output.
Assuming the redshift-gtk
service started correctly, you can set it to run automatically as part of the initial user login:
systemctl --user enable redshift-gtk
You can check that has worked correctly by running:
systemctl --user list-dependencies default.target
This should show something like the following (note the second line, directly below default.target
):
default.target
● ├─redshift-gtk.service
● └─basic.target
● ├─paths.target
● ├─sockets.target
● └─timers.target
Now when you restart you should see redshift-gtk
working, but again you can check by running:
systemctl --user status redshift-gtk
Which should produce something like the following:
● redshift-gtk.service - Redshift display colour temperature adjustment
Loaded: loaded (/home/robin/.config/systemd/user/redshift-gtk.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2016-11-05 17:07:28 GMT; 47s ago
Docs: http://jonls.dk/redshift/
Main PID: 2074 (redshift-gtk)
CGroup: /user.slice/user-1000.slice/user@1000.service/redshift-gtk.service
└─2074 /usr/bin/redshift-gtk -l 51.5 -0.1
Nov 05 17:07:28 rksd-dev-01 systemd[1801]: redshift-gtk.service: Service hold-off time over, scheduling restart.
Nov 05 17:07:28 rksd-dev-01 systemd[1801]: Stopped Redshift display colour temperature adjustment.
Nov 05 17:07:28 rksd-dev-01 systemd[1801]: Started Redshift display colour temperature adjustment.
gtk-redshift
instead ofredshift-gtk
. – αғsнιη Aug 19 '14 at 10:58gtk-redshift
in my terminal : the programm is not found – Nymeria Aug 19 '14 at 11:00redshift-gtk
requires at least Python 3.2 (since Redshift 1.9). Before version 1.8redshift-gtk
was known asgtk-redshift
. – αғsнιη Aug 19 '14 at 11:04redshift-gtk
(see theExec=
line in its desktop file in/usr/share/applications
). Since it runs from command line, it should run as a startup application as well. – Jacob Vlijm Aug 19 '14 at 11:15redshift-gtk.desktop
, the Exec line look like :Exec=redshift-gtk
– Nymeria Aug 19 '14 at 11:27redshift-gtk
in your startup applications. Silly thought, but could you try/usr/bin/redshift
? – Jacob Vlijm Aug 19 '14 at 12:45pgrep redshift
: no result found – Nymeria Aug 19 '14 at 13:08~/.config/autostart
? – Jacob Vlijm Aug 19 '14 at 13:29