On Oct 2, 2009, at 08:53, Martin Otte wrote:
I compiled the latest 1.4 servers on snow leopard since they contain some fixes over the apple installed server. The server starts fine by either double-clicking it or by executing an application that uses the X server.
The only thing that doesn't work (in the apple48 and apple49 servers) is that the app listed in the app_to_run no longer runs. I have app_to_run set as an xterm so that I have a terminal when the server starts. In bundle-main.c:
if(argc == 1 || (argc == 2 && !strncmp(argv[1], "-psn_", 5))) { /* Now, try to open a display, if so, run the launcher */ display = XOpenDisplay(NULL); if(display) { /* Could open the display, start the launcher */ XCloseDisplay(display);
return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT)); } }
The XOpenDisplay call is returning a null display,
If that's the case, then DISPLAY is not set to a value it expects. What happens when you just execute (from Terminal)? /Applications/Utilities/X11.app/Contents/MacOS/X11.bin There should be output that mentions why it's not working. Do you have 2.4.1_alpha1 installed on your system? If so, that would be why X11.app isn't using that path. XQuartz.app owns DISPLAY when both are installed.
so the app_to_run is never run. Is this the only place where the app_to_run is executed from?
The behavior is to only execute app_to_run if you're starting X11.app by double clicking and it owns the launchd socket...
I don't know if this works with the latest 1.5 server because I haven't upgraded the necessary X11 protos to compile the server.
It's working here on 1.4 through master... I'd recommend keeping /usr/X11 the way it's shipped from Apple unless you want to get possibly clobbered. That's why we're using /opt/X11 for the MacOSForge.org releases.