From 6993b09267f7f1d958bdf60b57ad0e5f8124cda7 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 22 Aug 2021 17:04:06 -0400 Subject: .fluxbox/startup.d/redshift: Pass -l on cmd line And delete .redshift.conf. Redshift 1.12 when trying to read a configuration file hangs/loops with an error dialog saying: Failed to run Redshift fopen: Permission denied Unable to load config file. Similar bug, but caused by AppArmor: https://github.com/jonls/redshift/issues/672 Relevant code: src/redshift.c /* Load settings from config file. */ config_ini_state_t config_state; r = config_ini_init(&config_state, options.config_filepath); if (r < 0) { fputs("Unable to load config file.\n", stderr); exit(EXIT_FAILURE); } src/config-ini.c static FILE * open_config_file(const char *filepath) { [...] if (filepath == NULL) { [...] } else { f = fopen(filepath, "r"); if (f == NULL) { perror("fopen"); return NULL; } } return f; } int config_ini_init(config_ini_state_t *state, const char *filepath) { config_ini_section_t *section = NULL; state->sections = NULL; FILE *f = open_config_file(filepath); if (f == NULL) { /* Only a serious error if a file was explicitly requested. */ if (filepath != NULL) return -1; return 0; } --- (limited to '.fluxbox/startup.d') diff --git a/.fluxbox/startup.d/redshift b/.fluxbox/startup.d/redshift index bf40b5b..42c4c11 100755 --- a/.fluxbox/startup.d/redshift +++ b/.fluxbox/startup.d/redshift @@ -2,4 +2,4 @@ set -eu -redshift-gtk -c "${HOME}/.redshift.conf" & +redshift-gtk -l 41:-75 & -- cgit v0.9.1