Adding PATH to .bashrc not working [SOLVED]

Forum rules
Before you post please read how to get help
mint-o-licious
Level 1
Level 1
Posts: 38
Joined: Thu Feb 10, 2011 10:48 am

Adding PATH to .bashrc not working [SOLVED]

Postby mint-o-licious » Thu Aug 02, 2012 3:57 am

I'm trying to permanently add blender to my path but can not get it to work...
.bashrc:

Code: Select all

PATH=/usr/local/bin/blender-2.63-linux-glibc27-x86_64:"${PATH}"
PATH=/usr/local/bin/celtx:”${PATH}”
export PATH

executing source ~/.bashrc after change.

celtx works but not blender. Why?

exporting path form terminal works.
export PATH=/usr/local/bin/blender-2.63-linux-glibc27-x86_64
Last edited by mint-o-licious on Fri Aug 03, 2012 2:11 am, edited 1 time in total.

User avatar
xenopeek
Level 23
Level 23
Posts: 19022
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding PATH to .bashrc not working

Postby xenopeek » Thu Aug 02, 2012 5:18 am

The quotes in the second line are wrong. Those are not quotes from the ASCII character set, but some Unicode extended characters. Probably from copying from a web page or from a office document.

Change them to plain quotes to make it work. I think.

Code: Select all

PATH=/usr/local/bin/blender-2.63-linux-glibc27-x86_64:"${PATH}"
PATH=/usr/local/bin/celtx:"${PATH}"
export PATH
Image

mint-o-licious
Level 1
Level 1
Posts: 38
Joined: Thu Feb 10, 2011 10:48 am

Re: Adding PATH to .bashrc not working

Postby mint-o-licious » Thu Aug 02, 2012 5:29 am

Thanks, but that second line works. Its the first, blender, that doesn't work.

User avatar
Habitual
Level 12
Level 12
Posts: 4007
Joined: Sun Nov 21, 2010 8:31 pm
Location: Youngstown, Ohio

Re: Adding PATH to .bashrc not working

Postby Habitual » Thu Aug 02, 2012 7:43 am

PATH=$PATH:/usr/local/bin/blender-2.63-linux-glibc27-x86_64

should also work...

Code: Select all

echo "$PATH"
/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/kde4/libexec:/usr/lib/qt/bin:/usr/share/texmf/bin:.:/home/jj/Bin/ec2/bin:/home/jj/Bin
PATH=$PATH:/usr/local/bin/blender-2.63-linux-glibc27-x86_64
echo "$PATH"
/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/kde4/libexec:/usr/lib/qt/bin:/usr/share/texmf/bin:.:/home/jj/Bin/ec2/bin:/home/jj/Bin:/usr/local/bin/blender-2.63-linux-glibc27-x86_64


HTH.
Do you realize how hard it is for me to explain to people that I know you?

User avatar
xenopeek
Level 23
Level 23
Posts: 19022
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding PATH to .bashrc not working

Postby xenopeek » Thu Aug 02, 2012 8:33 am

mint-o-licious wrote:Thanks, but that second line works. Its the first, blender, that doesn't work.

I think that because of the error in the second line, you delete your path set in the first line. But Habitual's line should also work. So:

Code: Select all

PATH=$PATH:/usr/local/bin/blender-2.63-linux-glibc27-x86_64
PATH=$PATH:/usr/local/bin/celtx
export PATH
Image

User avatar
veggen
Level 4
Level 4
Posts: 399
Joined: Mon May 09, 2011 4:54 am
Contact:

Re: Adding PATH to .bashrc not working

Postby veggen » Thu Aug 02, 2012 8:37 pm

Isn't ~/.pam_environment the preferred place to edit environment?
I added something like

Code: Select all

PATH DEFAULT=${PATH}:/path/to/add

(different syntax from the one in .bashrc since this one isn't a script) and works fine.

mint-o-licious
Level 1
Level 1
Posts: 38
Joined: Thu Feb 10, 2011 10:48 am

Re: Adding PATH to .bashrc not working

Postby mint-o-licious » Fri Aug 03, 2012 2:10 am

Thank you all.
It was as xenopeek pointed out the second line that broke the first one. Now my paths are working well again.


Return to “Scripts & Bash”

Who is online

Users browsing this forum: No registered users and 2 guests