How do I set a system-wide proxy in Lubuntu (or LXDE)?


System-wide proxies in Lubuntu or LXDE must be set via environment variables

Lubuntu uses the lightweight LXDE desktop environment which does not contain a graphical settings tool to set systemwide proxies (unlike the default Ubuntu desktop environment, Unity).

The proxies must therefore be set via configuration files. This is a relatively simple procedure, and screenshots of the editor are provided to assist you.

 

1. Set up the proxy/proxies for most programs

  • Open the /etc/environment file with gksudo leafpad (or your favorite editor). This file stores the system-wide variables initialized upon boot.
  • Add the following lines, modifying appropriately. You must duplicate in both upper-case and lower-case because (unfortunately) some programs only look for one or the other:
    http_proxy=http://myproxy.server.com:8080/
    https_proxy=http://myproxy.server.com:8080/
    ftp_proxy=http://myproxy.server.com:8080/
    no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
    HTTP_PROXY=http://myproxy.server.com:8080/
    HTTPS_PROXY=http://myproxy.server.com:8080/
    FTP_PROXY=http://myproxy.server.com:8080/
    NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
  • Screenshot: after running gksudo leafpad /etc/environment:

    enter image description here

    2. Then, set up the proxies for apt-get and Update Manager

  • These programs will not obey the environment variables. Create a file called 95proxies in /etc/apt/apt.conf.d/, and include the following:
    Acquire::http::proxy "http://myproxy.server.com:8080/";
    Acquire::ftp::proxy "ftp://myproxy.server.com:8080/";
    Acquire::https::proxy "https://myproxy.server.com:8080/";
  • Screenshot: after running gksudo leafpad /etc/apt/apt.conf.d/95proxies:

    enter image description here

3. Logout and Reboot

Finally, logout and reboot to make sure the changes take effect.

Copy from http://www.techques.com/question/24-155459/How-do-I-set-a-system-wide-proxy-in-Lubuntu-%28or-LXDE%29

 

Advertisements
By dbglory Posted in Linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s