Using gconf to script Gnome Proxy Settings
- From: Darren Hart <darren dvhart com>
- To: gconf-list gnome org
- Subject: Using gconf to script Gnome Proxy Settings
- Date: Sat, 18 Sep 2010 11:07:52 -0700
I'm looking to write some scripts to automate proxy settings after
connecting to my company vpn.
What I would like to do is set the various proxy host/port values via
gconf on vpn-up and vpn-down events. I've written a script to detect
these events and placed it in /etc/NetworkManager/dispatcher.d/. In
this script I try to use gconftool to set the /system/http_proxy/host
and other such values. When I run this script from my user session, it
works as expected, when running from the nm dispatcher, it doesn't
seem to change the values. It runs as root there, so I even tried it
with "su myuser -c " without success. I have confirmed that the script
is running and that it correctly identifies the vpn-up and vpn-down
events via some print statements to the syslog.
I would also like it to be able to do the equivalent of "Apply
System-Wide..." from the gnome-network-properties dialog. I tried
telling gconftool to use the /etc/gconf/gconf.xml.defaults config, but
that did change those values either.
Lastly, I haven't been able to determine where the ALL_PROXY and
NO_PROXY env vars get set, as they are not written to
/etc/environment.
Is there something I need to do in order to have changes made by root
be reflected in the gconf setting of the running user?
Thanks,
--
Darren Hart
--
Darren Hart
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]