| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Nov 18, 2007, at 2:31 PM, Nathaniel Gray wrote: On Nov 18, 2007 9:32 AM, Ben Byer <email@hidden> wrote:Andrew's analysis is correct -- From now on, you should think of$DISPLAY as indicating a *capability*, and not as a way of "triggeringother random behavior".Ambrose's response is also noted, but I'm going to stand up for myselfand say that it was not "overlooked". Rather, we came up with what wethought was a more correct use of $DISPLAY, and so we implementedaccording to that belief, fully knowing it would break someassumptions that various scripts were making. It's the price ofprogress.I am more than happy to try to help anyone rewrite those scripts :) I've got some code (mostly working around the lack of accessibility info in In all seriousness, what end goal are you trying to accomplish? Why do you need to know if an X server is running, unless you then want to use it (by connecting to $DISPLAY)? I've seen some pretty wacky things around here, but usually they're hacks to try to brute-force your poor system into running whatever X server it can find on your system, and then try to guess the correct socket to use to connect to that server. Since that's no longer appropriate I need a replacement, and I really How about this? # If no display has been specified, deduce local display number from X11 process. if [ "$DISPLAY" = "" ]; then export DISPLAY = `ps auxww | grep $USER | egrep '(Xauthority|/Applications/Utilities/X11.app/Contents/MacOS/X11 .*:[0-9]+$)' | grep -v grep | sed 's/^.*\(:[0-9][0-9]*\)$/\1/'` fi (If you know where that code came from, you get a cookie!) -- Ben Byer CoreOS / BSD Technology Group, XDarwin maintainer |
_______________________________________________ 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
| References: | |
| >Re: Explanation of X implementations (From: John Bassett <email@hidden>) | |
| >Re: Explanation of X implementations (From: Ben Byer <email@hidden>) | |
| >Re: Explanation of X implementations (From: "Ambrose Li" <email@hidden>) | |
| >The meaning(s) of $DISPLAY (was Re: Explanation of X implementations) (From: Eric Gouriou <email@hidden>) | |
| >Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations) (From: "Ambrose Li" <email@hidden>) | |
| >Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations) (From: "Andrew J. Hesford" <email@hidden>) | |
| >Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations) (From: "Ambrose Li" <email@hidden>) | |
| >Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations) (From: Ben Byer <email@hidden>) | |
| >Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations) (From: "Nathaniel Gray" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.