Discussion:
setenv DISPLAY fix not working with X Widonws display problem...
(too old to reply)
c***@gmail.com
2012-12-19 21:30:28 UTC
Permalink
I am using Cygwin and attempt to run a basic plot function in IDL but get the error (which I have seen here is fairly common):
% PLOT: Unable to connect to X Windows display: :0.0
% PLOT: Unable to open X Windows display.
Is your DISPLAY environment variable set correctly?
% Execution halted at: $MAIN$

I have read that:
setenv display <your IP address>:0.0
^
should make it work, but for me it just produced a sytax error as shown above under the "i". What could be a solution?
David Fanning
2012-12-19 21:42:39 UTC
Permalink
Post by c***@gmail.com
% PLOT: Unable to connect to X Windows display: :0.0
% PLOT: Unable to open X Windows display.
Is your DISPLAY environment variable set correctly?
% Execution halted at: $MAIN$
setenv display <your IP address>:0.0
^
should make it work, but for me it just produced a sytax error as shown above under the "i". What could be a solution?
I'm afraid this is going to be case sensitive. You
may have to locate the CAP LOCKS key! ;-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
c***@gmail.com
2012-12-19 22:11:07 UTC
Permalink
And which part of that is case sensitive? I tried it as:

setenv DISPLAY <IP address>:0.0

but that still returned a syntax error at the "I" of DISPLAY...
Mats Löfdahl
2012-12-19 22:21:34 UTC
Permalink
Post by c***@gmail.com
setenv DISPLAY <IP address>:0.0
but that still returned a syntax error at the "I" of DISPLAY...
Ummm... You do realize you should do that at the shell prompt and not at the IDL prompt, right?
c***@gmail.com
2012-12-19 22:29:56 UTC
Permalink
Yes, and it still returns the same error when I run a simple plot. Is there some other syntax that I'm missing like a comma somewhere?
David Fanning
2012-12-19 22:34:29 UTC
Permalink
Post by c***@gmail.com
Yes, and it still returns the same error when I run a simple plot. Is there some other syntax that I'm missing like a comma somewhere?
You exited IDL, set your DISPLAY, then restarted IDL, right?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
c***@gmail.com
2012-12-19 22:49:55 UTC
Permalink
Yes. Is it likely that there was an error during downloading?
David Fanning
2012-12-19 22:55:27 UTC
Permalink
Post by c***@gmail.com
Yes. Is it likely that there was an error during downloading?
No, I think this is just a problem with how your X-Window
system is set up. It has nothing to do with IDL, unfortunately,
except that IDL interacts with the window system.

But, I have almost no experience with Cygwin, so I can't
be of much help, I'm afraid.

Why didn't you download the Windows version?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
c***@gmail.com
2012-12-19 22:59:19 UTC
Permalink
I downloaded both cygwin and cygwin/x
Mats Löfdahl
2012-12-19 23:00:20 UTC
Permalink
Post by c***@gmail.com
Yes, and it still returns the same error when I run a simple plot. Is there some other syntax that I'm missing like a comma somewhere?
Since you have to deal with the DISPLAY variable in the first place, you are logged in remotely to the machine where you are running IDL, right? And the <IP address> you are setting the DISPLAY variable to, that's the IP address of the machine the screen of which you are sitting by?

Then, how did you log in remotely? A long time ago, when people used telnet, you actually had to deal with the DISPLAY variable. Nowadays, when you are more likely to use ssh, you don't do that. You use ssh with the -X flag instead. Of course, your local machine (the one with the screen) still has to have an X server.
wlandsman
2012-12-20 00:11:38 UTC
Permalink
Post by c***@gmail.com
setenv display <your IP address>:0.0
^
should make it work, but for me it just produced a sytax error as shown above under the "i". What could be a solution?
If it really is a syntax error then maybe you have the bash shell rather than the C-shell? In that case, I believe the equivalent command to setenv would be

export DISPLAY=<your IP address>:0.0

--Wayne

Loading...