LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2017, 03:04 AM   #1
SimplyInquisitive
Member
 
Registered: May 2012
Posts: 53

Rep: Reputation: Disabled
The Magical Resetting Environment Variable


So, perhaps someone can answer this enigma. I set the "http_proxy" variable in /etc/environment.

Now recently it occurred that I needed to temporarily disable it so another proxy could be used. However, after running "unset http_proxy" and commenting out the line in /etc/environment and rebooting the system this variable will still be set.

If I just run "unset http_proxy" after boot it apparently disables it, but then no programs can access internet.

Google searching had yielded no answers and neither have wiki pages I've found. Anyone perhaps know whats up here?
 
Old 12-02-2017, 05:41 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Check the startup scripts in /etc/rc.d. It looks as if one of them is setting this variable regardless of what is in /etc/environment.
 
2 members found this post helpful.
Old 12-02-2017, 06:18 AM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
If that does not show anything, check also the /etc/profile. Also any files in /etc/profile.d if it exists.
 
Old 12-02-2017, 12:31 PM   #4
SimplyInquisitive
Member
 
Registered: May 2012
Posts: 53

Original Poster
Rep: Reputation: Disabled
Ok, so I searched directories rc0.d-rc6.d as well as rc.conf and rc.local and found nothing in my limited understanding that would seem to be resetting this variable. I also searched profile.d and there is no /etc/profile. I even attempted to put "env -u http_proxy" in rc.local, just for laughs cause you never know, right?

I'm on the verge of concluding that a gremlin has gotten into the computer.
 
Old 12-02-2017, 01:00 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
maybe this helps:
https://unix.stackexchange.com/quest...able-came-from
 
Old 12-02-2017, 06:43 PM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
If using ubuntu, maybe this variable is stored in gui database (gsettings?), then you have to change proxy value in the Network Setting gui
 
Old 12-02-2017, 11:20 PM   #7
SimplyInquisitive
Member
 
Registered: May 2012
Posts: 53

Original Poster
Rep: Reputation: Disabled
Well, guys I feel pretty stupid because I found the issue. Apparently, the "export http_proxy" variable line wasn't commented out in ~/.bashrc; However, in my defense I could have sworn I did so when I first went to disable this variable so I could use the other proxy.

Thanks to all of you for your time and insight, but this may now be marked as solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment variable that dynamically changes when another variable is changed youtoo Linux - Newbie 4 02-17-2016 01:44 AM
[SOLVED] C variable resetting in do while loop Ineed$ Programming 3 09-17-2012 06:14 PM
PATH variable resetting after reboot derrekito Linux - General 3 05-08-2012 04:59 PM
[SOLVED] bash: resetting of global variable? crts Programming 7 01-07-2010 07:40 PM
environment variable mimi Linux - Newbie 1 04-10-2002 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration