View Single Post
  #6   (View Single Post)  
Old 23rd January 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Each xterm -- and each shell -- has its own environment. While there might be some third party software solution, it may be significantly easier to merely set the value when you need it. For example, you might use "lynx" when you don't need a proxy, and create a simple shell script, or shell function (depending on your preferred shell) that sets your environment variable for the command when you need it. For example, here's a simple script that might be chmod 700 or 755 and reside in a directory in your $PATH, such as in $HOME/bin. You might call this file "lynxproxy" or some other name, then, just use it instead of lynx when you want to use a proxy. You could, of course, do the reverse and unset the variable instead of setting it as shown here. In that case, you might pick a different name, such as "lynxclear". The choices are endless.
Code:
#!/bin/sh
env HTTP_PROXY=http://127.0.0.1:8118/ lynx $*
Warning - I haven't tested this, and may have made an error when I typed.
Reply With Quote