LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   PATH instructions no working (https://www.linuxquestions.org/questions/slackware-14/path-instructions-no-working-167100/)

mooreted 04-06-2004 09:23 PM

PATH instructions no working
 
I followed the suggestions here for setting the PATH but it doesn't work. I created .bash_profile, .bash-profile and .bashrc and put the same lines in each in my efforts to set a path to OpenOffice so I wouldn't have to type /home/mooreted/OpenOffice.org1.1.1/program/ every time I wanted to create menus in blackbox. Here are the lines I added:

PATH=$PATH:/home/mooreted/OpenOffice.org1.1.1/program/
export PATH

But echo $PATH just shows the global path that Slack set up by itself and typing swriter at the cli does not work.

There must be a way to set the path.

Ted.

druuna 04-07-2004 11:48 AM

Did you parse the newly created files (or logged out and in)??

Untill you do, the new PATH variable will not be set automatically.

Hope this helps.

mooreted 04-07-2004 12:43 PM

Yeah, I even tried rebooting. No matter, I put the path at the end of the PATH command in /etc/profile

Thanks for the help.

druuna 04-07-2004 12:59 PM

PATH=$PATH:/home/mooreted/OpenOffice.org1.1.1/program
export PATH


These 2 lines should be at/near the end of your /etc/profile (global). Even better is putting it in ~/.profile (local), just leave the other stuff the way it was.

Is your syntax correct? If you want you can post the part you added/edited.

Btw: You don't need the last / (after /program).

mooreted 04-08-2004 08:48 AM

Thanks. I didn't know you could have more than one PATH command. That would be handy.

PATH=$PATH:/home/mooreted/OpenOffice.org1.1.1/program/
export PATH

That is copied and pasted from the ~.bash-profile I created.

Fische 06-11-2004 03:55 PM

I'm having the same problem with not being able to change my PATH. All im trying to do is add ' ./ ' to the PATH so that i don't have to type ./a.out all the time. I went to /etc/profile and included ' ./ ' in the PATH. I've restarted the terminal, rebooted my machine and no matter it won't add ' ./ ' to the PATH.

here is /etc/profile

PATH="./:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"

if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi

export PATH

umask 022

am i doing something wrong or do i have to change something else to get it working? Thanks for your help.

keefaz 06-11-2004 04:03 PM

try PATH="$PWD:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"

see if it works

[edit]
but do no append this sort of things to a system config do this in ~/.bashrc instead
and this can also be done by simply :

export PATH="$PWD:$PATH"
in ~/.bashrc

keefaz 06-11-2004 04:16 PM

Quote:

That is copied and pasted from the ~.bash-profile I created.
I assume you did a typo error (~/.bash_profile). For properly configure system I used to have a ~/.bash_profile like this :

if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

that's all, all the stuff is in ~/.bashrc

Fische 06-16-2004 07:45 PM

thanks, i edited .bashrc and it works just fine


All times are GMT -5. The time now is 04:23 AM.