From: Calin <buia@physics.unc.edu>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: Matlab 7.4 OSX
Message-ID: <ef53b75.2@webcrossing.raydaftYaTP>
Date: Mon, 25 Jun 2007 11:46:44 -0400
References: <ef53b75.-1@webcrossing.raydaftYaTP> <ef53b75.0@webcrossing.raydaftYaTP> <464DC028.3000301@mathworks.com>
Lines: 49
NNTP-Posting-Host: 152.2.6.30
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:415624


We didn't have a problem with 2007a on the dual G5 but we did have a
problem on the new dual quad Intel based mac. I used Brian's answer
to modify the matlab script such that when it performs the check for
remote user it automatically appends the -noawt option so that all
you have to do when you log in remotely is to type matlab in the
terminal. At the same time this doesn't change anything for the
console user. Here's how it's done:
1. Open (sudo pico) the file /Application/MATLAB74/bin/matlab
2. search for console_owner in the file, you’ll get to the following
part of the script:

if [ "$jvmflag" = "1" -a "`id -un`" !=
"`$MATLAB/bin/$ARCH/console_owner`" -a "`id -un`" != "root" ]; then
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        you=`id -un`
        owner=`$MATLAB/bin/$ARCH/console_owner`
        if [ "$debugger" = "" ]; then
            echo “some matlab warning about not being
                    allowed to use jvm”
            if [ "$nodisplay" = "0" ]; then
                arglist="$arglist -nodisplay"
            fi
        else
            echo “another matlab warning about not being 			
allowed to use jvm”
        fi
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  fi

3. remove

    "$jvmflag" = "1" –a

from the first line and

    if [ "$nodisplay" = "0" ]; then
       arglist="$arglist -nodisplay"
    fi

from inside the second if statement. Then add the line:

   arglist="$arglist -noawt"

after the line

   owner=…

but before the start of the if statement. Save changes. Now you
should be able to run matlab remotely by just typing matlab.