Results 1 to 10 of 10

Thread: Proxy settings in 12.04

  1. #1

    Question Proxy settings in 12.04

    Hi,

    I have to setup a proxy with authentication and exceptions in 12.04 and I am running into trouble.

    If I use the automatic way, through a script I don't know how to setup authentication. Since the script is company wide doesn't contain authentication information.

    I can select Manual and insert all the url/ports/authentication information right on the boxes but then there is no place to set exceptions. domains which should use proxy.

    Any ideas on how to sort this one using any of the above methods?

    Cheers,

    Paulo Matos

  2. #2
    Join Date
    Apr 2012
    Beans
    2

    Unhappy Re: Proxy settings in 12.04

    I have exactly the them problem only answers?

  3. #3

    Re: Proxy settings in 12.04

    Quote Originally Posted by ChriWo View Post
    I have exactly the them problem only answers?
    Couldn't find solution yet. Sorry.

  4. #4
    Join Date
    Apr 2012
    Beans
    2

    Angry Re: Proxy settings in 12.04

    OK, many thanks I will continue to search.

  5. #5
    Join Date
    Apr 2007
    Location
    Leicester, UK
    Beans
    147
    Distro
    Ubuntu Development Release

    Re: Proxy settings in 12.04

    For the ignored hosts issue, try installing dconf-tools using the software centre or
    Code:
    sudo apt-get install dconf-tools
    Then run dconf-editor
    Code:
    dconf-editor
    Expand System and select proxy, there should be an option for ignore-hosts. Read the description and add your exceptions comma separated in single quotes. This should work for all your desktop apps.

    ---
    The reason I was searching on proxy issues is to do with updates though. I've set up proxy configuration for apt by creating a file /etc/apt/apt.conf.d/02proxy with the entry
    Code:
    Acquire::http::Proxy "http://proxy.example.com:80";
    As just setting it the GUI way through system settings doesn't appear to work any more. But, even then, when something like flash gets updated it runs /usr/lib/update-notifier/package-data-downloader without any proxy settings! The only workaround I've found so far is to open a root terminal
    Code:
    sudo -i
    Set the proxy settings
    Code:
    export http_proxy=http://proxy.example.com:8080/
    export https_proxy=http://proxy.example.com:8080/
    and then run package-data-downloader from the root terminal
    Code:
    /usr/lib/update-notifier/package-data-downloader
    Anybody know how I can get root to recognise the proxy automagically?
    Last edited by r-mo; April 25th, 2012 at 10:32 AM.

  6. #6
    Join Date
    Dec 2004
    Location
    Reading, England
    Beans
    10
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: Proxy settings in 12.04

    Quote Originally Posted by r-mo View Post
    Anybody know how I can get root to recognise the proxy automagically?
    You can add a script to /etc/profile.d/ that will set the shell level proxy for all users, including root.

  7. #7
    Join Date
    Dec 2004
    Location
    Reading, England
    Beans
    10
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: Proxy settings in 12.04

    You could create an interactive shell script which uses gsettings to set the various proxy settings you require and prompt the user for things like authentication information.

    Example usage of gsettings for proxy stuff:

    Code:
    gsettings set org.gnome.system.proxy.socks host '127.0.0.1'
    gsettings set org.gnome.system.proxy.socks port 3128
    gsettings set org.gnome.system.proxy mode 'manual'
    
    # to disable proxy:
    # gsettings set org.gnome.system.proxy mode 'none'

  8. #8
    Join Date
    Oct 2011
    Beans
    20

    Re: Proxy settings in 12.04

    lildude,
    Please,kindly share with me how to
    Code:
    You can add a script to /etc/profile.d/ that will set the shell level proxy for all users, including root.
    .
    I have the same problem for sometimes now.

    thank you in advance

  9. #9
    Join Date
    Dec 2004
    Location
    Reading, England
    Beans
    10
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: Proxy settings in 12.04

    Quote Originally Posted by huu2011 View Post
    lildude,
    Please,kindly share with me how to
    Code:
    You can add a script to /etc/profile.d/ that will set the shell level proxy for all users, including root.
    .
    I have the same problem for sometimes now.

    thank you in advance
    Sure, just create a file in /etc/profile.d/, for example /etc/profile.d/proxy, and add the following to it:

    Code:
    export http_proxy=http://your.proxy:port
    export https_proxy=http://your.proxy:port
    You can also set "ftp_proxy" and "no_proxy" which I hope are self explanatory.

    If you use Network Manager to set your proxy via the GUI, clicking the "Apply system wide" button actually populates the /etc/environment file with your proxy info and this should be automatically pulled into your user environments when they login if readenv=1 is set in the /etc/pam.d/* file appropriate for the login method.

    HTH

  10. #10
    Join Date
    Jul 2013
    Beans
    1

    Re: Proxy settings in 12.04

    lildude,

    I hope it's not inappropriate for me to be posting this followup here, I'm kind of a n00b in these forums.

    I've been exploring on the web for a while now for how to programmatically change the ubuntu 13.04 (hopefully not erroneously considering it the same as 12.04) system socks proxy in an equivalent manner to using the GUI method. The GUI is great - I click on "Network Proxy", flip the method switch to manual, then hit "Apply system wide", throw in my password and bam, almost all my stuff is going through that proxy. But I really can't stop there, I need to go one step further and put those four actions into one even easier shell script.

    Your post brought me to the next step in my search, namely about the /etc/environment population. Indeed, when I use that GUI to change the proxy, the correct line does show up in /etc/environment. However, if I change /etc/environment by hand, the same results do not take affect. Namely Chromium will not switch over to the new proxy settings, even though it does when I use the GUI method.

    I also noticed that the GUI method changed org.gnome.system.proxy mode from 'none' to 'manual' as well as populating the /etc/environment file. However, even when I change both to look correct in a script, Chromium will still not use the proxy settings. Is there a third, or maybe 4th 5th or 6th thing that the GUI tool is also doing?

    Thanks in advance for the help,

    Aaron

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •