LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   matlab and .bashrc (https://www.linuxquestions.org/questions/linux-newbie-8/matlab-and-bashrc-919846/)

rmedinac007 12-21-2011 12:33 PM

matlab and .bashrc
 
Hello forum:
I installed matlab in my pc. I want to run it from any directory.
I added this line to my ".bashrc" file:

alias matlab="~/usr/local/MATLAB/R2011b/bin/matlab"


But it does not work.
However it works when I run it form the path where matlab is installed.
Do I need to do it in the root ".bashrc" file?
I am confused. Any help is appreciated.
Thanks

P.S. Also I would like to put the direct access icon to my favorites. Anyone knows how to do it?

Didier Spaier 12-21-2011 12:42 PM

Hello,

I would make a symbolic link to the binary instead; type as root :
Code:

ln -s /home/your_user_name/usr/local/MATLAB/R2011b/bin/matlab usr/bin/matlab
And i suggest you avoid the ~ shortcut anyway in configuration files.

P.S. Do you really have a /usr/local directory in your /home/your_use_name directory ?

Other than that, please indicate which distribution and desktop you use to help answer your P.S.


All times are GMT -5. The time now is 05:26 PM.