jonls / redshift

Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.
http://jonls.dk/redshift
GNU General Public License v3.0
5.82k stars 424 forks source link

redshift-gtk doesn't read conf files at log-in #870

Open PolGZ opened 1 year ago

PolGZ commented 1 year ago

I have checked the FAQ and open issues, and I don't think my issue is exactly mentioned there, since it is not because I'm using the ~/.config/redshift/redshift.conf path.

  1. When run from terminal redshift-gtk -c ~/.config/redshift.conf it works fine
  2. When I run the same command from my WM (bspwmrc) it works fine
  3. When run by loggin in from ~/.config/autostart (using dex) it says "no such file or directory, unable to load the file"

Here is my .desktop file:

[Desktop Entry]
Version=1.0
Name=Redshift
Exec=redshift-gtk -c ~/.config/redshift.conf
Icon=redshift
Terminal=false
Type=Application
Categories=Utility;
StartupNotify=true
Hidden=false
X-GNOME-Autostart-enabled=true

Expected behavior Being able to load it at start using dex as any of my other autostart .desktop files. dex -a -s /etc/xdg/autostart/:~/.config/autostart/

Error output/logs/screenshots error.png

Software versions (please complete the following information):

Others If you are wondering why I don't just run it from my bspwmrc it is because it creates by default a redshift-gkt.desktop file when it launches, so next time I restart my WM or log-out&back in, I get the error again.

For now I commented out the "Exec=" line on the desktop file, so it doesn't create another one and it runs just from my window manager startup programs, but since it creates a autostart entry on its own, I would like to know why it can't read the file, and I would like to use it, so I also get it on other WMs and x11 DEs from that autostart .desktop file.

philippludwig commented 1 year ago

This is most likely because the ~ is not expanded in your .desktop file; put the complete path there and it should work.