varietywalls / variety

Wallpaper downloader and manager for Linux systems
http://peterlevi.com/variety
GNU General Public License v3.0
1.13k stars 137 forks source link

ADD abslute path for gsettings to avoid conflicts whit linuxbrew #598

Closed arpagon closed 1 year ago

arpagon commented 1 year ago

It is safer to use the full path of gsettings to avoid conflicts with other gsettings that may be using different backends. For example, when using gsettings from the Linuxbrew GLib, it uses the keyfile backend, whereas in Ubuntu the backend for gsettings is already dconf.

Using the full path eliminates the possibility of running an unintended version of gsettings, which could lead to unexpected results. Additionally, it ensures that the intended version of gsettings is used consistently across all scripts and applications, regardless of the user's PATH environment variable.

I suggest adding a note in the documentation or wiki to encourage users to use the full path of gsettings, such as "/usr/bin/gsettings", to avoid conflicts.

Thank you for considering this suggestion.

jlu5 commented 1 year ago

I'm not convinced this is the right approach. The whole point of an adjustable PATH is so that programs shouldn't have to hardcode where other applications are. Unfortunately this is a common problem when you add overlay PATHs to programs not expecting it, but it's not really Variety's fault that it hasn't been told where the right gsettings binary is!

As a workaround, have you tried changing the PATH variable when starting Variety instead? e.g. launch it via env PATH=/usr/bin:/bin variety or set the .desktop file to do the same.

arpagon commented 1 year ago

Thanks so much @jlu5 Works like a charm I don't know why it didn't occur to me before.