There are ways I tried to execute redshift automatically on login/startup:
Following every way I found in the web redshift doesn't start after login. I use debian 9 with GNOME shell.
Redshift from official Debian repository, installed via apt-get
Way 1
Add file: ~/.config/autostart/redshift.desktop with permission (chmod +x 'file')
Code: Select all
#[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec='/home/mateusz/run_redshift.sh'
Name=redshift_script
Code: Select all
/usr/bin/redshift -l 52.3:16.3 -t 6700:3500
Script seems to run, I can see echo commands inside, but redshift doesn't throw any error: line 1: [Desktop: command not found
Way 2
at the end of file: /etc/gdm3/Init/Default before 'exit 0' added those lines:
Code: Select all
/usr/bin/redshift -l 52.3:16.3 -t 6700:3500
Code: Select all
sudo crontab -e
at the end of the file added:
Code: Select all
@reboot export DISPLAY=:0 && /usr/bin/redshift -l 52.3:16.3 -t 6700:3500
I also found solution to add command to file: /etc/rc.local
but there has not been that file. I added this with my command
Code: Select all
pcscd
/usr/bin/redshift -l 52.3:16.3 -t 6700:3500
exit 0