system-wide proxy does not apply to synaptic

Bug #290313 reported by Tux
120
This bug affects 20 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Invalid
Low
fa
ubuntu-system-service (Ubuntu)
Invalid
Undecided
fa

Bug Description

Binary package hint: ubuntu-system-service

On a fresh Intrepid RC install I have to use proxy settings within my network. So when I configure proxy settings via System->Preferences->Network Proxy I fill in the Manual Proxy configuration and press the "Apply System Wide ... " button.
When I start Firefox it asks me for proxy login credentials. When I start Synaptic and try to update my packages I get a failed on all sources.
I checked the proxy settings via Settings->Preferences->Network, but there was nothing there. After adding the proxy settings to the Network tab I am able to update my packages repository via Synaptic.

ubuntu-system-service-1.0.10
linux-image-2.6.27-7-generic

Ubuntu-system-services uses dbus to apply system wide settings.

Tux

Revision history for this message
Ivan Nemet (inemet) wrote :

I have same problem.

Revision history for this message
Alexander 'gil' Tarasov (alexander.gil.tarasov) wrote :

Jaunty (upgraded) on 22.Apr.2009 have same bug.

After disabling proxy and pressing "Apply System Wide...", enviroment doesn't update until re-log (logoff & login), and console tools try to use proxy.

gil@gil-laptop:~$ env | grep proxy
http_proxy=http://******:3128/

Revision history for this message
Alexander 'gil' Tarasov (alexander.gil.tarasov) wrote :

Jaunty, upgraded on 22.Apr.2009

Changed in ubuntu-system-service (Ubuntu):
assignee: nobody → Alexander 'gil' Tarasov (alexander.gil.tarasov)
status: New → Confirmed
Revision history for this message
creslin (creslin) wrote :

Can confirm this.
* Have set a HTTP proxy which was applied system-wide.
* Have then removed proxy and applied system-wide - this is not successful.

This leaves the user unable to use APT from cmdline or synaptic to update the package set installed.

WORK-AROUND till fixed:
Use a terminal, set http_proxy to ''
use apt-get / apt-cache to update the system.

- Danny

Changed in ubuntu-system-service (Ubuntu):
assignee: Alexander 'gil' Tarasov (alexander.gil.tarasov) → nobody
Revision history for this message
Mike Smith - dominoconsultant (dominoconsultant) wrote :

me too - bump

This get's me twice every day when I change between my work and home networks

Revision history for this message
S. D. (akjag) wrote :

Found some dupes of this... most important thing to know about this bug is that it's not just synaptic, it's every network application that depends on the environment variables $http_proxy, $ftp_proxy, $no_proxy, etc.

The bug title is a bit misleading and should be changed to:

   "system-wide proxy should not require relogin to take affect"

... or something similar if anyone can think of shorter, more eloquent wording.

Revision history for this message
Catalin David (c.david) wrote :

I subscribe to S. M. Das 's post. I also bump into this two times a day, when connecting at the office and when connecting at home.

Basically, when click-ing "Apply system wide", the http_proxy et al variables are not set to what they should. I am not familiar with how GNOME works, but this might come from the fact that Xorg is run in a terminal: basically, the flickering (that KMS is trying to remove) that you encounter when you restart Xorg is because Xorg is ran in a terminal, it exits (when you press Ctrl-Alt-Backspace) and then restarts again (xinit). From my previous experience variables set in one terminal window do not apply in the other terminal windows, so if the terminals that are launched (during the GNOME session) are "parallel" to the Xorg one (they have the same parent, I think they're called siblings) and are not children of the Xorg process/terminal (if you do in a terminal:

$ export $HAITHAR=1
$ gnome-terminal & #and in the new window you do
$ echo $HAITHAR

it will print 1 ), they don't get the environment variable set. So, this might be the cause for which Firefox works, but the terminals don't. One more thing that comes to my mind now is that the terminals are actually calls to xterm and only have a graphical interface on top (xfce4-terminal, gnome-terminal etc.) and this might be an issue.

So, this might not be such an easy-to-solve bug, but I might be wrong, of course.

Would love to get this bug sorted and I am available for further details.

