Launch X11 via launchd?
Launch X11 via launchd?
- Subject: Launch X11 via launchd?
- From: Jack Repenning <email@hidden>
- Date: Mon, 2 Aug 2010 12:34:47 -0700
How can I arrange to start the X11 server automatically whenever I start any (local) X11 client program?
I believe I'm starting from a stock as-shipped Snow Leopard configuration, but possibly I might have diddled with all this back in the Leopard days (when the behavior I now want was briefly the default). At any rate, I do have:
> launchctl list org.x.startx
{
"Label" = "org.x.startx";
"LimitLoadToSessionType" = "Aqua";
"OnDemand" = true;
"LastExitStatus" = 0;
"TimeOut" = 30;
"ProgramArguments" = (
"/usr/X11/bin/startx";
);
"EnableTransactions" = true;
"TransactionCount" = -1;
"Sockets" = {
"org.x:0" = (
file-descriptor-object;
);
};
};
... and when my X server starts (from Dock), one of the bits logged is:
8/2/10 11:55:30 AM [0x0-0x159159].org.x.X11[12894] X.Org X Server 1.4.2-apple53
The full start-up blather from a successful Dock launch is:
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] stty: stdin isn't a terminal
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] X11.app: DISPLAY does not look like a launchd set variable, unsetting.
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] X11.app: main(): argc=2
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11.bin
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] argv[1] = -psn_0_1450338
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] Waiting for startup parameters via Mach IPC.
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] X11.app: Could not connect to server (DISPLAY is not set). Starting X server.
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] X11.app: Launching /usr/X11/bin/startx:
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] argv[0] = /bin/sh
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] argv[1] = -c
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] argv[2] = /usr/X11/bin/startx
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] font_cache: Scanning user font directories to generate X11 font caches
8/2/10 12:14:57 PM org.x.privileged_startx[14026] font_cache: Scanning system font directories to generate X11 font caches
8/2/10 12:14:57 PM [0x0-0x162162].org.x.X11[13806] font_cache: Updating FC cache
8/2/10 12:14:57 PM org.x.privileged_startx[14026] font_cache: Updating FC cache
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] xauth: creating new authority file /Users/jrepenning/.serverauth.14019
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] launch_msg("CheckIn") IPC failure: Operation not permitted
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] X11.app: No launchd socket handed off, unsetting DISPLAY
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] X11.app: do_start_x11_server(): argc=4
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] argv[0] = /usr/X11/bin/X
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] argv[1] = :0
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] argv[2] = -auth
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] argv[3] = /Users/jrepenning/.serverauth.14019
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] Xquartz starting:
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] X.Org X Server 1.4.2-apple53
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] Build Date: 20100211
8/2/10 12:14:58 PM Firewall[86] X11.bin is listening from :::6000 proto=6
8/2/10 12:14:58 PM Firewall[86] X11.bin is listening from 0.0.0.0:6000 proto=6
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] (EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base
8/2/10 12:14:58 PM [0x0-0x162162].org.x.X11[13806] (EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base
8/2/10 12:14:59 PM [0x0-0x162162].org.x.X11[13806] font_cache: Done
8/2/10 12:14:59 PM org.x.privileged_startx[14026] font_cache: Done _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden