LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-06-2004, 09:23 PM   #1
mooreted
Member
 
Registered: May 2003
Posts: 598

Rep: Reputation: 30
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.
 
Old 04-07-2004, 11:48 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
Old 04-07-2004, 12:43 PM   #3
mooreted
Member
 
Registered: May 2003
Posts: 598

Original Poster
Rep: Reputation: 30
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.
 
Old 04-07-2004, 12:59 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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).
 
Old 04-08-2004, 08:48 AM   #5
mooreted
Member
 
Registered: May 2003
Posts: 598

Original Poster
Rep: Reputation: 30
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.
 
Old 06-11-2004, 03:55 PM   #6
Fische
LQ Newbie
 
Registered: Feb 2004
Location: portland
Distribution: Debian
Posts: 22

Rep: Reputation: 0
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.
 
Old 06-11-2004, 04:03 PM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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

Last edited by keefaz; 06-11-2004 at 04:08 PM.
 
Old 06-11-2004, 04:16 PM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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
 
Old 06-16-2004, 07:45 PM   #9
Fische
LQ Newbie
 
Registered: Feb 2004
Location: portland
Distribution: Debian
Posts: 22

Rep: Reputation: 0
thanks, i edited .bashrc and it works just fine
 
  


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
Image Path reference in Linux (Absolute path) javabuddy Linux - General 7 06-05-2006 07:45 AM
Instructions for getting Wireless Working alacritous Linux - Wireless Networking 9 10-21-2004 05:03 PM
edit path environment variable to include current working directory alb1954 Linux - Newbie 8 07-11-2004 11:26 PM
How to Chnage Python's module search path (sys.path)? lramos85 Linux - Software 1 05-02-2004 06:10 PM
Instructions for getting ANY wireless NIC card working in Redhat 8.0 ksalopek Linux - Wireless Networking 2 01-26-2004 08:14 AM

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

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