> On Apr 13, 2015, at 12:09, JF Mezei <[email protected]> wrote: > > On 15-04-06 19:06, Jeremy Huddleston Sequoia wrote: > >>> -When I login at command line, who sets the DISPLAY environment >>> variable to "/tmp/launch-rvfrHh/org.macosforge.xquartz:0" ? >> >> launchd. > > But launchd is only invoked when I login and it runs the LaunchAgent > org.macosforge.xquartz.startx.plist , correct ?
No, it doesn't run it on login. It runs it on demand (when someone connects to that socket). > The plist would hacve launchd do: > >> /opt/X11/lib/X11/xinit/launchd_startx /opt/X11/bin/startx -- >> /opt/X11/bin/Xquartz > > There is no man page for launchd_startx. Does launchd_startx simply > setup the /tmp file (which appears to be empty, is that normal?) That's not a file. It's a socket. It's created by launchd based on the laundh.plist. Yes, that's normal. > and > then arrange for DISPLAY environment variable to be set to point to it ? Again, that is launchd that sets the DISPLAY envvar. launchd_startx just captures stdout and stderr and redirects to ASL for logging purposes. It has no other function. See: http://cgit.freedesktop.org/xorg/app/xinit/tree/launchd/user_startx/launchd_startx.c > Or is there much more work done when I login ? > > When I start the XQuartz.app manually, does it do the same "stub" job as > calling xterm with DISPLAY pointing to that /tmp file , which triggers > the background work to get done ? Or does it actually start the X > server and also sends messages to get xinit to start ? If it is the owner of $DISPLAY, it will trigger the launchd start path and get the DISPLAY descriptor handed to it. If it is not the owner of $DISPLAY (because the agent is not loaded or another agent owns $DISPLAY), then it will just start directly, using just the traditional UNIX socket. >> launchd spawns startx which execs xinit which forks and execs >> /opt/X11/bin/Xquartz and xinitrc. xinitrc execs quartz-wm, and Xquartz >> checks in launchd to get the socket's fd. > > Thanks. I will have to go through the man pages, and maybe try to start > those manually with any logging options they may have. > > > > As an aside: > > the printing add-on "foomatic" which uses Ghostscript to generate raster > files to send to various printers (like dot matrix) expects files to be > in /usr/X11 which no longer exists, since you moved everything to > /opt/X11. Adding a soft link from /usr/X11 to /opt/X11 solved the problem. That should be done as part of the installation process. The post-install script does: [[ -e /usr/X11 ]] || ln -s /opt/X11 /usr/X11 [[ -e /usr/X11R6 ]] || ln -s /opt/X11 /usr/X11R6
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. X11-users mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com This email sent to [email protected]
