Crystallography on OS X
-

The OS X version 10.3 and 10.4 installer CDs each gives you the (non-default) option of installing Apple's Xwindows. Otherwise, you will need to manually install an X-windows system. There are several options, both free and commercial. Probably the easiest option is to install Apple's version of X11, and it has the added advantage of having Quartz acceleration, which means that high-demand molecular graphics display programs like coot will behave better. Here's how to install Apple's X-windows and have it function as transparently as is if it were simply part of the operating system.



Return to Crystallography on OS X


Making OS X a viable Unix Platform

Installing X Windows

Installing Developer Tools

Installing Fink

OS X Unix Links

OS X Unix Advice Board


Crystallography Programs

Use Fink to Install Crystal Software

Installing CCP4

Installing CNS-1.2

Installing Solve

Installing Data Processing Software

Installing Eden

Installing Molecular Display Packages


Other Links of Interest

Various Useful OS X Programs

Backups

Screenshots

Biophysics on OS X

NMR on OS X

W. G. Scott Research Group


Return to Crystallography on OS X






Click here for web site index


Summary of my recommended installation:


1.  Install Apple's X-windows programs. To do so, you must do BOTH of the following:

a.  Install Apple's X11.app.  This comes as a non-default component on the OS X installation DVD or CD, so you have to do a "custom install." If you bought a new Mac, such as a new Intel-iMac, put in the first install DVD and find the optional packages installer, open it, check the X11 box, and install from that. If you didn't do this and can't locate it, you can grab the backup copies I made for my PPC X11.app components (look to the right column). The startup utility (the double-clickable X icon) now winds up in /Applications/Utilities  (Discard any old ones in /Applications; they don't work.)

b. Install Apple's X11 SDK.  On 10.4, this gets installed by default when you install the Xcode developer tools.  On 10.3, it does not get installed by default, so if you didn't remember to do it, grab the download from the column on the right.  On 10.2, you have to install everything by default.  These put header files in /usr/X11R6/include that you will need to compile X11 programs.  If fink doesn't find these, it goes nuts.


PLEASE NOTE:  Sometimes Apple's X11SDK and X11 installers mess up and don't install everything.  This will wreak havoc on your attempts to get fink to recognize X11.app.  To avoid this pain, download Gary Kerbaugh's pkgdiff script and run it according to the description linked here.


2.  Set the $DISPLAY variable


a.  Add the shell script commands appropriate for your default unix shell:

You can set the DISPLAY environment variable to let you run X-windows applications from your non-X terminal windows by putting commands in your login file file (eg: ~/.cshrc for tcsh; or ~/.bash_profile and ~/.bashrc for bash; or ~/.zshrc for zsh. The following table has links to examples for each of these files. The commands are written to handle the case of multiple simultaneous X11.app users which occurs when Fast User Switching is enabled.


Examples of Startup Files Read by Unix Shells
Shell User files Comments
bash .bash_profile or .bashrc only one or the other is read
ksh .profile or .kshrc .kshrc is always read
tcsh .login and .cshrc .cshrc is always read
zsh .zlogin and .zshrc and .zshenv .zshenv is always read; .zshrc almost always read


(The example files linked in the table also have code to set the title bar and iTerm tab labels.)

or


b.  Use my automated customization program:

You might instead want to try a cheesy little program I wrote called Xterminator to assist you in configuring X11.app the way you want it, including setting up the $DISPLAY variable for each of the shells.








Downloads (ppc only!):

X11.app and SDK for 10.4

X11 for 10.3
SDK for 10.3

X11 for 10.2



Downloads (universal):

Original X11.app and SDK for 10.4-intel

Please install the above and then run Software Update to get the latest version (1.1.3) that does stereo.

Links:

Xterminator

pkgdiff


In addition...



You can use my automated customization program Xterminator to do any or all of the following automatically.


 I also changed three default settings:

defaults write com.apple.x11 wm_ffm true
defaults write com.apple.x11 wm_click_through -bool true

defaults write com.apple.x11 no_quit_alert true

The first two of these get rid of the annoying, non-canonical click-to-focus property, and the third gets rid of a warning window that pops up and prevents you from logging out if X11 is running.

The new version 1.1.2 introduces stereo. Use Software Update to get it, and then issue the command

defaults write com.apple.x11 enable_stereo -bool true


You can also issue the commands
man Xquartz; man quartz-wm   for more information and other possibilities.

I tell OS X to start the X11.app when I log in by adding X11.app to my startup items in my Accounts System Preferences.  I run all my x-windows programs by invoking them from the terminal in the standard unix way. Therefore I have no need for the X icon in the Dock or the menu bar.

Here's how I got rid of the dock icon (it also removes the menu bar):

a. Edit the Info.plist file in /Applications/Utilities/X11.app/Contents

b. Put in the lines just above the penultimate line that reads </dict>:


 <key>LSUIElement</key>
 <string>1</string>
 

c. Save the changes. Then issue the following (1 line) command:

/System/Library/Frameworks/ApplicationServices.framework/Versions/A\ /Frameworks/LaunchServices.framework/Versions/A/Support/lsregister \ -f /Applications/Utilities/X11.app

d. Enjoy the illusion of a fully integrated X11 display.


One bug I ran into in the beta days was being unable to get X11.app to start in any user account other than the one used to install it.  I posted a bug fix here, but this is supposedly fixed in the 0.3 release and the 1.0 release.  


Why do you need to install X-windows?

In order to do anything scientifically useful, you will have to install X-windows on your Mac.  You are probably used to Linux, SGI, etc, all of whose interfaces are X-windows based, so there is nothing to think about. However the Mac doesn't use this by default, so we have to install it.  (Why they have you install support for 10 Languages, including Japanese, by default, but can't give you the option of installing this, is beyond my comprehension.  But I digress...)  The Mac Aqua interface essentially "replaces" the X-windows based interface on conventional unix machines, but it lacks the functionality required by all of the unix programs that are x-windows based.  In addition, these programs expect you to have it by default, as well as all the libraries and stuff that comes with them.  Hence you will have to install this even if you never compile anything but just import binaries from someone else.  That is why I recommend that this be the very first thing you do.



a.  Compile from source code
b.  Additional documentation and FAQ




Click here for web site indexValid HTML 4.01!