Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

erroneous documentation about configuration file #878

Open
farvardin opened this issue Jan 11, 2023 · 6 comments
Open

erroneous documentation about configuration file #878

farvardin opened this issue Jan 11, 2023 · 6 comments

Comments

@farvardin
Copy link

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

@yllekz
Copy link

yllekz commented Feb 3, 2023

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.

@EngelPika32
Copy link

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 🤷‍♀️

@srappel
Copy link

srappel commented Nov 2, 2023

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.

@farvardin
Copy link
Author

farvardin commented Nov 2, 2023

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)

@srappel
Copy link

srappel commented Nov 2, 2023

do you have the same redshift version? (1.12)

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

@paccerdk
Copy link

paccerdk commented Nov 28, 2023

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: #820 (comment). (more info: #850 (comment))

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants