Doesn't utilize network proxy settings

Bug #185206 reported by Kevin Slater
This bug report is a duplicate of:  Bug #94130: HTTPS over proxy fails. Edit Remove
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Awn Extras
Confirmed
Medium
Unassigned

Bug Description

When avn starts up from the menu in Ubuntu Gutsy Gibbon, it doesn't take into account the network proxy settings. If you start it from a terminal window with the network proxy settings in effect it *will* take those settings into account.

Revision history for this message
Neil J. Patel (njpatel) wrote :

As Awn itself doesn't actually use the network, I'm reassigning this bug against awn-extras (some applets use network).

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Thanks for the report. Which applets do you use that have this issue? Is all applets that require network access or a specific one?

Changed in awn-extras:
status: New → Incomplete
Revision history for this message
Kevin Slater (kevin-slater) wrote : Re: [Bug 185206] Re: Doesn't utilize network proxy settings

The two that I ran into it with are the Daily Dilbert (or other comic) and
Weather applets. Although, since I switched my network over to transparently
proxying of http traffic I don't see it any more (obviously).

On Jan 31, 2008 3:39 PM, Andrew Starr-Bochicchio <email address hidden>
wrote:

> Thanks for the report. Which applets do you use that have this issue? Is
> all applets that require network access or a specific one?
>
> ** Changed in: awn-extras
> Status: New => Incomplete
>
> --
> Doesn't utilize network proxy settings
> https://bugs.launchpad.net/bugs/185206
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
-- "Not everything that counts can be counted, and not everything that can
be counted counts." (Sign hanging in Einstein's office at Princeton)

Changed in awn-extras:
status: Incomplete → New
moonbeam (rcryderman)
Changed in awn-extras:
assignee: nobody → desjardinsmike
status: New → Confirmed
Revision history for this message
muddog (muddogxp) wrote :
Download full text (4.8 KiB)

I made a patch to make proxy configurable for weather applet, but my calender also need it.
So it's better to add a global proxy configuration for all applets who require network access.

diff -uNr weather.orig/weatherconfig.py weather/weatherconfig.py
--- weather.orig/weatherconfig.py 2009-01-12 20:36:29.000000000 +0800
+++ weather/weatherconfig.py 2009-01-12 16:39:43.000000000 +0800
@@ -212,6 +212,24 @@
   search.connect("clicked", self.search_button, "search")
   vbox.pack_start(hbox2,True,False,2)

+ # proxy settings
+ self.proxy_checkbox = gtk.CheckButton(_("HTTP Proxy"))
+ # enable proxy editor
+ self.proxy_editor = gtk.Entry()
+ if applet.proxy:
+ self.proxy_checkbox.set_active(True)
+ self.proxy_editor.set_sensitive(True)
+ self.proxy_editor.set_text(applet.http_proxy)
+ else:
+ self.proxy_checkbox.set_active(False)
+ self.proxy_editor.set_sensitive(False)
+ hbox5 = gtk.HBox(True,0)
+ hbox5.pack_start(self.proxy_checkbox,True,False,0)
+ hbox5.pack_end(self.proxy_editor)
+ self.proxy_checkbox.connect("toggled", self.proxy_cb, "proxy")
+ vbox.pack_start(hbox5,True,False,0)
+
+ # ok/cancel button
   hbox4 = gtk.HBox(True, 0)
   ok = gtk.Button(stock=gtk.STOCK_OK)
   ok.connect("clicked", self.ok_button, "ok")
@@ -242,7 +260,16 @@
   self.applet.gconf_client.set_int(self.applet.gconf_path + "/temp_position", self.temp_pos.get_active())
   self.applet.gconf_client.set_bool(self.applet.gconf_path + "/open_til_clicked", self.click_checkbox.get_active())
   self.applet.gconf_client.set_bool(self.applet.gconf_path + "/curved_dialog", self.click_checkbox2.get_active())
+ self.applet.gconf_client.set_bool(self.applet.gconf_path + "/proxy", self.proxy_checkbox.get_active())
+ self.applet.gconf_client.set_string(self.applet.gconf_path + "/http_proxy", self.proxy_editor.get_text())
   self.destroy()

  def cancel_button(self, widget, event):
   self.destroy()
+
+ def proxy_cb(self, widget, event):
+ if self.proxy_checkbox.get_active():
+ self.proxy_editor.set_sensitive(True)
+ self.proxy_editor.set_text(self.applet.http_proxy)
+ else:
+ self.proxy_editor.set_sensitive(False)
diff -uNr weather.orig/weather.py weather/weather.py
--- weather.orig/weather.py 2009-01-13 19:29:06.000000000 +0800
+++ weather/weather.py 2009-01-12 16:34:37.000000000 +0800
@@ -98,6 +98,10 @@

  # Counts the number of minutes until the next attempted fetch.
  countdown = 0
+
+ # HTTP Proxy switch can proxy
+ proxy = False
+ http_proxy = "http://"

  def __init__(self, uid, orient, height):
   awn.AppletSimple.__init__ (self, uid, orient, height)
@@ -207,6 +211,14 @@
   # Curved Look
   self.curved_dialog = self.gconf_client.get_bool(self.gconf_path + "/curved_dialog")
   self.gconf_client.set_bool(self.gconf_path + "/curved_dialog", self.curved_dialog)
+
+ # HTTP Proxy
+ self.proxy = self.gconf_client.get_bool(self.gconf_path + "/proxy")
+ self.gconf_client.set_bool(self.gconf_path + "/proxy", self.proxy)
+ self.http_proxy = self.gconf_client.get_string(self.gconf_path + "/http_proxy")
+ if self.http_proxy == None:
+ self.gconf_client.set_string(self.gconf_path + "/http_proxy", "http://")
+
   return True

@@ -319,7 +331,1...

Read more...

Revision history for this message
Michael Rooney (mrooney) wrote :

Interesting, I guess we should handle this somewhere in awn-extras or at least AWNLib. Any ideas? I don't really like the idea of patching weather or anything else; we might as well just do it in the right place once and modify the applets to use that approach.

Changed in awn-extras:
assignee: desjardinsmike → nobody
importance: Undecided → Medium
Revision history for this message
onox (onox) wrote :

Isn't it better to use proxy settings of GNOME (System > Preferences > Network Proxy) or any other desktop environment?

Revision history for this message
Michael Rooney (mrooney) wrote :

There's no central place to configure a proxy in most distros (in Ubuntu for
example you'd need to also set up the proxy in synaptic to get updates and
in Firefox to use the web), although I guess that is a pretty good one.
Though who knows, if Firefox has a proxy set up that might be the most
accurate, as I could see where a user might configure that and not realize
the consequences of not setting in Network Proxy.

Revision history for this message
muddog (muddogxp) wrote :

Read out the firefox proxy settings is really a good idea. You can see lots of windows applications did that with IE.

Revision history for this message
Mark Lee (malept) wrote :

I should note that programatically retrieving the proxy settings from Firefox won't be easy, as I think that proxies are profile-specific.

Revision history for this message
muddog (muddogxp) wrote :

I happened to find a active project: libproxy
http://code.google.com/p/libproxy/
See it will help in future or not. If python supports it, it's easy for awn-extras.

Revision history for this message
Michael M. Garland, III (mmgarland3) wrote :

Check out Bug #94130 - I think python not being able to detect/use proxy setting is hindering AWN applets, as well. Perhaps that fix will help here, too?

Revision history for this message
papukaija (papukaija) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 94130 (which applies to all Python based applications), so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.