You are not logged in.

#1 2012-10-03 04:37:29

darkmav
Member
Registered: 2012-01-21
Posts: 73

Unable to change proxy settings

Hello everyone,

This may sound like a dumb question. But to be sure, I have gone through the proxy settings page on the Arch wiki (https://wiki.archlinux.org/index.php/Proxy_settings).

I am running Arch Linux on my Dell laptop. I alternate between home (no-proxy direct connection) and campus (multiple proxies with authentication).

For some time, I have been unable to update Arch from my campus as I kept getting SSL certificate errors. On the forums, I was told my pacman could be broken, and I was given advice for how to fix it. But when I came home this morning, I was able to update from the console -- it was a breeze.

But when I rebooted my system and went back to KDE after the updates, I was unable to use pacman to install or update anything more. I noticed that my old campus proxy settings are still in place through environment variables.

[vivek@krypton /]$ echo $http_proxy
http://ironport2.iitk.ac.in:3128/
[vivek@krypton /]$ echo $ftp_proxy
http://ironport2.iitk.ac.in:3128/
[vivek@krypton /]$ 

But I have not made any changes to .bashrc or .bash_profile at all:

[vivek@krypton ~]$ more .bashrc
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
alias epd-pylab='/home/vivek/epd/epd-7.3-2-rh5-x86_64/bin/ipython qtconsole --pylab'
[vivek@krypton ~]$ 
[vivek@krypton ~]$ more .bash_profile 
#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc
[vivek@krypton ~]$ 

When I access the proxy settings through KDE, I see that no proxy is configured.

So, where exactly are these environment variables stored and how do I flush them out?

Offline

#2 2012-10-03 05:47:26

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,796

Re: Unable to change proxy settings

darkmav wrote:

So, where exactly are these environment variables stored and how do I flush them out?

Where did you put them? Because obviously they were put in place by you.

Hint:- /etc/profile and related.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2012-10-03 06:30:30

plustwo
Member
From: South Africa, ZA
Registered: 2012-09-13
Posts: 32

Re: Unable to change proxy settings

try unsetting proxies and check if that works;
"unset http_proxy"
"unset ftp_proxy"

Offline

#4 2012-10-03 22:44:54

darkmav
Member
Registered: 2012-01-21
Posts: 73

Re: Unable to change proxy settings

ngoonee wrote:

Where did you put them? Because obviously they were put in place by you.

Hint:- /etc/profile and related.

I don't remember putting them anywhere manually...that is the problem. So this is how my /etc/profile looks

[vivek@krypton ~]$ more /etc/profile
# /etc/profile

#Set our umask
umask 022

# Set our default path
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
export PATH

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
	for profile in /etc/profile.d/*.sh; do
		test -r "$profile" && . "$profile"
	done
	unset profile
fi

# Source global bash config
if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
	. /etc/bash.bashrc
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH
[vivek@krypton ~]$ 

Unsettings seems to work plustwo (thanks) but after a reboot, the proxy settings get restored somehow..

Offline

#5 2012-10-03 23:42:36

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,796

Re: Unable to change proxy settings

darkmav wrote:

I don't remember putting them anywhere manually...that is the problem. So this is how my /etc/profile looks

[vivek@krypton ~]$ more /etc/profile
# /etc/profile

#Set our umask
umask 022

# Set our default path
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
export PATH

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
	for profile in /etc/profile.d/*.sh; do
		test -r "$profile" && . "$profile"
	done
	unset profile
fi

# Source global bash config
if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
	. /etc/bash.bashrc
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH
[vivek@krypton ~]$ 

Unsettings seems to work plustwo (thanks) but after a reboot, the proxy settings get restored somehow..

Nothing from your /etc/profile, and of course you DID check your user-specific profile, right? The proxy env variable could not have been automatically set, it must have been a setting you put in, and lacking details from you its not really possible for any of us to 'guess' what you could have done.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#6 2012-10-03 23:52:04

darkmav
Member
Registered: 2012-01-21
Posts: 73

Re: Unable to change proxy settings

ngoonee wrote:

Nothing from your /etc/profile, and of course you DID check your user-specific profile, right? The proxy env variable could not have been automatically set, it must have been a setting you put in, and lacking details from you its not really possible for any of us to 'guess' what you could have done.

If I remembered where (or if) I manually put in the proxy settings, I wouldn't have had a problem. Here's the output of printenv. It shows the http_proxy, https_proxy and ftp_proxy as being set.

[root@krypton ~]# printenv
XDG_VTNR=1
XDG_SESSION_ID=1
SSH_AGENT_PID=592
KDE_MULTIHEAD=false
XDG_DATA_HOME=/home/vivek/.local/share
GPG_AGENT_INFO=/tmp/gpg-4Jvgm1/S.gpg-agent:589:1
SHELL=/bin/bash
TERM=xterm
XDG_SESSION_COOKIE=13941f7bad394045827f3d2231a4f12d-1349305443.872473-2022856205
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/vivek/.gtkrc-2.0:/home/vivek/.kde4/share/config/gtkrc-2.0
GTK_RC_FILES=/etc/gtk/gtkrc:/home/vivek/.gtkrc:/home/vivek/.kde4/share/config/gtkrc
GS_LIB=/home/vivek/.fonts
WINDOWID=56623110
KDE_FULL_SESSION=true
NO_PROXY=localhost,127.0.0.0/8
USER=vivek
SSH_AUTH_SOCK=/tmp/ssh-c0VlW1d0aQwG/agent.591
FTP_PROXY=http://ironport2.iitk.ac.in:3128/
SESSION_MANAGER=local/krypton:@/tmp/.ICE-unix/631,unix/krypton:/tmp/.ICE-unix/631
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
XDG_CONFIG_DIRS=/etc/xdg
MAIL=/var/spool/mail/vivek
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/cuda-toolkit/bin:/usr/bin/core_perl
PWD=/root
JAVA_HOME=/usr/lib/jvm/java-7-openjdk
LANG=en_US.UTF-8
KDE_SESSION_UID=1000
HTTPS_PROXY=http://ironport2.iitk.ac.in:3128/
https_proxy=http://ironport2.iitk.ac.in:3128/
SHLVL=5
HOME=/root
XDG_SEAT=seat0
KDE_SESSION_VERSION=4
XDG_CONFIG_HOME=/home/vivek/.config
no_proxy=localhost,127.0.0.0/8
XCURSOR_THEME=Oxygen_White
HTTP_PROXY=http://ironport2.iitk.ac.in:3128/
XDG_CACHE_HOME=/home/vivek/.cache
LOGNAME=vivek
J2SDKDIR=/usr/lib/jvm/java-7-openjdk
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-m6nywlWoUg,guid=89c88085ab4dfd86c64f80cb506cc465
XDG_DATA_DIRS=/usr/local/share/:/usr/share/
WINDOWPATH=2
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
QT_PLUGIN_PATH=/home/vivek/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/
J2REDIR=/usr/lib/jvm/java-7-openjdk/jre
G_BROKEN_FILENAMES=1
XAUTHORITY=/tmp/kde-vivek/xauth-1000-_0
COLORTERM=gnome-terminal
_=/usr/bin/printenv
OLDPWD=/etc/network.d
[root@krypton ~]# 

/etc/bash.bashrc

[root@krypton ~]# more /etc/bash.bashrc
#
# /etc/bash.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

PS1='[\u@\h \W]\$ '
PS2='> '
PS3='> '
PS4='+ '

case ${TERM} in
  xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${P
WD/#$HOME/~}"'
                                                        
    ;;
  screen)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${P
WD/#$HOME/~}"'
    ;;
esac

[ -r /usr/share/bash-completion/bash_completion   ] && . /usr/share/bash-completion/bash_completion
[root@krypton ~]# 

/etc/environment

[root@krypton ~]# more /etc/environment 
#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
[root@krypton ~]# 

Last edited by darkmav (2012-10-03 23:53:28)

Offline

#7 2012-10-03 23:55:45

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,796

Re: Unable to change proxy settings

ngoonee wrote:

and of course you DID check your user-specific profile, right?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#8 2012-10-03 23:58:14

darkmav
Member
Registered: 2012-01-21
Posts: 73

Re: Unable to change proxy settings

ngoonee wrote:
ngoonee wrote:

and of course you DID check your user-specific profile, right?

What do you mean by "user-specific profile"? If you mean ~/.bashrc and ~/.bash_profile, then yes.

Offline

#9 2012-10-04 00:02:47

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,318

Re: Unable to change proxy settings

Did you check ALL the files located in /etc/profile.d/

Offline

#10 2012-10-04 00:05:46

darkmav
Member
Registered: 2012-01-21
Posts: 73

Re: Unable to change proxy settings

skunktrader wrote:

Did you check ALL the files located in /etc/profile.d/

[vivek@krypton profile.d]$ ls -l
total 72
-rwxr-xr-x 1 root root   40 Apr 23 08:15 cuda-toolkit.sh
-rwxr-xr-x 1 root root   28 Jul 19 13:30 glib2.csh
-rwxr-xr-x 1 root root   28 Jul 19 13:30 glib2.sh
-rwxr-xr-x 1 root root  102 Jul 12 06:52 gpm.sh
-rwxr-xr-x 1 root root   46 Jun 14 19:25 jdk.csh
-rwxr-xr-x 1 root root  223 Jun 14 19:25 jdk.sh
-rwxr-xr-x 1 root root  189 Jun 14 19:24 jre.csh
-rwxr-xr-x 1 root root  199 Jun 14 19:24 jre.sh
-rwxr-xr-x 1 root root  219 Sep  3 23:56 libreoffice-common.csh
-rwxr-xr-x 1 root root  219 Sep  3 23:56 libreoffice-common.sh
-rwxr-xr-x 1 root root 1133 Aug 28 01:26 locale.sh
-rwxr-xr-x 1 root root   50 Sep 10  2011 mozilla-common.csh
-rwxr-xr-x 1 root root   50 Sep 10  2011 mozilla-common.sh
-rwxr-xr-x 1 root root  699 Aug  9 20:10 perlbin.csh
-rwxr-xr-x 1 root root  668 Aug  9 20:10 perlbin.sh
-rwxr-xr-x 1 root root  115 Apr 16 18:53 seahorse-ssh-askpass.sh
-rwxr-xr-x 1 root root  414 Jun  3 03:09 xorg.csh
-rwxr-xr-x 1 root root  396 Jun  3 03:09 xorg.sh
[vivek@krypton profile.d]$ 
[vivek@krypton profile.d]$ more locale.sh 
#!/bin/sh

unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES \
      LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION

if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then
  . "$XDG_CONFIG_HOME/locale.conf"
elif [ -n $HOME ] && [ -r $HOME/.config/locale.conf ]; then
  . "$HOME/.config/locale.conf"
elif [ -r /etc/locale.conf ]; then
  . /etc/locale.conf
elif [ -r /etc/rc.conf ]; then
  LANG=$(. /etc/rc.conf 2>/dev/null; echo "$LOCALE")
fi

export LANG="${LANG:-C}"
[ -n "$LC_CTYPE" ]          && export LC_CTYPE
[ -n "$LC_NUMERIC" ]        && export LC_NUMERIC
[ -n "$LC_TIME" ]           && export LC_TIME
[ -n "$LC_COLLATE" ]        && export LC_COLLATE
[ -n "$LC_MONETARY" ]       && export LC_MONETARY
[ -n "$LC_MESSAGES" ]       && export LC_MESSAGES
[ -n "$LC_PAPER" ]          && export LC_PAPER
[ -n "$LC_NAME" ]           && export LC_NAME
[ -n "$LC_ADDRESS" ]        && export LC_ADDRESS
[ -n "$LC_TELEPHONE" ]      && export LC_TELEPHONE
[vivek@krypton profile.d]$ 

Offline

#11 2012-10-04 00:28:57

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,796

Re: Unable to change proxy settings

darkmav wrote:
ngoonee wrote:
ngoonee wrote:

and of course you DID check your user-specific profile, right?

What do you mean by "user-specific profile"? If you mean ~/.bashrc and ~/.bash_profile, then yes.

~/.profile

You do need to know quite a bit about your system and what you've done to it to use Arch....


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#12 2012-10-04 01:25:28

darkmav
Member
Registered: 2012-01-21
Posts: 73

Re: Unable to change proxy settings

ngoonee wrote:

~/.profile

You do need to know quite a bit about your system and what you've done to it to use Arch....

[vivek@krypton ~]$ ls -l .profile*
ls: cannot access .profile*: No such file or directory
[vivek@krypton ~]$ 

PS: I am fairly new to Arch, not to Linux. With a whole bunch of changes having been introduced to Arch since the time I began using HP-UX (Unix, in case you were wondering) and other distros of Linux, it would certainly help if forums were as friendly as the wiki, and not terse. Apart from the unset suggestion from the OP, nothing I have been told so far has worked. I may not know a lot about my system, but I used to think that Arch and Linux are about renewing learning on a daily basis. No offense meant.

Last edited by darkmav (2012-10-04 01:29:32)

Offline

#13 2012-10-04 08:06:28

plustwo
Member
From: South Africa, ZA
Registered: 2012-09-13
Posts: 32

Re: Unable to change proxy settings

darkmav, here's how my ~/.bashrc looks like:


[plustwo@danburite6 ~]$ cat ~/.bashrc
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

I don't have ~/.profile file.

i also checked this post (only if it'll help):

http://www.linuxforums.org/forum/ubuntu … proxy.html
(only if it'll bring some light to your problem)

good luck.

oh! another thing; check your history and scroll to the beginning if there might be entries relating to some proxy settings when you started doing the OS installation.

Last edited by plustwo (2012-10-04 08:41:50)

Offline

#14 2012-10-04 12:39:29

darkmav
Member
Registered: 2012-01-21
Posts: 73

Re: Unable to change proxy settings

plustwo wrote:

i also checked this post (only if it'll help):

http://www.linuxforums.org/forum/ubuntu … proxy.html
(only if it'll bring some light to your problem)

good luck.

oh! another thing; check your history and scroll to the beginning if there might be entries relating to some proxy settings when you started doing the OS installation.

Thanks for your inputs plustwo. My .bashrc file does not have any entries corresponding to the proxy. And the history does not date as far long back as the OS installation (which happened over 1.5 months ago).

I am still clueless as to where the environment variables are loading from.

Offline

#15 2012-10-04 13:00:15

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,796

Re: Unable to change proxy settings

darkmav wrote:
ngoonee wrote:

~/.profile

You do need to know quite a bit about your system and what you've done to it to use Arch....

[vivek@krypton ~]$ ls -l .profile*
ls: cannot access .profile*: No such file or directory
[vivek@krypton ~]$ 

PS: I am fairly new to Arch, not to Linux. With a whole bunch of changes having been introduced to Arch since the time I began using HP-UX (Unix, in case you were wondering) and other distros of Linux, it would certainly help if forums were as friendly as the wiki, and not terse. Apart from the unset suggestion from the OP, nothing I have been told so far has worked. I may not know a lot about my system, but I used to think that Arch and Linux are about renewing learning on a daily basis. No offense meant.

The thing is, the settings were obviously done by yourself, and its quite hard for us to blindly grope around for possible places where your variables are set. /etc/environment, ~/.environment (IIRC), .zprofile (if you use zsh), etc.

The scope is wide, and you're the best positioned to figure it out. Create a new user and test whether the same happens, at least you can eliminate /etc or ~/, depending on the results.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#16 2012-10-05 14:25:26

plustwo
Member
From: South Africa, ZA
Registered: 2012-09-13
Posts: 32

Re: Unable to change proxy settings

darmav, i had to ask this; what is selected in your settings -> Internet&Network -> Proxy? maybe select a different option in there to test what results resolves the problem.

tnx

Offline

#17 2012-10-06 12:20:16

darkmav
Member
Registered: 2012-01-21
Posts: 73

Re: Unable to change proxy settings

plustwo wrote:

darmav, i had to ask this; what is selected in your settings -> Internet&Network -> Proxy? maybe select a different option in there to test what results resolves the problem.

tnx

Sorry for the late reply plustwo.

I'm using KDE right now, and in the "Proxy Control Module", I have "No Proxy" as the selected option.

Offline

#18 2012-10-06 14:38:48

plustwo
Member
From: South Africa, ZA
Registered: 2012-09-13
Posts: 32

Re: Unable to change proxy settings

no stress darkmav, i'm also runnung a kde fork (trinity).  my proxy options are;
1. direct connection to the internet
2.  automatically detect proxy configs
3. use the ff config url
4. use preset proxy environment_variables
5. manual specify the proxy settings

my selected option is 1. i only set the proxy when at work and only if i need to use work access to the net.

Offline

#19 2012-10-06 15:57:59

darkmav
Member
Registered: 2012-01-21
Posts: 73

Re: Unable to change proxy settings

plustwo wrote:

no stress darkmav, i'm also runnung a kde fork (trinity).  my proxy options are;
1. direct connection to the internet
2.  automatically detect proxy configs
3. use the ff config url
4. use preset proxy environment_variables
5. manual specify the proxy settings

my selected option is 1. i only set the proxy when at work and only if i need to use work access to the net.

In spite of selecting the "No proxy" option, I still see the http_proxy and ftp_proxy in the shell. I am going to create a new user account and see if the problem persists. To be sure, the proxy settings are somehow configured by default in both the user accounts (mine, and root).

Which are the other files where these settings could be stored?

Offhand, I can only think of manually including 'unset http_proxy' and 'unset ftp_proxy' in ~/.bashrc...

Offline

#20 2012-10-09 23:53:09

darkmav
Member
Registered: 2012-01-21
Posts: 73

Re: Unable to change proxy settings

The problem persists. I have looked at all the profile and environment files I could think of.

It is irritating because every time I open a new terminal window in KDE, I have to manually do unset http_proxy and unset ftp_proxy...

Offline

#21 2012-10-10 06:09:38

plustwo
Member
From: South Africa, ZA
Registered: 2012-09-13
Posts: 32

Re: Unable to change proxy settings

if you type "set" in terminal and hit enter; that should tell you what is loaded or is set in your environment. just have a look in that result and see if you can figure out what is happening.

otherwise you might try simulating in a vbox environment or a reinstallation - sorry.

good luck

Offline

#22 2012-10-10 06:29:00

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,796

Re: Unable to change proxy settings

plustwo wrote:

if you type "set" in terminal and hit enter; that should tell you what is loaded or is set in your environment. just have a look in that result and see if you can figure out what is happening.

otherwise you might try simulating in a vbox environment or a reinstallation - sorry.

good luck

How does that differ from printenv which he showed earlier?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#23 2012-10-10 15:03:16

plustwo
Member
From: South Africa, ZA
Registered: 2012-09-13
Posts: 32

Re: Unable to change proxy settings

none. sorry.

Offline

#24 2012-10-11 18:29:47

gsgleason
Member
Registered: 2012-10-08
Posts: 59

Re: Unable to change proxy settings

This will search every regular file in your system for the hostname of the mystery proxy.

as root:

find / -type f -print0|xargs -0 grep -l ironport2\.iitk\.ac\.in 2>/dev/null

Offline

Board footer

Powered by FluxBB