LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-30-2004, 02:53 AM   #1
PAOLO_GRS
LQ Newbie
 
Registered: Mar 2004
Posts: 16

Rep: Reputation: 0
Unhappy I have a strange problem with $PATH..


Ciao to Everybody..
I'm not so frendly using Linux, I want to know many HowTO, so..
Please, Help ME!

I'm using SuSE 9.0, and because I need to change it, I had many
problems modifing the PATH variable..

..better, I have modified PATH, entering in the ~/.bashrc file my new 2 lines

PATH=$PATH:/new_path/to/add
export PATH

The first time I open shells everithing's OK, but if I reboot the machine,
the PATH value change.. My new PATH entry is set 3 times..
So strange, no?

I don't know why, I have tried also with ~/.bash_profile but in this case PATH doesn't change..

What I can do?
Help me, please.. CIAO ;o)
 
Old 03-30-2004, 03:00 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
You need to make the change to .bash_profile and not .bashrc .
.bash_profile is run once when you log on. .bashrc is sourced everytime you open a new terminal in x-windows. This is why the path variable keeps groing on you.

Check 'info bash' for details on which files run. Also from your home directory, type:
cat .bash_profile.
There will probably be a comment indicatiing where toinsert your path command.
 
Old 03-30-2004, 05:07 AM   #3
PAOLO_GRS
LQ Newbie
 
Registered: Mar 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Thank You for the advice..

I've tried to insert the PATH definition in ~/.bash_profile instead of .bashrc
but the system seems to ignore my instructions..

I have created ~/.bash_profile file because it didn't exists before..

It seems that this file is not sourced by my SuSE.. Incredible!

Ciao.
 
Old 03-30-2004, 05:33 AM   #4
Gnuru
Member
 
Registered: Jan 2004
Posts: 53

Rep: Reputation: 15
I've also found this quite annoying!

It depends in which order the files are read and this sometimes seems to vary from distribution to distribution. The bash man page explains in which order they are supposed to be read.

Anyway, I've got an explanation of how I fixed this problem, here (sorry can't be bothered typing it out again): http://gnuru.org/index.pl?node_id=676
 
Old 03-30-2004, 06:25 AM   #5
PAOLO_GRS
LQ Newbie
 
Registered: Mar 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Smile

Hello,
as You suggest, I have tried with this files setting but
my PATH has 3 entry repeated..

I'm still catching some strange commands in these mentioned file scripts..

Thank You for your Help..

CIAO
 
  


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
This might sound strange but... $PATH mago Linux - General 1 11-07-2005 06:04 PM
Strange looking path Gins Linux - General 2 11-19-2004 05:37 PM
strange, strange alsa problem: sound is grainy/pixellated? fenderman11111 Linux - Software 1 11-01-2004 06:16 PM
Strange path... Bjornkri Linux - Newbie 2 02-17-2003 09:28 AM
help with strange path problem please... scottyman Linux - Software 0 01-31-2003 04:17 AM


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