Re: Leopard X11
Re: Leopard X11
- Subject: Re: Leopard X11
- From: Jeshua Lacock <email@hidden>
- Date: Sun, 3 Feb 2008 17:38:39 -0700
On Feb 3, 2008, at 4:06 PM, Jeremy Huddleston wrote:
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.
Hi Jeremy,
I just figured out that I only needed to "export" the DISPLAY
variable that is indeed already set.
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());
}
...
}
Thanks for the code, I will keep it in case I ever need it.
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 ____
Great! Thanks for your help, I am very grateful!
Jeshua Lacock, Owner
<http://OpenOSX.com>
phone: 877.240.1364
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden