Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 06-04-2006, 08:23 PM   #1 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,554

Greg is on a distinguished road

Default Private bin (.bash_profile)

I am trying to edit my .bash_profile file to have it include my priavte bin (/home/greg/bin) but each time I try to execute my test command it says it was not found. I made the portion of the file look like this:
Code:
# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=:"~/bin:${PATH}"
fi
but that didn't work, and neither did
Code:
# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=:"~/bin"
fi
I also tried using '/home/greg/bin' instead of '~/bin' but that didn't work either. What am I doing wrong?

Thanks,
~Greg
__________________
Greg is offline  
Old 06-04-2006, 09:23 PM   #2 (permalink)
macdude425's Avatar
 
Member (again)

Join Date: Jan 2005

Location: Raul's Wild Kingdom...How 'bout that, huh?

Posts: 4,200

macdude425 is on a distinguished road

Send a message via AIM to macdude425 Send a message via Yahoo to macdude425
Default

You have to make it "~greg/bin" if you want to try that.
__________________



Debian Support Forums!
macdude425 is offline  
Old 06-05-2006, 08:24 PM   #3 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,554

Greg is on a distinguished road

Default

Still no luck. Am I doing it right?
Code:
# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=:"~greg/bin"
fi
]

Thanks for the help
__________________
Greg is offline  
Old 06-05-2006, 08:40 PM   #4 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

put " left of : I think
horndude is offline  
Old 06-07-2006, 09:04 PM   #5 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,554

Greg is on a distinguished road

Default

Still not working, do I need to logout or something to get it to take effect?
__________________
Greg is offline  
Old 06-07-2006, 09:37 PM   #6 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

I think so yes, I know any changes to .bashrc you do, they get stored in a buffer when you log on.

might have to run ldconfig too? not sure, usually anytime the PATH environment gets changed the system needs updated to reflect it.....it will do that when libraries are installed and PATH isnt updated to reflect the new location... ie for example a new library gets put into /usr/local for example.....your own PATH bin would be the same methinks

I think the ":" needs in there cause if you look at echo $PATH you will see something like:
/usr/bin:/usr/local/bin: etc etc etc ..... the ":" needs to be at the end though, not beginning, that way the next PATH variable can be tacked on if needed
horndude is offline  
Old 06-08-2006, 03:01 AM   #7 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,554

Greg is on a distinguished road

Default

Alright, so what exactly should I change that section to? I am sort of confused by this. Like this?
Code:
# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=":~greg/bin"
fi
Thanks for all the help, I appreciate it.
__________________
Greg is offline  
Old 06-08-2006, 05:47 PM   #8 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

PATH="/home/greg/bin:"

I think
horndude is offline  
Old 06-10-2006, 01:20 AM   #9 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,554

Greg is on a distinguished road

Default

Hmm, still doesnt work, even after I logout. I will test again after my next boot and see if it still doesnt work then.
__________________
Greg is offline  
Old 06-10-2006, 10:53 AM   #10 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

as root run ldconfig /home/greg/bin

see if that helps
horndude is offline  
 
Closed Thread

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On