New website done!

Juan Manuel Palacios jmpp at macports.org
Mon Nov 26 07:35:41 PST 2007


On Nov 26, 2007, at 8:03 AM, William Davis wrote:

>
> On Nov 26, 2007, at 6:45 AM, Vincent Lefevre wrote:
>
>> On 2007-11-23 17:32:01 -0400, Juan Manuel Palacios wrote:
>>> 	In any case, I've been playing with X11 on Leopard lately but  
>>> haven't
>>> been able to experience this functionality, if I unset the DISPLAY
>>> variable I simply can't open X11 programs from Terminal.app
>>
>> AFAIK, unsetting DISPLAY is an error if you want to use X clients,
>> even Apple ones.
>>
>>> (even Apple provided ones under /usr/X11/bin); no launchd magic
>>> happens and all I get are "can't find display" errors (even though I
>>> do have a / tmp/launch-QLJ9Yh/\:0 sockect).
>>
>> because DISPLAY is unset. DISPLAY needs to contain the name of the
>> socket in some form.
>>
>> -- 
>> Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/>
>> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/ 
>> >
>> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS- 
>> Lyon)
>
>
> The system should set DISPLAY=/tmp/launch_bla_bla_bla . All you need  
> to do is
> remove any DISPLAY=0.0 lines in your ~/.profile and ~/.xinitrc.  You  
> might even try renaming
> ~/.xinitrc to ~/.xinitrc.old
> Do the above, quit X if it is running, then start some X app like  
> gedit.  X should start and then your app.
> If you check the env you should see that the system has set DISPLAY  
> for you.


	I was trying all this and knew what value I had to set DISPLAY to,  
but I was actually looking into the magic by which the env variable is  
"automagically set for you by the system" (i.e. not requiring you to  
set it by hand to the launchd based ":0" socket path). So I tried  
unsetting my custom value and nothing happened, nothing replaced it so  
opening X11 programs didn't trigger X11.app to spring up to life. The  
key step I was missing was opening a new, fresh shell with no  
~/.profile based setting of DISPLAY from the start; in that case the  
env variable was indeed set to the magic path and opening X11 programs  
did bring up X11.app automagically.

	I've added a very small text about this to install.php, omitting all  
the (I believe unnecessary) launchd details:

"For Tiger and earlier only, add an appropriate X11 DISPLAY  
environment variable to run X11 dependent programs, as Leopard takes  
care of this requirement on its own."

	Feel free to suggest better wording or even a different sentence  
altogether -- I was falling asleep when I wrote that and haven't  
gotten around to reviewing it ;-)

	Regards,...


-jmpp



More information about the macports-dev mailing list