Running Matlab from Home

Installing Cygwin

The easiest and cheapest (free!) way to run Matlab on the engineering machines from your home computer running Windows is to install the program called Cygwin. This can be downloaded from this link . On this site, click on setup.exe, and follow the instructions.

NOTE: by default, setup.exe does NOT install everything in the Cygwin package. In fact, it probably will not install the necessary files to display Matlab's output on your home computer. On the appropriate screen, you need to click on the little round arrow icon next to 'All' until the word to the right reads 'install'. Warning, the installation will take a while and use up a lot of disk space, approximately 3GB!

Using Cygwin

  • Double click on the Cygwin icon on your desktop.

  • At the prompt, type

    startx

  • In the new window that opens up, type

    ssh -X -l username linux.engr.ucsb.edu

    where username should be replaced by your user name. Enter your password.
    NOTE: If you do the following and Matlab still doesn't work, instead try

    ssh -Y -l username linux.engr.ucsb.edu

  • At the prompt, type

    matlab

    Note that the ssh command randomly assigns you to an engineering computer, based on the number of users on each machine. Not all engineering computers are able to run Matlab. If you get an error such as

    /fs/eci.x86_rhl60/matlab7sp1/bin/glnx86/MATLAB: /lib/libc.so.6: version `GCC_3.0' not found (required by /fs/eci.x86_rhl60/matlab7sp1/bin/glnx86/../../sys/os/glnx86/libXm.so.2)

    try the ssh command again to (hopefully) get onto another computer which can run Matlab.

    A message such as

    X Error of failed request: BadAtom (invalid Atom parameter)
    Major opcode of failed request: 18 (X_ChangeProperty)
    Atom id in failed request: 0xed
    Serial number of failed request: 11
    Current serial number in output stream: 12

    can probably be ignored, and Matlab will work.

    Another approach:

    The basic idea is that you need to have the X-server running on your home computer, such as X-Win32. You may need to buy this, although you might be able to download a trial version instead. Next, log onto linux.engr.ucsb.edu with Putty. With Putty, you need to choose Connection -> ssh, and Tunnels -> Enable X11 Forwarding. Run matlab by typing "matlab" at the linux prompt, or if that doesn't work, typing "/fs/eci.x*/bin/matlab".

    Putty

    download X-server X-Win32

    College of Engineering help

    Expect some tinkering to get everything set up properly.

    Reality check

    The easiest way to run Matlab is to just use the computers in the CadLab or other computer lab on campus. Even if you get your home computer set up properly, you'll probably find that everything is slow.