technology and zen of life

“A heisenbug (named after the Heisenberg Uncertainty Principle) is a computer bug that disappears or alters its characteristics when an attempt is made to study it.”

How to make your Linux applications use proxy

Hi,

If you are frustrated by Linux and your college’s network, which is windows based or sysadmins can help you with windows only, and sysadmins for a request call, replies as “use Windows”. If you are in a university then I am sure they use that damned( or good) software called as proxy (squid proxy to be specific). And you are a linux newbie then, here are some quick tips for you.

TIP # 1

You want your download manager (wget), updates by apt or aptitude to use a http proxy, you can use the following commands to export proxy to your environment

export http_proxy=http://user:password@proxy:port/

or

export http_proxy=http://proxy:port/

Things to note here are

  • Type the command as it is, don’t leave unnecessary spaces.
  • Username/password is the username and password you use to access the proxy, that is the same password which you type when you access internet using a web-browser. If you don’t use one, then use the second version of the command
  • Proxy and port are the values that are the same as used in your web-browser, or you can ask check them out with your sysadmin, or anyone who has a working internet on the same network.

After you do this you can use apt or aptitude and it will use the http proxy you specified!


TIP # 2
For GNOME users : GNOME allows users to specify a proxy from a GUI, which you can find in

 

Preferences –> Network Proxy

It also allows you to specify username/password, by clicking on “Details”


TIP # 3
Using socks proxy with evolution (the e-mail client)You need a package named tsocks

 

sudo apt-get install tsocks

for Ubuntu users

or you can download it from here, http://tsocks.sourceforge.net

then just type

tsocks evolution

you might want to read the man page for configurations too.

So, that’s it. I hope it makes your life a little easier with Linux on network. Tell us about your experiences of using Linux behind proxies. Remember google search is your best resource!

Leave a Reply

3 Responses

  1. Voorhees says:

    @printer you can unset that variable using this command:
    unset http_proxy

  2. DarK says:

    @printer – what do you mean by turn off the proxy? If you want to stop using proxy, just clear the settings. There is no quick switch I believe, but you can write a shell script to help you with the issue.

  3. printer says:

    If I already have my proxy server enabled using the export command, how do I turn off the proxy once I can access the internet without one?

Email Subscription

Disclaimer

The views expressed on this blog are personal. We do not claim to be a representative voice of the views of any organisation whatsoever. We are not responsible for the content present on the blogs to which we have linked.Views expressed are solely that of the author and does not reflect a collective opinion of contributors.
%d bloggers like this: