LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-09-2006, 12:15 AM   #1
JBull
Member
 
Registered: Jul 2005
Location: Dallas, TX, USA
Distribution: Debian Etch
Posts: 37

Rep: Reputation: 15
How add a $PATH at boot for all users


How do we add a PATH for all users that is automatically set when any user logs in?

I know about .bash_profile and .bashrc, for a specific user.

But I want to add a path that is universal for all users. I added a path to /etc/profile but when I have logged in as root the path is not as expected. I have to type #source /etc/profile then the correct paths are set.

I'm running Debian Sarge.

thanks
 
Old 12-09-2006, 12:41 AM   #2
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
Check out /etc/login.defs
 
Old 12-09-2006, 10:47 PM   #3
JBull
Member
 
Registered: Jul 2005
Location: Dallas, TX, USA
Distribution: Debian Etch
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by introuble
Check out /etc/login.defs
Thanks, That did the trick for booting to a command line. echo $PATH and everything is correct. However when I startx & Gnome then open a terminal window I type echo $PATH and it has changed. Maybe I should comment out the path lines in .bashrc for each user??

Surely there is a good solution to this problem. This machine is used specifically for creating GIS maps and anyone logged on will need the maptools binaries in their path. Will I have to manually add this to the .bashrc for each user?? That blows.
 
Old 12-09-2006, 11:14 PM   #4
zetabill
Member
 
Registered: Oct 2005
Location: Rhode Island, USA
Distribution: Slackware, Xubuntu
Posts: 348

Rep: Reputation: 32
Why not put
Code:
. /etc/profile
in .bashrc?
 
Old 12-11-2006, 11:34 AM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
JBull,

Where in Houston?

Have we seen you at HLUG yet?
 
Old 12-11-2006, 12:35 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by JBull
Thanks, That did the trick for booting to a command line. echo $PATH and everything is correct. However when I startx & Gnome then open a terminal window I type echo $PATH and it has changed. Maybe I should comment out the path lines in .bashrc for each user??

Surely there is a good solution to this problem. This machine is used specifically for creating GIS maps and anyone logged on will need the maptools binaries in their path. Will I have to manually add this to the .bashrc for each user?? That blows.
Just add the file to be sourced from their own .bashrc or .bash_profile, no need to add the whole $PATH line in it.

Code:
source /etc/filename
 
  


Reply

Tags
path



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I add a path to the LD_LIBRARY_PATH abatista Linux - Newbie 7 01-05-2014 04:03 PM
add to path towel401 Linux - Newbie 3 07-23-2006 10:38 PM
Add path to @INC deus1 Linux - Software 0 07-27-2005 07:52 AM
How to add subdirectories in PATH marconi Linux - General 3 08-27-2004 03:27 PM
How do I add something to my $PATH? iammeuno Linux - Software 1 12-18-2003 04:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:11 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
Open Source Consulting | Domain Registration