LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-02-2007, 11:04 AM   #1
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Debian Stretch
Posts: 127

Rep: Reputation: 15
$PATH /etc/profile question


This is a kind of stupid question. It's just curiosity. I know that the default path for users is stored in /etc/profile. I did a minimalist install so my /etc/profile just includes:

/usr/local/bin:/usr/bin:/bin:/usr/games

I was of the opinion that other additions to the path would be included in ~/.bash_profile. But when I type

echo $PATH

I get:

/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

and there is no mention of /usr/bin/X11 in either /etc/profile or ~/.bash_profile.

So my question is how did /usr/bin/X11 get added to $PATH ?
 
Old 07-02-2007, 12:37 PM   #2
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
Maybe by /etc/login.defs which is used by su among other things.

Check /etc/login.defs for the ENV_PATH and ENV_SUPATH variables.
If that's not it then I dunno.
 
Old 07-02-2007, 12:39 PM   #3
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
Oh yeah forgot, are you using X? If you are which login manager are you using, Xdm, Gdm, Kdm etc. These programs can also set $PATH
 
Old 07-03-2007, 08:51 AM   #4
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Debian Stretch
Posts: 127

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Daws
Maybe by /etc/login.defs which is used by su among other things.

Check /etc/login.defs for the ENV_PATH and ENV_SUPATH variables.
If that's not it then I dunno.
Thanks, that was it. They both include it. The ENV_PATH variable is set to exactly what I get with echo $PATH. Like I said, it was just curiosity, but thanks for the help :-)
 
Old 07-03-2007, 09:07 AM   #5
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Did you try checking ~/.bashrc for that $PATH declaration?
 
Old 07-03-2007, 10:18 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Yes probably it's gdm that is setting this.
This /usr/bin/X11 does not exist anymore on etch
 
Old 07-03-2007, 11:57 AM   #7
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
It still exists as a link to /usr/bin for compatibility reasons.
 
Old 07-03-2007, 02:57 PM   #8
masinick
Member
 
Registered: Apr 2002
Location: Greenville, SC
Distribution: Debian, antiX, MX Linux
Posts: 639
Blog Entries: 16

Rep: Reputation: 104Reputation: 104
http://www.troubleshooters.com/linux/prepostpath.htm has a nice discussion about the use of $PATH from Bash and where the path environment is typically set. That said, it is most certainly either the window manager or the desktop environment that is setting the additional directory in your environment path.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Do you add to the path line or make a new path in /etc/profile? M$ISBS Linux - Newbie 2 12-13-2006 02:14 PM
How to change Fedoras PATH in profile Lawful Linux - Newbie 1 04-30-2004 08:19 PM
Adding a file to the path in etc/profile zzzt Linux - Newbie 3 10-24-2003 03:53 PM
Editing path permanently...but I don't have .bashrc or .profile shock_ez Linux - Newbie 6 07-02-2003 05:16 PM
/etc/profile and include path Tom9K Linux From Scratch 2 05-13-2002 01:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:31 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