Re: Finding my $DISPLAY programatically.
Re: Finding my $DISPLAY programatically.
- Subject: Re: Finding my $DISPLAY programatically.
- From: Jeremy Huddleston <email@hidden>
- Date: Fri, 2 May 2008 23:36:15 -0700
On May 2, 2008, at 17:57, Bill Janssen wrote:
#!/bin/sh
MYIP=`ifconfig -a | grep 'inet' | grep 'broadcast' | awk '{print
$2}'`
echo `echo $DISPLAY | sed -e "s;^.*:;${MYIP}:;"`
No, that just does the same exact thing as ${MYIP}:0 because the end
of the launchd $DISPLAY is always ':0'
Really? His original message said:
The problem with a hard coded DISPLAY is that if X11.app crashes it
often runs again with a different DISPLAY, it won't go back to 0:0
until a reboot, also if another user uses fast user switching and
runs
another X11.app it is not 0:0.
The launchd socket is always /tmp/launchd-XXXXXXXX/:0
The unix socket may be different.
I'm assuming he means "0.0". So, I guess we need to know what the
difference is -- I was just presuming that it was a different major
display number. So, when X11.app "runs again", what does it do?
It takes the next available X11 DISPLAY as determined by /tmp/.X##-
lock ... but the launchd socket basename is always :0
--Jeremy
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