Re: Leopard X11
Re: Leopard X11
- Subject: Re: Leopard X11
- From: Jeremy Huddleston <email@hidden>
- Date: Sun, 3 Feb 2008 15:06:22 -0800
On Feb 3, 2008, at 14:55, Jeshua Lacock wrote:
I have read that there is not a need to set the DISPLAY variable
with Leopard, but if its not set, the GRASS GUI will not display.
Are you sure it's not being set by the user overriding the launchd
setting? What error messages do you see in Console.app?
Before Leopard we used 'open-x11' which would return the variable
to use for DISPLAY.
Right, on Leopard, DISPLAY is set for you, so you shouldn't need to do
anything special. In fact, setting it to something else will cause
breakage.
The only thing that we have found to work is to manually set DISPLAY
to :0 which I admit is a hack.
Don't do this on Leopard! Your code should probably do something like
this pseudoC:
int canConnectToXServer() {
int retval=0;
Display *display;
display = XOpenDisplay(NULL)
if(display) {
XCloseDisplay(display);
retval=1;
}
return retval;
}
int main() {
...
if (! canConnectToXServer()) {
setenv("DISPLAY", Your-"open-x11"-Logic());
}
...
}
That works for our customer, except he wants to be able to use his
cinema display attached to his PowerBook for his main display. When
it is set to :0, he can only drag a small section of the GRASS GUI
into his secondary display. Setting DISPLAY to :1 displays this error:
Application initialization failed: couldn't connect to display ":1"
Error in startup script: couldn't connect to display ":1"
This last bug is fixed in the latest release here: http://xquartz.macosforge.org
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: | |
| >Leopard X11 (From: Jeshua Lacock <email@hidden>) |