( http://mathforum.org/epigone/comp.soft-sys.matlab/phausalquong/eec05b6.5@WebX.raydaftYaTP)

Re: OS X Installation & Apple X11 by NOSPAM


Here is an ordered (step-by-step), complete set (I hope) of
instructions that I believe captures what worked for me
(though I have not tried repeating the installation from these):

(NOTE FROM BRUCE: you can use the CD to get license file & install
until it fails at OroborosX.  Then go to step 3. (complete installation)
and run /Volume/MathWorks*/install for each of the 3 CDs from an X11 window
then download/install the Jaguar patch
ftp://ftp.mathworks.com/pub/tech-support/solutions/s33053/MathWorks_Jaguar_Updater.dmg
then edit the text of /Applications/MATLAB6p5/bin/LaunchMatlab.app/Contents//launch_matlab.sh
then copy the LaunchMatlab icon onto the dock!)


OVERALL OBJECTIVE: Install Matlab on an OS 10.2 ("Jaguar") system
with Apple X11 instead of the XDarwin implementation of X11 (which
normally is installed by the Mathworks installer). Apple X11
reportedly is faster than XDarwin, and may be the version of X11
currently installed on your sytem.
PROCEDURE: Perform the steps below.


1. OBJECTIVE: Set up an Administrator account.
    This is not an ordinary User account with admin priviledges,
    but a full "root" admin account
    PROCEDURE: Boot from the OS X installation CD
    and use the Reset Password option on the Installer Menu to
establish
     a "root" logon ID and associated password .
    PURPOSE: The MATLAB installer expects only a "root" administrator
to perform the installation, so you need to enable a root account
to start the installation.
    COMMENT: If Mathworks wants to restrict installations to
"administrator" , the same thing could be accomplished (with less
inconvenience to the user) by prompting for an admin password as the
installer begins.


2. OBJECTIVE: Install a Matlab Directory that contains a valid
License File in the the correct place.
     PROCEDURE:
	a. Logon as root, and put your License File on the Desktop
	b. Launch the "Install_for_Mac_OS_X" procedure from the Unix CD 1
of 3 that comes with Matlab.
	c. Allow the installer to choose where to install the Application
Directory, and what to call it (such as " /Applications/MATLAB6p5").
	d. Let the installer find the License File on your Desktop and
install it in the "etc" Directory.
	e. Stop the installation before the Installer installs XDarwin.
     COMMENT: You shouldn't really need to use the Installer to set
up the application Directory and License File. But I think this is
an idiot-proof way of getting off to a good start. Now, why is a
"License File" necessary to achieve system security? Why not a
simple password as in the Windows version?


3. OBJECTIVE: Complete the basic Matlab installation, bypassing the
XDarwin installation
     PROCEDURE:
	a. Open an Apple X11 Shell window
  b. Insert the Unix "CD 1 of 3" in a CD drive
            c. Run the Matlab Install script from the X11 Command
Line by typing the full path to the installer script on the
Installation CD. This should be something like:
"/Volumes/MathWorks_R13_1/install". If you need to install separate
Toolbox modules, you may need to quit X11 (before you can switch
CDs), load the second or third CD, and perform the same procedure for
that CD. In each case, you must specify "/Applications/MATLAB6p5"
(or whatever) as the installed file destination.
     PURPOSE: to bypass the installation of XDarwin that is part of
the standard "Install_for_Mac_OS_X" routine.
   
4. OBJECTIVE: Update Matlab to run on Jaguar (OS 10.2)
   PURPOSE: Mathworks designed their software for Mac OS 10.1, not
10.2. Without the update, Matlab probably won't run at all under
10.2.
   PROCEDURE: Download the Jaguar patch rom the Mathworks web site
and install it.


5. OBJECTIVE: Modify the "LaunchMATLAB" script to work in your
environment.
    PURPOSE: To make the "Launch" script invoke Apple X11 instead of
XDarwin/Orobor when it launches Matlab. You may be able to launch
Matlab entirely through the command line. But the script conveniently
launches the License server, then the Matlab application, in the
right order wthout any typing.
   PROCEDURE:
	a. Log out as root, log back in as a user (reason: you may not be
able to modify the Launch script with a text editor as root.)
	b. find the "LaunchMATLAB" icon in "/Applications/MATLAB6p5/bin"
(or wherever). Go to the folder containing that icon, and
right-click once on it to "Show package contents" (this assumes you
have a 2-button mouse; if you don't, you'll have to figure out how to
do this).
	c. find the file "launch_matlab.sh" script in the "Contents" folder.
 You may need to modify its permissions to allow yourself to edit it.
 Make a backup copy of it. Then open the original in a text editor
(such as BBEdit) and replace the contents with the following 26 lines
(through "..sleeptime"):
#!/bin/sh
# $Revision: 1.1 $
# Copyright 1997-2002 The MathWorks, Inc.


#modification to work with Apple's X11
# 1/7/03 John Iversen (iversen@nsi.edu)


if [ "`ps xc | grep X11`" ]; then
# Bounce less if X11 for OS X is already started
# (starts up much faster than oroborosx)
       sleeptime=10
       echo LaunchMatlab: Using previously started X11 for OS X
else
       sleeptime=15
       echo LaunchMatlab: Starting X11 for OS X
fi


open /Applications/X11.app


cd ../..


bin/mac/setsid bin/matlab -desktop -display :0.0 &


# Bounce to let user know MATLAB is starting up.
/bin/sleep $sleeptime


# Bounce to let user know MATLAB is starting up.
/bin/sleep $sleeptime


6. STOP. At this point, you should be able to launch Matlab by
double-clicking on the "LaunchMATLAB" icon. If you like, you can
perform another set of steps to consolidate all the application files
into a single package concealed by the "LaunchMATLAB" icon. Those
steps are documented elsewhere (on MacOSXhints" or the Matlab
Newsgroup, I think.)
    COMMENT: The above steps are easier than they may look. If you
follow the instructions precisely, installation should procede pretty
quickly. Still, for me, this was the most convoluted installation
procedure I have ever experienced.
Other users have complained about the Matab OS X Installer. It
should support Apple X11 (or give the user a choice), it should not
require a root login, and I don't see why it should require an
external License File (instead of a simple passcode, as in the
Windows version). Finally, the installer should install Matlab as an
application "package" (concealed under a single double-clickable
icon).