3

I have a system running Ubuntu 14.04.1. I would like to set the proxy settings globally via gsettings, but unfortunately I can't seem to change anything. I run the following command as root:

gsettings set org.gnome.system.proxy mode manual

When I try to retrieve the configuration, the mode is still set to 'none':

# gsettings get org.gnome.system.proxy mode
'none'

Any hints or ideas?

watain
  • 133

1 Answers1

4

Running gsettings only changes the settings for the user who owns the X session that $DISPLAY points to. If you use sudo that's your current user. You can see that by the file $HOME/.config/dconf/user being modified.

To change the default settings for all users create the file /usr/share/glib-2.0/schemas/org.gnome.system.proxy.gschema.override with the content

[org.gnome.system.proxy]
mode="manual"

Then run

sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
  • Running gsettings only changes the settings for root. Not on my system(s), OP's command works perfectly here. – Jacob Vlijm May 10 '16 at 10:44
  • @Jacob Vlijm: The command actually doesn't change the settings for root but the settings for the user who owns the X session that $DISPLAY points to. If you use sudo that's the calling user (fixed that in my answer). It doesn't change any global settings so the settings for other users don't change. – Florian Diesch May 10 '16 at 12:00
  • You should never change things in /usr/. I'm almost sure there is a way do these changes in /etc/. – Bachsau Feb 05 '17 at 23:12
  • @Bachsau . Please could you elaborate how you would implement these changes in /etc/* ? Are you referencing creating a plain text keyfile in /etc/dconf/db/database.d/ directory, and a corresponding 'lock' file, as per https://wiki.gnome.org/Projects/dconf/SystemAdministrators, as I cannot get this to work https://askubuntu.com/questions/1038184/…. – case_2501 4 – Andrew Hardiman May 20 '18 at 16:32
  • @FlorianDiesch . I do not believe this will work with the quotation marks around the key value, i.e. "manual". At least it does not for me, and returns the following error when sudo glib-compile-schemas..... is run: '0-7:can not parse as value of type 'b'. Ignoring override for this key'. Removing the quotation marks resolves this issue. – Andrew Hardiman May 20 '18 at 16:48