As of late I’ve been looking for an optimal solution for running MATLAB on my brand new MacBook.Â I’ve tried running things natively under Windows & Linux as well as in Parallels for both, and the concept of rebooting ad-nauseum or working in a rooted (ie, having an operating system with a root window running) environment for either one doesn’t sound great unless one has an attached external display.Â With Windows this even allows for seamless mouse movement between environments.Â But either way, you’re sucking up a whole bunch of non-resizable (changing resolutions is a little too slow) screen realestate sucking windows either minimized or consuming one’s desktop.Â What solution is there for this without having to emulate MATLAB under Rosetta?I’m glad you asked.Â While The MathWorks doesn’t support running MATLAB remotely through X11 forwarding or anything else, it actually works quite well so long as things are set up properly.Â The 3D performance will never be fantastic since GLX doesn’t work with forwarding, at least with Apple’s X11 (though perhaps it doesn’t do this at all considering in most cases the bandwidth usage would be prohibitive), however, everything else works great.Â I’ve been using a similar solution to access MATLAB graphically (no desktop) on a linux box using Windows & Mac clients, and it works perfectly.So, I thought to myself, why not make a minimal linux setup under parallels that can boot an run matlab, and then use SSH & Apple’s X11 to access this environment locally.Â In the end you get individual plot windows, edit windows, etc.. that are just like other apps on your Mac, except that it’s running through a local virtual environment.I’m going to work on a guide for getting things set up in this manner, though I need to work on tweaking the setup a bit to minimize the size of the linux install, and get the networking working properly (I’ve been having troubles as of late when switching between VPN, wireless & hardwired connections.).Â I will however give a quick rundown of what’s necessary to get this working.
- Parallels (here)
- Use Host-only networking, with internet sharing enabled, or not.
- Make sure you have X installed, and have an SSH daemon running
- MATLAB can be installed from loopback devices or actual CDs
- Make sure you first “export DISPLAY=:0.0” & Start Apple X11
- The -Y is necessary, though less secure, to enable trusted status for X connections coming over SSH.. if you do not enable this, sometimes windows won’t be sized properly, and other X apps may die very horrible deaths due to other issues, which I don’t know the technical origins of (pptpconfig is one such app)
After a little more playing around with things I may post a parallels image with a minimal linux distro or something along those lines (if anyone is interested), along with brief instructions on installation.Notes:
- This is still ugly since a fixed amount of RAM needs to be allocated for the whole environment.
- 3D stuff is damned slow
- I still consider this to be a nice holdover while waiting for TMW to release an intel compatible Mac release (or beta).