You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected
The settings in the configuration ~/.config/redshift.conf are used. Actual
The configuration file is ignored.
Context
I use a dotfile manager named "gog" to save redshift.conf to ~/.local/share/gog/.../redshift.conf, which is then symlinked to ~/.config/redshift.conf. This used to work, but upon upgrading redshift recently this no longer works as expected. I was using the version of redshift distributed with Ubuntu 20.04, and am now using the version distributed with 21.10: 1.12-4.2ubuntu1.
I use the manual location provider, not geoclue2. This symlink scenario does not work.
On the otherhand, the configuration file is used when the configuration file is not a symlink:
$ ls -l ~/.config/redshift.conf
-rw-rw-r-- 1 andornaut andornaut 294 Dec 28 09:55 /home/andornaut/.config/redshift.conf
$ redshift -v
Solar elevations: day above 3.0, night below -6.0
The no-symlink scenario above works as expected.
Additionally, using the -c flag doesn't appear to work at all:
$ chmod 644 redshift.conf
$ ls -l redshift.conf
-rw-r--r-- 1 andornaut andornaut 312 Dec 28 10:15 redshift.conf
$ redshift -c redshift.conf
fopen: Permission denied
Unable to load config file.
Software versions (please complete the following information):
OS: Linux
Redshift version: redshift 1.12
Distribution: Ubuntu 21.10
Redshift installed from: "using apt-get"
The text was updated successfully, but these errors were encountered:
I had the same issue but in the end the problem was not with Redshift but with an Apparmor profile for Redshift that was blocking access to files outside of the default Redshift config directory. The solution is to create a local override of the profile:
sudo vi /etc/apparmor.d/local/usr.bin.redshift
add this line:
owner @{HOME}/.../redshift.conf r,
(you need to put the correct path above) Then reload Apparmor configuration:
sudo systemctl reload apparmor
I tested this on Debian but it should work also for Ubuntu.
I had the same issue but in the end the problem was not with Redshift but with an Apparmor profile for Redshift that was blocking access to files outside of the default Redshift config directory. The solution is to create a local override of the profile:
sudo vi /etc/apparmor.d/local/usr.bin.redshift
add this line:
owner @{HOME}/.../redshift.conf r,
(you need to put the correct path above) Then reload Apparmor configuration:
sudo systemctl reload apparmor
I tested this on Debian but it should work also for Ubuntu.
For some reason
Reloading apparmor didn't work
I had to reboot my system to make the changes take effect
Any explanations why?
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
ln -s $PATH_TO_REDSHIFT_CONFIG ~/.config/redshift.conf
redshift -v
Expected
The settings in the configuration
~/.config/redshift.conf
are used.Actual
The configuration file is ignored.
Context
I use a dotfile manager named "gog" to save redshift.conf to
~/.local/share/gog/.../redshift.conf
, which is then symlinked to~/.config/redshift.conf
. This used to work, but upon upgrading redshift recently this no longer works as expected. I was using the version of redshift distributed with Ubuntu 20.04, and am now using the version distributed with 21.10:1.12-4.2ubuntu1
.Example where the configuration file is ignored.
I use the manual location provider, not geoclue2. This symlink scenario does not work.
On the otherhand, the configuration file is used when the configuration file is not a symlink:
The no-symlink scenario above works as expected.
Additionally, using the
-c
flag doesn't appear to work at all:Software versions (please complete the following information):
redshift 1.12
The text was updated successfully, but these errors were encountered: