Re: Network Manager and Gnome Proxy Settings

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

 



On Sat, Sep 18, 2010 at 10:12 AM, Daniel Rogers <dsrogers@xxxxxx> wrote:

Hi Daniel, thanks for sharing. A couple questions below...

> I've done exactly this, though it required quite a bit more magic.  You
> can't run from just any user session.  It has to be a user session that
> knows whatever environment is necessary to connect to an existing gconf
> daemon.  Otherwise the effects will not be persistent.
>
> The only way I was able to get it to work was to add:
>
> xml:readonly:$(HOME)/.nm/gconf
>
> To my users $HOME/.gconf.path.mandatory
>
> Then create a proxy configuration file as a gconftool dump:
>
> gconftool --dump /system/proxy > ~/.nm/system.proxy.xml
> gconftool --dump /system/http_proxy > ~/.nm/system.http_proxy.xml
>
> Then when the network comes up set the properties in $HOME/.nm/gconf
> without a running gconfd with gconftool --direct:
>
> gconftool --direct --config-source=xml:readwrite:$HOME/.nm/gconf --load=
> $HOME/.nm/system.proxy.xml /system/proxy
> gconftool --direct --config-source=xml:readwrite:$HOME/.nm/gconf --load=
> $HOME/.nm/system.http_proxy.xml /system/http_proxy
> #this part forces all running gconfd-2's to reload read-only data.
> killall -q -HUP gconfd-2


Where do you run this script from? The nm dispatcher scripts are run
as root, so the $HOME would expand to /root, rather than
/home/<myuser>...


> Setting .gconf.path.mandatory this way cases $HOME/.nm/gconf to take
> priority over the normal read-write gconf database.  This also has the
> effect of making everything in /system/proxy and /system/http_proxy
> read-only, effectively breaking gnome-network-settings.  I combine this
> with a per-location set of network manager scripts (using the network
> manager uuid), to set my proxy based on location.

Hrm, that is the sort of breakage I was trying to avoid by using the
gconf tool. Why use gconf at all if breaks the GNOME tooling? It would
be far easier to just write to /etc/environment and a similar user
file that the .bashrc can source. I suppose this doesn't setup the
gnome proxy for apps that use that... ugh...

-- 
Darren Hart
_______________________________________________
gnome-list mailing list
gnome-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gnome-list



[Index of Archives]     [Fedora Desktop]     [Trinity Users]     [KDE]     [Gimp]     [Yosemite News]

  Powered by Linux