cdavid@idea:~$ uname -a
Linux idea 2.6.30.1 #1 SMP Wed Jul 8 09:44:21 IST 2009 i686 GNU/Linux
cdavid@idea:~$ gnome-about --version
GNOME gnome-about 2.26.1

I am actually using DWM (Dynamic Window Manager), but I am using the GNOME tool daily since there is nothing better out there.

Thanks,

Catalin

Revision history for this message
Catalin David (c.david) wrote :

Apparently, gnome-network-properties (the command that you invoke) is part of the gnome-control-center ( http://git.gnome.org/cgit/gnome-control-center/log/?qt=grep&q=network-properties ). Also, I don't know if this problem is local (only in Ubuntu) or should be forwarded to the GNOME people responsible for this.

Catalin

affects: ubuntu-system-service (Ubuntu) → gnome-control-center (Ubuntu)
Revision history for this message
Artem Popov (artfwo) wrote :

gnome-control-center applies the system-wide settings through ubuntu-system-service, so I'm marking it as being affected as well.

Changed in ubuntu-system-service (Ubuntu):
status: New → Confirmed
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
Revision history for this message
lurix (lorenzo-fiorentini) wrote :

Please be aware that a fully functional solution should also integrate with ntlmaps or cntlm settings, and Proxy Auto Configuration (PAC) settings in that:
- proxy setting is a problem for those frequently switching location
- in the great majority of these cases one of the two environment (work) is dominated by MS stuff, and especially proxy ISA server; in these cases a dedicated, intermediate proxy is needed, usually on localhost itself
- the most flexible tool currently is the PAC file (javascript) mechanism, but it does not intercept "wget" calls from synaptic or apt, I believe

A 360° solution should include, in my opinion, if possible
1) proxy setup for www-like callers (browsers, ftp, ...) which go to the proxy directly
2) separate proxy setup for ISA-proxy unable applications (apt/dpkg/synaptic/update-manager...) through cntlm or ntlmaps
3) secure authentication for both (don't store passwords, but rather hashes (cntlm has it); or even, ask password to the user at the beginning of the session, or at first usage)
4) (optional) disable cntlm after having done with synaptic or update-manager job
5) all the above based on named "location" management, triggered by IP detection or other PAC mechanisms (think of IsResolvable())

Hope it is useful
Thank you very much

Revision history for this message
Hadrien Titeux (hadware) wrote :

Yep, i got the same problem: i changed my system-wide settings to a proxy connection, then wanted to get back to the regular direct connection... and it didn't work.
The weird thing is that i can still access the web through most applications, like Firefox or aMSN, but none of system-related apps work, such as:
-synaptic/aptitude/software center/update manager
-wget

I cannot find a fix so could you post one for now (i did not know how to do the one suggested at the beginning of the thread).

Revision history for this message
Hadrien Titeux (hadware) wrote :

Sorry for the double-post, but i actually found a solution that does well the trick:
run

sudo nano /etc/apt/apt.conf

then write de line

Acquire::http::Proxy "direct";

Then save, and everything works fine (even wget :O ).

Revision history for this message
SabreWolfy (sabrewolfy) wrote :

I manually edited /etc/apt/apt.conf to include the details of the proxy I use. This proxy requires authentication. Updating via 'apt' or 'aptitude' on the command-line works fine.

Updating network proxy settings via System | Preferences | Network Proxy breaks apt.conf. The settings are included, but the authentication part of the URL (http://USER:PASS@proxy...) is not included, even though I have specified the username and password in the network settings dialog.

fa (nwav1)
Changed in gnome-control-center (Ubuntu):
assignee: nobody → fa (nwav1)
Changed in ubuntu-system-service (Ubuntu):
assignee: nobody → fa (nwav1)
status: Confirmed → Incomplete
Changed in gnome-control-center (Ubuntu):
status: Confirmed → Invalid
Changed in ubuntu-system-service (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
irfannaseef (irfannaseefp) wrote :

Im facing the problem described above in Ubuntu 20.04 LTS. Should i open a new bug or just add here? Trying to report bug using apport-bug is showing this as a similar case.

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

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

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