I have a Matlab R2007a installation on the Windows partition of my Macbook (using Bootcamp). Since I mostly use Mac OS for my daily work, it is inconvenient to have to reboot to Windows every time I need to use Matlab (and Octave cannot save me). I don’t like Matlab R2007a for Mac OS because it’s a little unstable and its user interface is ugly. I don’t like to use Parallel or Fusion because they make my system slower and Windows requires re-activation every time I switch between Bootcamp and the virtualization software. Furthermore, I don’t want to spend money on those software packages. And of course, I don’t have money to purchase the latest version of Matlab. So, what’s the solution? I’ve just discovered one.
My lab has a powerful server which has a full installation of a sub-latest version of Matlab (R2007b) with a network license. I’ve found out that I can connect to that server with X Window tunneling, which allows me to run Matlab on the server computer from my laptop. The interesting thing is that, with X Window tunneling, I have a full Matlab GUI on my laptop. So, it’s like having Matlab on your local computer. With a fast network connection (which is the case whenever I use my school network), running Matlab remotely on the server has some advantages:
- You don’t have to purchase Matlab, yet having a full installation.
- You still have full user interface and features as a local Matlab installation, even Simulink runs smoothly.
- No worry about installing, upgrading, maintaining.
- Faster Matlab if the server computer is powerful and no other users are doing anything heavy on the server. Actually, most of the time, the remote Matlab is faster than my local Matlab in heavy computation tasks.
Feeling very happy now.
Update: one commenter asked me to elaborate on the steps to run Matlab remotely, so here they are:
Requirements: notice that I don’t use Windows, and these steps are not for Windows; Windows users are probably out of luck. (Windows users might need to install Cygwin/X in order to run X Window, and I believe SSH can be installed on Cygwin).
- A remote computer (a server) with Matlab installed and has SSH-server capability. OpenSSH is a free SSH package; sshd must be installed and enabled. If the server runs Linux or any UNIX variant, sshd should be pre-installed or is very easy to install. If it runs Mac OS, enable SSH server by going to System Preferences/Sharing and activate Remote Login.
- You have an account (user-name and password) on the server; your account is allowed to access the server remotely. The server is configured to have a static IP address, which you know.
- The computer you are using (the client) has X Window system installed. If you runs Linux or any UNIX variant, with GUI, you are good to go. If you runs Mac OS, you need to install X11 whose installer is available on the MacOS disk and also online.
- The client must have SSH-client installed (see the first requirement, but you don’t need the SSH-server). If your computer runs Linux/UNIX or Mac OS, SSH is usually pre-installed and you don’t need to do anything.
- Open a terminal on the client. On Mac OS, you must open the X11 terminal, not the default terminal; you can do so by opening the X11 application.
- In the terminal, run the command:
ssh -X email@example.com. Enter your log-in credentials to remotely log-in to the server via SSH. The -X option is to enable X Window tunneling.
- Now you can run any X Window application on the server, and its GUI elements will be displayed on your client computer. You can work with the application as if you are running it on the client. Matlab can usually be started by the command
matlab. I would suggest using -nosplash and -nodesktop options. The second option will cause Matlab to run in the console instead of the full GUI. This might be a bit inconvenient but it is faster. Any Matlab GUI you start (e.g. plot windows, Simulink windows…) will still open as usual. You may experience a sluggish GUI, depending on the quality of the network connection between the client and the server.
- After you finish, close the remote connection by running
exitin the SSH’s console.