Network Manager and Gnome Proxy Settings



I'm looking to write some scripts to automate proxy settings after
connecting to my company vpn. I think my questions are best directed
to network-manager and gnome-network-properties (gnome-control-center)
developers. I didn't see an appropriate list for the latter on
mail.gnome.org (networkmanager isn't listed there either for some
reason). If someone can suggest an appropriate list for
gnome-network-properties, I would appreciate it.

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 a way to run a post-vpn script that has the appropriate
"scope" to modify the necessary gconf settings to update both the user
proxies as well as the system-wide proxies?

Thanks,

--
Darren Hart


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]