Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations)
Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations)
- Subject: Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations)
- From: Martin Costabel <email@hidden>
- Date: Mon, 19 Nov 2007 08:36:59 +0100
Ben Byer wrote:
[]
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!)
Smells of matlab.
--
Martin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden