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.87k stars 424 forks source link

Fix apparmor config. #864

Open rumpeltux opened 2 years ago

rumpeltux commented 2 years ago

Related bugs:

src/config-ini.c still looks for $HOME/.config/redshift.conf which fails to open because the apparmor profile doesn’t allow it.

src/config-ini.c also does this:

   struct passwd *pwd = getpwuid(getuid());
   char *home = pwd->pw_dir;

Since getpwuid doesn’t have access to /etc/passwd* it returns NULL, causing a segmentation fault in the line thereafter. This code is not triggered if a config is specified (e.g. -c redshift.conf) or $HOME/.config/redshift.conf exists.

CameronNemo commented 2 years ago

I will remind everyone at Debian that Gammastep is a fork of Redshift that is maintained and accepting pull requests. It still supports all of the FOSS backends that Redshift supports (only Windows and macOS support were removed, not X or DRM; Wayland support was added).

You may also find this fix, that has been included in gammastep for over 2 years, helpful:

https://gitlab.com/chinstrap/gammastep/-/commit/9db19f5ccfad20ab7b501daedcfd5ef137860dd2

Gammastep in Debian could use an update, from 2.0.2 to 2.0.9. There have been some relevant fixes since the last version was uploaded to Sid. https://gitlab.com/chinstrap/gammastep/-/blob/master/NEWS.md