LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-26-2004, 11:07 AM   #1
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Rep: Reputation: 31
PATH confusion


New installation of Sarge; still ironing out the details.

in /etc/profile, the default PATH is set as:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
(that was set up by the debian installer; I haven't changed it)

in my ~/.bash_profile I put:
PATH=$PATH:/usr/lib/brickos/util

but if I type "env" or "echo $PATH" in a Gnome terminal window, the PATH is:
/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin

I searched around & found in /etc/init.d/gdm there's a line that says:
PATH=/sbin:/bin:/usr/sbin:/usr/bin

so that agrees with the first 4 entries I get in the terminal window, but where's /usr/local/sbin coming from? and what happened to /usr/bin/X11 and /usr/games and /usr/lib/brickos/util?

If I get out of X (by ctl-alt-F1) and login at the command line, then "echo $PATH" responds exactly as I would expect:
"/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/lib/brickos/util"

What's going on here? How do I set my path in X?
 
Old 09-26-2004, 11:44 AM   #2
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Perhaps you should also check ENV_SUPATH and ENV_PATH in /etc/login.defs. Different ways of logging in (from CLI or a GUI login) appear to use different shell configuration files. I've never figured out how it works exactly.
 
Old 09-26-2004, 12:29 PM   #3
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
OK, those 2 entries in /etc/login.defs agree exactly with what I get in Gnome terminal windows. (I guess when I checked the PATH earlier, I didn't realize I was in an su window.)

But, it seems that in an X session, my .bash_profile is just ignored. Is this normal in Debian? (It's not in Gentoo: there, my PATH in an X session is exactly the same as in console mode.
 
  


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
Image Path reference in Linux (Absolute path) javabuddy Linux - General 7 06-05-2006 07:45 AM
How to Chnage Python's module search path (sys.path)? lramos85 Linux - Software 1 05-02-2004 06:10 PM
rpm path confusion - distro specific rpm? gandalf2041 Linux - Software 2 04-08-2004 02:19 PM
Help! Mandrake 9.2 PATH confusion joeln Mandriva 1 01-24-2004 10:49 PM
$PATH confusion snocked Linux - General 5 07-25-2003 10:06 AM

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

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