Adding PATH to .bashrc not working [SOLVED]

Forum rules
Before you post please read this

Adding PATH to .bashrc not working [SOLVED]

Postby mint-o-licious on 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.
mint-o-licious
Level 1
Level 1
 
Posts: 41
Joined: Thu Feb 10, 2011 10:48 am

Linux Mint is funded by ads and donations.
 

Re: Adding PATH to .bashrc not working

Postby xenopeek on 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
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14849
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding PATH to .bashrc not working

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

Thanks, but that second line works. Its the first, blender, that doesn't work.
mint-o-licious
Level 1
Level 1
 
Posts: 41
Joined: Thu Feb 10, 2011 10:48 am

Re: Adding PATH to .bashrc not working

Postby Habitual on 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.
What's a landing but a take off in reverse?
My DorkBlog
User avatar
Habitual
Level 8
Level 8
 
Posts: 2140
Joined: Sun Nov 21, 2010 8:31 pm
Location: Undecided

Re: Adding PATH to .bashrc not working

Postby xenopeek on 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
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14849
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding PATH to .bashrc not working

Postby veggen on 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.
User avatar
veggen
Level 4
Level 4
 
Posts: 401
Joined: Mon May 09, 2011 4:54 am

Re: Adding PATH to .bashrc not working

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

Thank you all.
It was as Vincent Vermeulen pointed out the second line that broke the first one. Now my paths are working well again.
mint-o-licious
Level 1
Level 1
 
Posts: 41
Joined: Thu Feb 10, 2011 10:48 am

Linux Mint is funded by ads and donations.
 

Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 0 guests