In my Zorin OS redshift is installed by default - an application that makes the screen warmer.
To enable it I had the following command added on startup:
redshift -O VALUE = value affects color
My thinking:
"Session and startup" -> Application Autostart -> Add
name "redshift"
description "redshift"
command redshift -O VALUE
trigger "on login"
Problem:
Does not work as I log in. However - if I changed trigger from "on login" to "on switch user/on suspend"- it works!
Did you placed the script file in ~/.config/autostart and made it executable? Also try put a timer in the script so Gnome have time to startup before the command is executed.
Changed sleep 1000 into sleep 1.
It worked, but the interesting thing is that it worked even when I removed the "#!/bin/bash"
sleep 1 && redshift -O VALUE
I do not understand one thing thou: in "Session and startup" -> Application Autostart -> Add" I can as well enter a command itself. Instead of linking command to that .sh script I tried to simply insert "sleep 1 && redshift -O VALUE", but it did not work. Why?
sh stands for "shell" and shell is the old, Unix like command line interpreter. An interpreter is an program that executes specific instructions written in a programming or scripting language. So basically you say "Execute that file for me".