in Ubuntu 13.04 I tried to insert
export socks_proxy=socks://address:portinto ~/.profile but this is not working.
PS: I need to set it only for a user so not in /etc/enviroment.
11 Answer
A few points:
- Environment variables are case-sensitive. Environment variables like this tend to be uppercase.
If you're testing in bash, note the top of the
~/.profilefile:# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package.The help wiki recommends using
~/.pam_environmentinstead of other files for session environment variables.- Its syntax is different than what you're expecting. See:
So (assuming
~/.pam_environment) you're probably looking for:SOCKS_PROXY DEFAULT=socks://address:port
Otherwise this is probably just a case issue.
You mention that you're using a browser and in there may lie the actual issue. Firefox, ignores environment variables by default. There is a plugin that will look for environment variables though (it's quite old):
I'm not sure how other browsers handle these things but I wouldn't be surprised if they do also ignore them.
2