Does not appear to honour proxy settings

Bug #1075093 reported by Ian Richardson
This bug report is a duplicate of:  Bug #1248672: Graphical option for setting a proxy. Edit Remove
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Variety
Incomplete
Undecided
Unassigned

Bug Description

Basically, if you don't have to use a proxy it works fine. If you're behind a proxy then Variety is unable to fetch remote images. I've checked that the sites in question can be reached using a web browser configured to use the same proxy.

I'm using Ubuntu 12.10, with Gnome Shell 3.6.

Tags: proxy
Revision history for this message
Peter Levi (peterlevi) wrote :

Did you try restarting Variety after you set the proxy?

I couldn't completely emulate your case, but I made some quick experiments on 12.04 with Variety's url fetching method and it does pass via the proxy when an HTTP_PROXY environment variable is set. When setting a proxy in Ubuntu's Network settings I had to open a new terminal and try again, that's why I assume you need a restart (the environment for an already running application is not changed).

Technical info: Variety relies on urllib2 for http requests, and according to its documentation "In addition, default installed ProxyHandler makes sure the requests are handled through the proxy when they are set." and in the doc for ProxyHandler: "The default is to read the list of proxies from the environment variables <protocol>_proxy."

Changed in variety:
status: New → Incomplete
Revision history for this message
Ian Richardson (grandmastermarclar) wrote :

If I launch variety from the command line, it works fine. My profile has entries for http_proxy. I've also got the network settings to use the proxy. However, if I configure variety to launch on login (and then log out and back in, or restart and log in), it doesn't appear to pick up the proxy settings.

Is there any debug I can enable to help get to the bottom of this one?

Revision history for this message
Peter Levi (peterlevi) wrote :

"If I launch variety from the command line, it works fine" - and what happens if after login you exit Variety and relaunch in the ordinary way - from the dash / menu / whatever you use?

Debugging is done using the -v commandline switch, but there is no logging related to proxies, etc. in the current version, so you won't see anything interesting in the log (apart from the exception dumps when the http connection attempts fail).

I'll think of some way to reproduce it on my machine and see myself how it behaves, but I'm not sure if this would be an easy fix. As a workaround you may try several things - launch Variety on startup after some delay (there are tutorials on the net how to add a delay). Or in variety's startup desktop file (in ~/.config/autostart) change the command to look like "HTTP_PROXY=http://host:port/ /opt/extras.ubuntu.com/variety/bin/variety" - this explicitly sets the env variable for the proxy.

Revision history for this message
Atit Anand (atit-anand-cs) wrote :

How about taking the proxy setting inputs from the user and then calling urlopen() function of urllib2 with those settings?

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

Other bug subscribers

Related questions

Remote bug watches

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