Comment 5 for bug 433281

Revision history for this message
su_v (suv-lp) wrote :

How do you start X11 at login time? Do you use a special shell script (~/.xinitrc.d/*) where you set $DISPLAY at login time?
You should not set $DISPLAY manually at all with Apple's X11 - otherwise you break the launch-on-demand support by 'launchd'.

 5- launchd support for X11
(Thanks to Ben Byer)

"New launch-on-demand support, courtesy of launchd. If you start a program that tries to open your X $DISPLAY, launchd will check to see if X11.app is running. If not, it will automatically start it for you.

The only situation where you should need to manually start X11.app is if you are only running remote X11 applications. So on Leopard, just run a command like xterm or start an application that needs X11, and X11 will start up automatically".

"In brief, don't run X11.app from the Dock. Or, at all, manually. Ensure that you are not explicitly setting $DISPLAY in any configuration files, verify that 'echo $DISPLAY' in Terminal.app reports something that starts with '/tmp/launchd', and then just run 'xterm &' from Terminal. This will work with any X11 client application that links with the standard libX11.dylib."
<http://forums.macosxhints.com/showthread.php?t=80171>