Leopard makes things easy. You do have to make sure X11 is installed, and it is still an optional install to be found on the installation dvd, but that is pretty much it. Now, anytime you use an application that needs X11, X11 should start automagically. Therefor, you do not need an X11 shortcut on your dock, and in fact, should not put one there. For reasons that are not entirely clear to me (iow, it's buggy), it is better to start X11 by starting an X11 dependent application, then by starting X11 directly. If you have Leopard, the only information below
X is the graphic interface which underlies nearly all the graphics displayed by a Unix machine. Unlike the graphics interfaces of Windows and Macintosh systems, X is "net-native" -- it was designed from the beginning with the idea of being able to display the graphical output of an application on a different computer.
To use Remote XWindows Applications using OS X, you must install X11 on your mac. X11 is apples x server. X11 is found on the OS X installation cd (or dvd), but it is not installed by default. Look for the optional installs.
Once you have installed X11, if you would like to use opensource packages (such as xemacs), I recommend installing fink as well. Note, you have to have root enabled on your machine to do this, instructions for doing this are on the Apple web site. The best place to learn about X11 and fink is at this web site. Installing fink is fairly easy, but I would skip the "sudo dselect" command, and go directly to installing packages using fink. Also, be sure you make the necessary changes to (or create with this line in it) .bash_profile, ie. adding the line 'source /sw/bin/init.sh'. The fink/X11 info web site. has more info about this as well. If you type the command "fink list" you will see a list of packages, and which ones you already have will have an i by them.
Once you have all of your packages, you may want to customize a bit. In a text editor, open the file /usr/X11R6/lib/X11/xinit/xinitrc. Copy this file into your home directory as .xinitrc. Make sure there is the source line at the beginning of it (same line as in the .bash_profile file 'source /sw/bin/init.sh'). At the end of this file, there is a section that looks like this (if you have installed X11):
# start some nice programs xterm & # start the window manager exec quartz-wm
When you click on the x in the Applications/Utilities folder, x11 should start up with an xterm.
I find the terminal that comes installed on OS X (Applications/Utilities/Terminal) much preferable to the xterm with X11. It has civilized things like scroll bars and the ability to cut and paste to/from using mac shortcuts. To be able to start X aps from the terminal add these lines to your .bashrc:
# enable using X aps with terminal
if [ ${#DISPLAY} -eq 0 ]; then
export DISPLAY=':0.0'
fi
If you are a linux newbie the easiest way to do this is to open the terminal and type: pico ~/.bashrc You are now in an editor, and can cut and paste the above code into your .bashrc. Close this terminal, and when you open a new one, as long as X11 is running you can start X aps from the terminal.
To install matlab on the mac in OS X, go here. You will need to use your UW login, and contact the Shadlen lab system administrator to get the license file.
By far the most advanced X Server for MacOS 9 is MacX, written by Apple Computer itself. Unfortunately, Apple no longer sells or supports MacX, but we do have licensed versions available in the lab for you to use.
To use MacX, just start it by double-clicking on the MacX application icon. Open a secure shell connection to the computer on which you want to run X applications and tell it where to send X output by setting the DISPLAY environment variable to indicate the IP address of your Macintosh. For example, if you were sitting at the Macintosh with IP address 10.208.108.80, you would type
DISPLAY=10.208.108.80:0.0 export DISPLAY@@
in the bash shell. For your own Macintosh, replace the example IP address above with your own (and keep in mind that your Macintosh's IP address can change when rebooted if it uses DHCP). After the DISPLAY variable is defined, you can start X applications as you normally would from the command line. We have prepared a screen shot illustrating the resulting behavior.