redshift icon indicating copy to clipboard operation
redshift copied to clipboard

erroneous documentation about configuration file

Open farvardin opened this issue 2 years ago • 6 comments

Describe the bug

The Readme states:

"The configuration file should be saved in the following location depending on the platform:

Linux/macOS: ~/.config/redshift/redshift.conf (if the environment variable XDG_CONFIG_HOME is undefined) or ${XDG_CONFIG_HOME}/redshift/redshift.conf (if XDG_CONFIG_HOME is defined).

"

https://github.com/jonls/redshift

but it won't work if redshift.config is located into ~/.config/redshift:

"cp redshift.conf ~/.config/redshift/"

it will only work if the conf is ~/.config/redshift.conf instead

as correctly documented in http://jonls.dk/redshift/#configuration-file

farvardin avatar Jan 11 '23 21:01 farvardin

Also curious about this. I always kinda suspected my redshift.conf file wasn't actually doing anything, so I'd also like to know which path is the right one.

Update: oh wow holy crap yeah it definitely DOESN'T work at the documented path of ~/.config/redshift/redshift.conf and DOES work at ~/.config/redshift.conf. I tested with a very extreme conf file in the latter directory while deleting/removing my original (and seemingly ineffective) conf file in the former directory.

So yeah. Official documentation is wrong/bad.

yllekz avatar Feb 03 '23 02:02 yllekz

To help a little: You can use redshift -v -p (in the console) to check the configuration redshift would use.

~/.config/redshift.conf and ~/.config/redshift/redshift.conf both work for me. (XDG_CONFIG_HOME unset.)
Changelog dates back to https://github.com/jonls/redshift/releases/tag/v1.12 (the sub-dir is used preferable since then), though the website seems outdated about this.

Other things to look into could be: Permissions, Typos, env, Paths?

I'd suggest to provide some setup information (aka. complete the issue template) For example, this might be needed at minimum:

**Software versions (please complete the following information):**
 - OS: [e.g. Linux/Windows/macOS]
 - Redshift version: [e.g. 1.11, run `redshift -V` in a terminal]
 - Distribution: [e.g. Ubuntu]
 - Redshift installed from: [e.g. "using apt-get", "built from source"]

PS: I'm not a maintainer and just stumbled over this issue while browsing :woman_shrugging:

EngelPika32 avatar Mar 08 '23 18:03 EngelPika32

I can reproduce this issue on Linux Mint 21.

If I save my configuration as ~/.config/redshift/redshift.conf and run redshift -p, it prints the default actions (4500k, geoclue2, etc.)

If I save my configuration as ~/.config/redshift.conf and run redshift -p, my configurations are printed as defined in my .conf.

srappel avatar Nov 02 '23 01:11 srappel

I'd suggest to provide some setup information (aka. complete the issue template) For example, this might be needed at minimum:

I've tried again, with the config in ~/.config/redshift.conf and in ~/.config/redshift/redshift.conf with redshift 1.12 on Linux Mint 21.2

I can find the matching informations from redshift -p -v in both case. If I remove the redshift.conf from any of those location, then it will go to default (geoclue2 and 6500K / 4500K)

Maybe redshift / the distribution had been upgraded since then...

@srappel do you have the same redshift version? (1.12)

farvardin avatar Nov 02 '23 12:11 farvardin

do you have the same redshift version? (1.12)

Yes, but I have not updated LM to 21.2 yet.

srappel avatar Nov 02 '23 14:11 srappel

I can reproduce this issue on Linux Mint 21.

If I save my configuration as ~/.config/redshift/redshift.conf and run redshift -p, it prints the default actions (4500k, geoclue2, etc.)

If I save my configuration as ~/.config/redshift.conf and run redshift -p, my configurations are printed as defined in my .conf.

I couldn't understand why redshift wouldn't read my configuration also.

Turns out that this is a bug with AppArmor not allowing redshift to read the configuration if its located in ~/.config/redshift/redshift.conf

However, This is is the correct, new path, but its affect by this: https://github.com/jonls/redshift/issues/820#issuecomment-899798987. (more info: https://github.com/jonls/redshift/issues/850#issuecomment-1193378198)

Luckily, the previous (now deprecated) path ~/.config/redshift.conf still appear to be working without problems.

This should probably be mentioned in the readme until the bug is fixed

paccerdk avatar Nov 28 '23 16:11 paccerdk