Running matlab remotely
Here is a start tutorial, pictures will be added later if needed. Please email with questions and comments
The simple way (no graphics or mouse interaction):
If you don't need to display any plots or graphics, and don't mind interacting through the command prompt, then you can run matlab with any program that supports ssh, and an internet connection.
- open the program (in OSX, open terminal.app, in Windows, use some secure shell program such as WinSCP, in UNIX run a terminal program such as bash)
- type the following: ssh icogsci1.ucsd.edu -l yourusernamefortheclassbutnotpassword
- then type return
- when prompted, type your password, then return
- press space when prompted
- then at the command prompt type matlab -nojvm
- matlab will start in the terminal window, text only (ie no mouse interaction, no plotting, just the command prompt, like we saw in class)
- you can do everything we've done so far this way. To run a script file, just make sure your matlab program is in the right workspace directory (see the unix tutorial for how to move around in directories in a command line environment), and then type the name of the file (ie if the file was called demo.m , run that file by typing demo at the command prompt.
The less simple way (but allows you to send graphics to your computer screen, and possibly interact with the mouse, etc)
- This basically requires some x11 server.
- OSX Users:
- So if you are running OSX, it requires nothing more than the free x11 program xdarwin. It is on the installer CD, or you can download it from Apple.com
- Windows Users:
- If you are running windows, you need to download and install some x11 server program (there are many free ones). A recommendation is cygwin, which allows you to run linux binaries on windows (after recompiling of course). Cool eh? It is fairly easy to install and set up. Come to office hours to install it on your laptops. It will take several minutes to install so be patient with the installation process. The installation manual for cygwin/X is here, and gives explicit instructions for running the installer and what packages to install specifically. Basically you'll install the default installation plus the required ssh files to take care of communication. Just follow the directions, then launch x11 by finding and double clicking the file startxwin.bat. An x-terminal will come up (a text only display) from there, follow the rest of the steps here to ssh into a server and launch matlab
- UNIX Users:
- If you are running UNIX, x11 is a typical window manager built in, so you should be able to launch it from there. If you already know UNIX, you most likely know enough to do this.
- Login as above from an x11 terminal program, but when performing the ssh command, change to ssh icogsci1.ucsd.edu -X -l yourusernamefortheclassbutnotpassword
-
- then type return
- when prompted, type your password, then return
- press space when prompted
- then at the command prompt type matlab
- matlab will start (it takes a while, depending on your network speed) and you will see the interface used in class. You can use your mouse, but it will be slower since it is running over the network.
- when done with matlab, quit matlab normally as you would any other program
- then type logout at the command prompt for the x-terminal
- There are many more options and details, but this is enough to get you started.