Table of Contents

X11 Setup

A few setup notes for Apple's X11

Startup

For Panther and Tiger

Add X11 as a startup item to your account preferences. It takes minimal memory and processor when idle, so there's no harm leaving it running. Another option would be to create an AppleScript to start X11 and Terminal together.

For Leopard

DO NOT do this for Leopard. Leopard start X11 itself when needed, and if you start it manually you will get multiple copies of X11 running. Also, do not put X11 in your Dock in Leopard, as you will get another when it starts.

xterm

As installed, Apple's X11 starts up an xterm when X11 is started. I prefer the Mac OS X Terminal, so this is annoying.

For Panther and Tiger

Edit /etc/X11/xinit/xinitrc. Add a # to the beginning of the line xterm & (or delete it if you like).

For Leopard

This is annoying. There is a place you can remove the xterm startup, but then X11 won't start. So you must replace it with something else. xlsclients is reported to be safe and doesn't take unnecessary resources. At least it's much easier to change – type this in a Terminal:

defaults write org.x.X11_launcher app_to_run /usr/X11/bin/xlsclients

DISPLAY

I've found info saying that DISPLAY should never be set in login scripts. This is because in a multi-user environment, you never know who gets which display number. And there's no need anyways, the X11 startup takes care of this – DISPLAY is set automatically. Well, that's what they say – it doesn't seem to work in Panther or Tiger (it does in an xterm). It does work in Leopard.

For Panther and Tiger

Normally, you won't need to worry about it – software should be configured to set DISPLAY if needed (the GRASS OS X app startup does, though the unix startup does not). If necessary, add the following to your .bash_profile:

export DISPLAY=:0.0

For Leopard

Do NOT set DISPLAY ever. If you have updated to leopard, check your .bash_profile and remove any DISPLA settings.

PATH

For Panther and Tiger

Also, on Panther and Tiger, X11's program folder is not in the shell PATH by default, so you must add it. Add this to your .bash_profile:

export PATH="$PATH:/usr/X11R6/bin"

Normally you want to add custom paths to the front of the list, but it doesn't matter for X11.

For Leopard

Don't add anything for Leopard, X11 is in the default PATH.