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

symbolic link problem with configuration file #877

Open farvardin opened 1 year ago

farvardin commented 1 year ago

Describe the bug It looks like we can't use symbolic links with the configuration file (on Linux Mint 21)

To Reproduce Steps to reproduce the behavior:

I've made a link from my dotfile folder:

ln -s redshift.conf ~/.config/

Then redshift didn't took my changes into account. I've tested it from 2 different computers.

I've copied it instead

rm ~/.config/redshift.conf cp redshift.conf ~/.config/

then my settings are working.


```**Expected behavior**

Redshift conf should work from an original file or from a symbolic link.

**Software versions (please complete the following information):**
 - OS: Linux mint 21
 - Redshift version: redshift 1.12
 - Distribution:  Linux Mint
 - Redshift installed from: apt-get
BrokenParity commented 11 months ago

just stumbled upon this now. i don't know Mint Linux very well, but if this is Ubuntu/Debian derived, you have to adjust your 'apparmor' settings to allow 'redshift' to read its config file from locations other than '$HOME/.config', and apparmor doesn't allow it to follow symlinks as well. not a bug.

farvardin commented 11 months ago

well, I've never bothered with AppArmor, I didn't even know it was used outside some servers' scope.

I suppose redshift has made some adjustement to skip AppArmor stuff, because none of my other applications behave this way, I can use symbolic links with a specific dotfiles folder.

It might not be a bug, but it's quite an annoyance, and it doesn't seem very logical to have such a behavior from AppArmor. If it's the default feature of apparmor, then I'll see if I can disable it completely, I don't like when a program make unix things behave unexpected, especially without any clear warning.