OK, so X11 is not included in Mountain Lion anymore. That's OK, no biggie. Everyone everywhere says to go get the XQuartz packages for X11.
I'm a developer, though, and have a ton of software managed through MacPorts. I would like to install the xorg-server package, rather than the XQuartz package, so that I get all the package management benefits (updates, configuration management, one place with extra software installed, etc...)
The problem is, on OS X 10.7 and below, it used to be that a launchd agent would intercept requests for the X11 display and launch X11 on OS X. To replace the auto-launched X11, one would unload the Apple X11 plist and load the MacPorts X11 plist, which would change who gets to set the $DISPLAY variable and which X11 daemon is launched.
It looks like this is the case for how X11 is launched from the xorg-server package still. Theoretically, any attempts to connect to X11 or dbus will cause launchctl to start the MacPorts X11 daemon.
This part is fine, see:
echo $DISPLAY
/tmp/launch-K8CDIi/org.macports:0
However, the old launch agent plist from Apple that would launch their X11 does not appear to be there anymore: a dialog pops up to get you to install XQuartz, and that dialog is intercepting launches of X11 apps. I can't figure out how to replace the freaking "do you want to install XQuartz" messages, since they don't seem to be controlled by a launch daemon. I have a fine installation of X11 waiting to be used, but there's some interception of the request for the DISPLAY that is not happening with launchd anymore. How in the world do I tell Mountain Lion it's a bad kitty and should stop asking me to install something that I've already installed?