Control: tags -1 - moreinfo
On Fri, 18 Oct 2013 23:22:58 -0300 Lisandro Damián Nicanor Pérez Meyer wrote: > On Friday 18 October 2013 00:48:47 Francesco Poli wrote: [...] > > By the way, if I understand correctly, the > > /usr/share/squid-deb-proxy-client/apt-avahi-discover > > command detects the appropriate acng proxy and prints something like > > http://acng.example.com:3142/ > > to its stdout. > > > > Does this command require root privileges or can you just run it as a > > regular user and get the correct output? > > I've just ran it with my regular user and got http://192.168.1.5:3142/, which > is correct. Good! [...] > > I hope KDE writes this setting to an easy-to-read place. > > If this is the case, then, while waiting for a more elegant solution, > > you could prepare a trivial script that reads the proxy from there and > > sets the http_proxy environment variable. > > Oh well, the script should be sourced, rather than executed, in order > > to set an environment variable that can actually survive after the > > script exits... Maybe a shell function (to be placed into your the > > shell initialization file) would be better: it would become a > > ready-to-use command to update the http_proxy variable... > > > > This could be useful for other programs too, such as wget or some > > textual web browser, I think. > > > > I hope this helps a bit... > > I really don't know how KDE or Gnome handles this, but I would expect a dbus > thing. Then maybe you could set the http_proxy environment variable to the value printed by /usr/share/squid-deb-proxy-client/apt-avahi-discover , assuming that this does not break other programs that use this environment variable... If you use a POSIX-compatible shell (such as GNU Bash) you could maybe define the following function in a suitable ~/.profile : update_http_proxy() { http_proxy=`/usr/share/squid-deb-proxy-client/apt-avahi-discover` export http_proxy } or something similar... Then the command $ update_http_proxy could be used in order to set the http_proxy to an updated value, whenever the box changes network. In case you test this workaround, please let me know whether it works acceptably... Bye. -- http://www.inventati.org/frx/frx-gpg-key-transition-2010.txt New GnuPG key, see the transition document! ..................................................... Francesco Poli . GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE
pgp5OWE0WW_hp.pgp
Description: PGP signature

