Internet connection in Mantid through proxy

In the system I am using Mantid in, the internet connection is through a proxy-server with a username and password. I am using it in Ubuntu 14.04. Is there a way to connect Mantid to the internet, since I keep getting this error in the results log every time I start mantid :

Internet Connection Failed - cannot update instrument definitions.

Could you try creating an environment variable HTTP_PROXY with a value like http://username:password@proxy.thing.com:8080/

Of course you will need to use your username, password, proxy address and port number.

How do I create a proxy environment (.bashrc?)?

This is answered here better than I could.