Slackware system-wide proxy settings
#109 Henry, Thursday, 23 June 2011 2:55 PM (Category: Linux)
(Tags: slackware proxy)

I like how the Macs can set the proxy in one place and everything uses those proxy settings. I wanted something similar to that for Slackware, working on the command line, not some GUI utility that works for KDE apps and nothing else. Something low level and pervasive. I did some experimentation and came up with a simple solution that works for most things I need proxy for. It's good enough for me right now.

I added two new files:

just like the other scripts in /etc/profile.d. When you start a shell, the system runs /etc/profile and that runs all the executable scripts in /etc/profile.d. These two proxy files have these settings:


So now, these environment variables are set in all shells. root has them, my users have them, and cronjobs have them. I can delete the individual proxy settings from my slackpkg scripts, my sbopkg scripts, my individual wgetrc files. One central location for my proxy settings. Not every program uses these environment variables. Only those that have been written to look for them. Most of the command line apps do, and that suits me fine as I work on the command line. I've only tested one GUI app, and discovered that Firefox does not use these environment variables (or I have not set it up so it can find them). More research necessary.