I am behind a corporate fire wall and have been trying to set up my proxy settings by using export
in a shell script located in /etc/profile.d/proxy.sh
(see, e.g., How to set system-wide proxy address using shell script?).
While troubleshooting the settings, I also made changes in the "Network" GUI. I could not connect due to an error I introduced in the "Network" GUI, which I believe may have overridden the correct setting in the proxy.sh script file.
How does gsettings interact and/or conflict with environment variables set by scripts located in /etc/profile.d/
or /etc/environment
? Which settings take precedence if there is a conflict? If I am using Ubuntu Desktop (i.e., a GUI environment) is it preferably to edit environment variables using gsettings (either from the GUI or a script that sets gsettings) so that they are accessible in the GUI (i.e., I disabled the proxy settings in the GUI because they conflicted with my script, but now I cannot see the settings set by the script in the GUI)? Any thoughts on best practice would be most appreciated.
export http_proxy="http://$1/"; gsettings set org.gnome.system.proxy.http host "'$http_proxy'"
– Oct 15 '20 at 05:10