Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: 2.1.1 and xterm
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2.1.1 and xterm



John,

My apologies if I'm still not understanding your questions.

What the /tmp/launch-xxxx/:0 format is pointing at is a unix socket which launchd is watching (do an ls on that file and you'll see that it is a socket; with lsof you can see that launchd is listening on it; and if you look at the launchd agent org.x.X11.plist, you will see that when that socket is touched, X11.app is launched). If you leave it as such, then the system (in this case launchd) will noticed that something has touched the socket (in this case, your command trying to connect to the Xserver) and will start the Xserver for you if it is not already running. If you change DISPLAY to be :0 then you'd see the all too familiar, unable to connect to display, message, unless you manually started the Xserver ahead of time.

It is one of those things that until you actually try it, it is hard to understand why it is any better. But I found it to be an enormous time saver as I don't have to remember to manually start X11, etc. I just fire up Terminal and start using it and the system just does the right thing and if necessary starts the Xserver for me.

As you point out, if the change is painful, you can still use the old way of manually starting up everything ahead of time.

In my opinion, this is one of those interoperability things that makes a hugh stride forward for X11 apps being first-class citizens on the Mac. Yes, it takes a bit to get used to, but once you have, I at least don't want to go back (it is painful to go back to Tiger at work where I have to remember to start X11.app before starting up for the day).

Also, I notice you talk about using xterm. I tend to use Terminal which runs without X11 being run. For the way I work, I have always found xterm to be a hindrance so I use Terminal instead. This may be some of the wide differences of opinion with the automagic launching capability of X11 (if you use xterm, then there are few if any advantages to the new way of using X11, but it is a huge advantage for those of us that use Terminal).

The current way X11.app is setup, both situations are supported, so we both get our cakes.

Merle



On Dec 15, 2007, at 6:48 PM, John Koren wrote:

Thanks, Merle. It's either I do not understand your answer or I was not clear in my question.

What I was trying to ask is why the DISPLAY variable value that launchd assigns needs to be so obscurely complicated ( e.g. /tmp/ launch-0l2xbx/:0) when setting it to standard ':0' seems to work as well.

After X11 starts, I can execute in xterm 'setenv DISPLAY :0' (csh) and pop new X windows as well as with the '/tmp/launch-0l2xbx/:0' that launchd assigned. Hence what do we gain from the '/tmp/ launch-0l2xbx' prefix?

-John

On Dec 15, 2007 3:24 PM, Merle Reinhart <email@hidden> wrote:
The advantage is that it eliminates the extra manual step of having
to start the X11 server prior to executing a command or app that uses
X11 for its display.

Merle


On Dec 15, 2007, at 5:59 PM, John Koren wrote:

> I also wanted to ask, what is the benefit of the obscure DISPLAY
> variables such as 'DISPLAY=/tmp/launch-0l2xbx/:0' that the new
> 'lauchd' sets? When I reset the DISPLAY to a simple ':0' it still
> seems to work perfectly. I am just curious.
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> X11-users mailing list      ( email@hidden)
> Help/Unsubscribe/Update your Subscription: http://lists.apple.com/
> mailman/options/x11-users/email@hidden
>
> This email sent to email@hidden



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      (email@hidden)

This email sent to email@hidden

References: 
 >Re: 2.1.1 and xterm (From: "John Koren" <email@hidden>)
 >Re: 2.1.1 and xterm (From: Merle Reinhart <email@hidden>)
 >Re: 2.1.1 and xterm (From: "John Koren" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.