LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 03-14-2007, 05:07 AM   #1
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675
Blog Entries: 11

Rep: Reputation: 36
PATH question


Hi, I don't have a pressing problem, just a question.

When I check 'echo $PATH' I get a long colon seperated list that includes '/usr/bin/X11' but when I check my dot files in my home directory there's no 'X11' mentioned in any of the path settings. Similarly there's no mention in '/etc/profile' of '/usr/bin/X11'. My question is - where is the path set originally for the whole system. I thought it was '/etc/profile' but must be wrong.
 
Old 03-14-2007, 09:55 AM   #2
cgjones
Member
 
Registered: Nov 2005
Location: Central New York
Distribution: Ubuntu
Posts: 405

Rep: Reputation: 31
I am pretty sure that PATH is set in /etc/profile. On my system, the output of echo $PATH matches the line in /etc/profile that sets the PATH for users.
 
Old 03-14-2007, 03:13 PM   #3
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675

Original Poster
Blog Entries: 11

Rep: Reputation: 36
cgjones:
Quote:
I am pretty sure that PATH is set in /etc/profile. On my system, the output of echo $PATH matches the line in /etc/profile that sets the PATH for users.
I'm using etch on a i386 desktop. Just curious what other people have on their systems. Is $PATH always set in '/etc/profile'?
 
Old 03-14-2007, 04:15 PM   #4
Tortanick
Member
 
Registered: Jul 2006
Distribution: Debian Testing
Posts: 299

Rep: Reputation: 30
Mine is

/usr/local/bin:/usr/bin:/bin:/usr/games
 
Old 03-14-2007, 05:51 PM   #5
cgjones
Member
 
Registered: Nov 2005
Location: Central New York
Distribution: Ubuntu
Posts: 405

Rep: Reputation: 31
Debian Etch/Testing
Code:
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
 
Old 03-14-2007, 06:04 PM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
cgjones, can you try in a console? CtrlAltF1
 
Old 03-14-2007, 06:20 PM   #7
cgjones
Member
 
Registered: Nov 2005
Location: Central New York
Distribution: Ubuntu
Posts: 405

Rep: Reputation: 31
Quote:
Originally Posted by nx5000
cgjones, can you try in a console? CtrlAltF1
Same results.
 
Old 03-14-2007, 06:59 PM   #8
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
You have X11 inside even from the console?
Then you have old profiles from sarge or old etch before the migration to Xorg 7?
It has to be either from /etc/profile or ~/.profile or ~/.bash_profile (which might execute ~/.bashrc in some case)
man bash part INVOCATION explains you what file is sourced.

It's one of these files
 
Old 03-15-2007, 05:12 AM   #9
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675

Original Poster
Blog Entries: 11

Rep: Reputation: 36
From the console (ctrl-alt-F1) my path doesn't include anything about '/usr/bin/X11'. Does or could gdm (or something like it) add something to the path just before I use Gnome? Is that possible? I have Xorg - I don't know which version - if that makes a difference...
 
Old 03-15-2007, 05:46 AM   #10
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Exactly
Could be gdm/kdm/xdm or gnome through gconf (I don't really know gconf and gnome).
A few days ago, I switched back to gnome and gnome-noob that I am, I realised that setting the proxy from the gnome menu could affect the environment variable http_proxy. I need a centralized configuration independent of the WM and even without X so I quickly removed it.

No Xorg doesn't set variables afaik.
You can check this by loggin in user and bypass gdm/xdm/..
xinit /usr/bin/xterm -- :0

This starts X without WM and starts xterm.
then try echo $PATH

Actually PAM can also set PATH but I don't use it.

cgjones you could try to find where it's referenced:
Code:
grep -r "/usr/bin/X11" /etc
Anyway, here /usr/bin/X11 also exist and points to /usr/bin. I got xorg 7 from experimental at the time so did a lot of things manually. I think I removed also the /usr/bin/X11 from the PATH. It doesn't make any harm to have /usr/bin/X11 pointing to /usr/bin and /usr/bin/X11 in the PATH...

Last edited by nx5000; 03-15-2007 at 05:47 AM.
 
Old 03-15-2007, 11:09 AM   #11
cgjones
Member
 
Registered: Nov 2005
Location: Central New York
Distribution: Ubuntu
Posts: 405

Rep: Reputation: 31
Quote:
Originally Posted by nx5000
cgjones you could try to find where it's referenced:
Code:
grep -r "/usr/bin/X11" /etc
Code:
/etc/login.defs:ENV_SUPATH      PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
/etc/login.defs:ENV_PATH        PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
 
Old 03-16-2007, 09:00 AM   #12
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,834

Rep: Reputation: 108Reputation: 108
Hi,

I had same question a while ago. It may be wrong, but I think,

pam (shadow password suite) handles these basic issues (man 7 pam) and login.defs is referred (man login.defs)

I hope I am correct, if not this post contains incorrect information.

Happy Penguins!
 
Old 03-16-2007, 10:06 AM   #13
BillyGalbreath
Member
 
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379

Rep: Reputation: 31
Quote:
Originally Posted by kaz2100
..I hope I am correct, if not this post contains incorrect information..
I like that. Made me laugh. Thanks.
 
  


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
PATH question satimis Linux From Scratch 5 09-15-2005 10:23 AM
Another $PATH question iamnilo Fedora 2 09-13-2004 03:02 PM
question about $PATH drewski Linux - General 2 01-06-2004 02:17 AM
question about $PATH SigningiS Linux - Newbie 17 10-27-2003 12:35 PM
Question about PATH? eddielins Linux - General 6 04-02-2001 08:18 AM

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

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