Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu 7.10, OpenSUSE 10.3, Linux Mint, Arch
Posts: 92
Rep:
How do I set a system wide proxy setting?
I need to set a system wide proxy setting, on my openSUSE 10.3 laptop.
Internet in my school is behind a proxy server.
Currently only Firefox's "Auto-detect proxy setting for this network" works. Which is great as Firefox is the mostly used web-required application I use, but fx. Pidgin, Lifera and Yast don't work.
I need to set a system-wide proxy setting, and be able to turn in of quickly, as I don't have a proxy at home.
Pure System wide mechanism is through the environment variable http_proxy.
(Gnome is also using gconf but will not talk about Window Manager specific)
This has to be set for all shells and all applications.
One way is to do the proxy detection when you initially login and then export the value to sub-shells (non login shells, normally what you get in a window manager)
Do It Yourself method:
If your interfaces go up during boot (before your login shell is started), then you can set this variable based on your ip adress:
Example, when you are at work (you have ip 1.2.3.4), connections through eth1 should go through a proxy.
In /etc/profile:
Code:
cur_ip=`/sbin/ifconfig eth1 | sed -e '/inet\ adr/!d;s/.*inet adr:\([0-9\.]*\).*/\1/'`
if [ "$cur_ip" == "1.2.3.4" ]; then
export http_proxy="http://1.2.3.251:3128"
fi
Distribution: Ubuntu 7.10, OpenSUSE 10.3, Linux Mint, Arch
Posts: 92
Original Poster
Rep:
Wooow!
That's pretty cool, thanks, I don't quite get it, but thanks!!
The network connection goes through wlan0, and it's a ndiswrapper driver, which isn't really properly installed, I have to modprobe it after every boot.
Anyways, that piece of code, should I append it to the /etc/profile? And what if I use DHCP(which I am), will it still work?
Wooow!
That's pretty cool, thanks, I don't quite get it, but thanks!!
LOL you're welcome.
Quote:
The network connection goes through wlan0, and it's a ndiswrapper driver, which isn't really properly installed, I have to modprobe it after every boot.
Anyways, that piece of code, should I append it to the /etc/profile? And what if I use DHCP(which I am), will it still work?
This piece of code can be appended at the end of /etc/profile yes.
It will look what is your current ip and decide accordingly.
But if at this moment the connection has no ip, it can not check..
So you need to do the modprobe before login into your WM.
Then use your current tool to autoconfigure the network (Or are you starting dhcp manually or static ip?) which will give you an ip. If it's graphic tool, you have a problem here...
And then start your wm which will read /etc/profile, the export command and give it to all applications opened in the wm.
And then the services that you want to use (pidgin,..), you have to check if they really works through http... For example bittorent doesn't go through a proxy, pidgin and stuff no idea.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.