LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 04-15-2004, 10:42 AM   #1
ttilt
Member
 
Registered: Dec 2003
Location: Campinas, Brasil
Distribution: slackware 10
Posts: 150

Rep: Reputation: 15
/etc/profile doesn't work for setting a global PATH


hey,

I've been trying to adding /usr/java/j2sdk1.4.2_03/bin to my PATH in order to use the java compiler from anywhere. I tried adding this to my PATH in /etc/profile, thinking this would change the path configuration for all users at boot time, but it doesn't work... it's like the file is never executed...

Isn't /etc/profile supposed to always run for all users logging in?

thanks,
John
 
Old 04-15-2004, 12:08 PM   #2
jsokko
Member
 
Registered: Mar 2004
Location: Phila, PA
Distribution: SuSE 9.0 / RH 9 / Slackware 9.1
Posts: 110

Rep: Reputation: 15
Can you post how you've added the PATH?
 
Old 04-15-2004, 01:27 PM   #3
ttilt
Member
 
Registered: Dec 2003
Location: Campinas, Brasil
Distribution: slackware 10
Posts: 150

Original Poster
Rep: Reputation: 15
here are snippets from my /etc/profile file:


...
# Users generally won't see annoyng core files
[ "$UID" = "0" ] && ulimit -S -c 1000000 > /dev/null 2>&1

if ! echo ${PATH} |grep -q /usr/X11R6/bin ; then
PATH=$PATH:/usr/X11R6/bin
fi

if [ "$UID" -ge 500 ] && ! echo ${PATH} |grep -q /usr/games ; then
PATH=$PATH:/usr/games
fi

...
# my modification
PATH=$PATH:/usr/java/j2sdk1.4.2_03/bin

...

export 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
How to change Fedoras PATH in profile Lawful Linux - Newbie 1 04-30-2004 08:19 PM
vga=xxx global setting doesn't work with grub illtbagu Linux - Software 6 02-02-2004 12:46 PM
Adding a file to the path in etc/profile zzzt Linux - Newbie 3 10-24-2003 03:53 PM
linking downloaded c library to global search path syoh Programming 1 10-17-2003 01:33 AM
/etc/profile and include path Tom9K Linux From Scratch 2 05-13-2002 01:57 PM

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

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