Quote:
Originally Posted by farzadfedora
I entered this command in a shell:
googleearth HTTP_PROXY="10.1.1.2:8080"
but it didn't set the proxy (I Think) because it didn't connected to the server...
|
I can see it didn't. If you would have read the replies a bit more carefully you would have seen there's a few options and none of those match what you did. So here's three examples.
A. Use these steps if you are the only human using this machine, and you want *all* applications (that adhere to the PROXY environment variables) used by unprivileged users to use the same proxy all of the time:
0. Find out which shell you use (in a terminal window type "echo $SHELL", without the quotes). If it is not Bash or if it does not source /etc/profile, then find out which central resource files your shell sources.
1. Become root and see if you have the "/etc/profile.d" directory. If you do, create a file there called "/etc/profile.d/proxy.sh" and fill it with these contents:
Code:
CHKUID=`awk '/^UID_MIN/ {print $2}' /etc/login.defs`
if [ `id -g` -ge ${CHKUID:=500} ]; then
export HTTP_PROXY=http://10.1.1.2:8080/
export HTTPS_PROXY=http://10.1.1.2:8080/
fi
save changes then close the file and make it have octal mode 0644 ("chmod 0644 /etc/profile.d/proxy.sh").
2. Log out of root and log out of your shell.
3. Log in again, open a terminal window and type "env|grep PROX" to verify the variables got set. Ready.
B. Use these steps if you are just one of the users on this machine, and you want *your* applications (that adhere to the PROXY environment variables) to use the same proxy all of the time:
0. Find out which shell you use (in a terminal window type "echo $SHELL", without the quotes). If it is not Bash, then find out which personal resource files your shell sources.
1. Open your .bash_profile and add the lines
Code:
export HTTP_PROXY=http://10.1.1.2:8080/
export HTTPS_PROXY=http://10.1.1.2:8080/
save changes then close the file.
2. Open a terminal window and type "env|grep PROX" to verify the variables got set. Ready.
C. Use these steps if you are just one of the users on this machine, and you want *only* applications (that adhere to the PROXY environment variables) to use a proxy when you select it:
0. Open a terminal window or use your Desktop Environments "run" command, type "env HTTP_PROXY=http://10.1.1.2:8080/ /path/to/googleearth". Ready.
* N.B. In your XFCE, KDE, GNOME or other Desktop Environment you might have GUI tools to help you set a proxy for other applications.