Am 25.12.2010 um 21:19 schrieb Jeremy Huddleston:

I think I started to set DISPLAY because Terminal's shell has no knowledge of it. So I can't launch an X client off it. In the beginning I used

        if (! $?DISPLAY) then ...

as usual. With Tiger some change came so that DISPLAY was then set initially via ~/.MacOSX/environment.plist

I do not believe Apple has ever released software that has set DISPLAY in ~/.MacOSX/environment.plist. On Tiger, DISPLAY is simply not set except in child processes of X11.app (hence why we solved that by using launchd in Leopard).

This was the unsatisfactory default situation. So I developed this scheme, taking into account a multi-user environment.


This stopped working at some time. Of course when I want to launch an X client I don't want to switch to Finder, make it open a new window I would have to close later,

You don't have to... why do you think you would?

Because clicking is the Apple way?


then find my way through the file system hierarchy to the directory with the X clients and then search among them some time for the one I want to launch.

I have no idea how you got here in your thought process.

How would I else be able to double-click on the X client I wish to launch?


And I also don't want to search in the Finder window for my favourite X clients place

I hardly ever use Finder.  How did Finder come up?

Because it seems to be the standard tool to find the file for double- clicking.


Why is the DISPLAY variable not communicated among all processes running at the moment and launched afterwards, after DISPLAY's first setting or its possible change?

It is by default.  You are overwriting it in .login.

I think I had noticed that this initial setting did not happen... But I'll try again on next login, hopefully next year.


I made some tests. I made sure that no *sh RC file sets DISPLAY. I also removed DISPLAY from the environment of Terminal. With ps I could see that some processes had set DISPLAY=:0, but most had DISPLAY=/tmp/ launch-OtsB9G/org.x:0. This value is also set in a new Terminal window.

When I launch for example FontForge from the first Terminal window (no DISPLAY set) or when I launch X11 by double clicking on the X11 icon in Dock I can see with pstree that launchd is the process which initiates the X11 session, like here:

        -+= 00001 root /sbin/launchd
         \-+- 74710 pete /bin/sh /opt/local/bin/startx
\-+- 74746 pete xinit /opt/local/lib/X11/xinit/xinitrc -- /opt/ local/bin/X :0 -dpi 96 -auth /Users/pete/.serverauth.74710
             \-+= 74824 pete /opt/local/bin/quartz-wm
\-+- 74881 pete /usr/local/bin/emacs-23.2 -geometry 96x56+25+125 -T 23.2 --debug-init
                 \-+= 74909 pete -bin/tcsh -i
                   \-+= 75137 pete pstree -w -p 74909
                     \--- 75138 root ps -axwwo user

Starting with quarz-wm (blackbox keeps crashing with xorg-server 1.9.2.901, 1.9.3, and some more) DISPLAY has become :0. This is also reported by env in GNU Emacs *shell* buffer.

How can I launch X clients without launchd?

From the first Terminal (no DISPLAY set) I cannot launch xrmap – no DISPLAY. When I launch it from inside GNU Emacs it works. When I launch it from the second Terminal (with DISPLAY=/tmp/launch-OtsB9G/ org.x:0) a second X server (XQuartz 2.5.3 (xorg-server 1.8.2)) launches. It creates my usual X desktop (because I have ~/.xinitrc.d/ 50-clients.sh). In its GNU Emacs's *shell* buffer DISPLAY is set to : 1. Presumingly the behaviour I see now can be different after my next login...


The change in access to X11 I reported initially was not caused by launching a second X server. It happened just so.

--
Greetings

  Pete                                           0
                                           %-/\_//
                                            (*)(*)


_______________________________________________
Xquartz-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev

Reply via email to