Running Matlab remotely
64 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I currently have Matlab installed on a Linux Workstation with the Ubuntu OS. I've updated the .bashrc file so that the Matlab directory is set as a PATH, and that I can type "matlab" from an run the program from the terminal without problem.
However, when I ssh into my Linux Workstation from my MacBook pro and try to run Matlab remotely using Mac's "Terminal" application by typing "matlab", it returns the message "matlab: command not found".
I simply only need to run matlab from the terminal (no need for graphics). Any advice on this? I've tried to messing around with my .bashrc and .bash_profile files on the Linux machine and my Mac to no avail.
0 Kommentare
Antworten (4)
the cyclist
am 16 Mär. 2012
I believe that the answer (and particularly the ideas in the comments) here
might help you.
0 Kommentare
Jason Ross
am 16 Mär. 2012
It sounds like the remote workstation isn't set up to source your .bashrc file. As a quick test when you log in, you can do
. /path/to/your/.bashrc
And then see if you can start MATLAB after that. If you can, your system is not sourcing the file automatically. This could be because of a few reasons:
- The shell being used for login isn't bash -- it could, for example, be tcsh, so the .bashrc won't be sourced.
- The remote system isn't configured to source your .bashrc. Check in the /etc directory and look at bash.bashrc. You may need to do something to /etc/profile to have it source the file. Each system is a little different, but you can google around for how it works if the comments in the various files don't make sense.
0 Kommentare
David
am 16 Mär. 2012
2 Kommentare
Daniel Shub
am 16 Mär. 2012
It sounds like you have a solution. Please accept the best answer to this question and vote for other answers that where helpful in solving your problem.
Daniel Shub
am 16 Mär. 2012
While David has a working solution. Three other options are:
Create a symbolic link to the matlab binary in /usr/bin
sudo ln -s /usr/local/MATLAB/R2010b/bin/matlab /usr/bin/matlab
this will allow you to run MATLAB directly from the command line without having to add a path. Some people might link the current version to both /usr/bin/matlab and /usr/bin/matlab_r2011a (or whatever naming convention suits your fancy)
Another option instead of exporting the path is to simply supply the path when launching matlab
/usr/local/MATLAB/R2010b/bin/matlab
You can also add an rc file to your .ssh directory on the remote machine to add the path or source your bash.rc. something like Jason's
. /path/to/your/.bashrc
3 Kommentare
Daniel Shub
am 16 Mär. 2012
Are there distros that do not have /usr/bin on the path by default? Are there users/sys admins who take /usr/bin off the path?
Jason Ross
am 16 Mär. 2012
With 4000+ versions of Linux + BSD out there (source: distrowatch.com), anything is possible :)
I would expect both /bin and /usr/bin to be on the path, though. I can't imagine someone taking them off them path, either. I've done that when I've fat-fingered a PATH setting in the past, and it's not pretty ... at all. "ls: not found" ... oops :)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!