Index: src/terminal-screen.c
===================================================================
--- src/terminal-screen.c	(revision 2330)
+++ src/terminal-screen.c	(working copy)
@@ -1185,8 +1185,29 @@
   
   conf = gconf_client_get_default ();
 
-  if (!getenv ("http_proxy") &&
-      gconf_client_get_bool (conf, HTTP_PROXY_DIR "/use_http_proxy", NULL))
+  /* Series of conditions under which we don't set http_proxy */
+  gboolean useproxy = gconf_client_get_bool (conf, HTTP_PROXY_DIR "/use_http_proxy", NULL);
+
+  /* Is the mode unset or not equal to "manual"? */
+  gchar *proxymode = gconf_client_get_string (conf, "/system/proxy/mode", NULL);
+  if (!proxymode)
+    useproxy = FALSE;
+  else if (strncmp ("manual", proxymode, 6))
+    useproxy = FALSE;
+
+  /* Do we already have a proxy setting? */
+  if (getenv ("http_proxy"))
+    useproxy = FALSE;
+
+  /* Do we have no proxy host or an empty string? */
+  gchar *proxyhost = gconf_client_get_string (conf, HTTP_PROXY_DIR "/host", NULL);
+  if (!proxyhost)
+    useproxy = FALSE;
+  else if (strlen(proxyhost) == 0)
+    useproxy = FALSE;
+
+  /* Set up proxy environment variables if we passed all of the above */
+  if (useproxy)
     {
       gint port;
       GSList *ignore;
