LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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: FreeSlack version of Slackware 14.1
Posts: 100

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: 448

Rep: Reputation: 37
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: 448

Rep: Reputation: 37
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: FreeSlack version of Slackware 14.1
Posts: 100

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: 55
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: 448

Rep: Reputation: 37
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: Clinton Township, MI
Distribution: Debian, antiX, Kubuntu, Xubuntu, and many others
Posts: 598
Blog Entries: 15

Rep: Reputation: 80
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 07:15 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration