Adding PATH to .bashrc not working [SOLVED]

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
mint-o-licious

Adding PATH to .bashrc not working [SOLVED]

Post by mint-o-licious »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Adding PATH to .bashrc not working

Post by xenopeek »

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

Re: Adding PATH to .bashrc not working

Post by mint-o-licious »

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

Re: Adding PATH to .bashrc not working

Post by Habitual »

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.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Adding PATH to .bashrc not working

Post by xenopeek »

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
veggen

Re: Adding PATH to .bashrc not working

Post by veggen »

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

Re: Adding PATH to .bashrc not working

Post by mint-o-licious »

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

Return to “Scripts & Bash”