Joined: 07 Jun 2011 Posts: 9 Location: Willamette University
Posted: Tue Jun 07, 2011 9:56 pm Post subject: Error cannot open device
I successfully installed IRAF and ds9 on my Mac Pro (Mac OSX 10.5.. Both programs work fine independently, but I can't get IRAF to talk to ds9. When I try the display task I just get "ERROR: cannot open device (node!imtool,,512,512)". I am sure that ds9 is open when I start IRAF. I've tried various "fixes" that I've found on the web but nothing works. I've also tried reinstalling different versions of IRAF and ds9 but I always get the same error. I currently have IRAF V2.15.1a and ds9 7.0beta. Does someone have some suggestions as to how I can diagnose and fix what is wrong?
I can verify that at least the OSX 10.6 version of DS9 v7beta appears to work but I don't have a 10.5 machine to use.
A 'cannot open device' generally means the display server cannot be found. Since there are no fifos on OSX, the default display is done through unix sockets (/tmp/.IMT<uid>), so both the IRAF and DS9 need to be run as the same user for the userid to match. This protocol can be overridden in a number of ways, most easily through an IMTDEV environment variable to specify some other device (e.g. an inet socket port number). Be sure you do NOT specify this environment variable (i.e. a "cl> show IMTDEV" should be an error). Otherwise, the dev$graphcap file can specify another device, but since the error message doesn't print another device I don't think this is happening.
I do notice that using the "-inet_only" flag to DS9 won't connect, but forcing the connection by using "ds9 -unix_only" will work for me. Since this is a beta release you might report the problem to SAO if the -unix_flag works. Are there X resources or other flags or variables that might be set (e.g. in your .cshrc or a scisoft (?) init file) that could be forcing the connection to be a certain type? Are you starting ds9 yourself or using some helper app? Is there a ".IMT<uid>" file created in /tmp with your userid (likely to be 501)??
Joined: 07 Jun 2011 Posts: 9 Location: Willamette University
Posted: Tue Jun 07, 2011 10:57 pm Post subject:
I've also tried ds9 6.2 and had the same problem, so I don't think it's the version of ds9
I checked that the environment variable IMTDEV is not specified.
I tried the -unix_only flag and that didn't work.
I am starting ds9 myself.
I checked /tmp and there isn't a ".IMT<uid>".
I don't know of anything that could be forcing the connection to be different type, but I'm not sure. I'm not using scisoft. I've been using the bash shell and I don't have anything out of the ordinary in my ".profile". I've also tried working in the tcsh but with the same result.
Once it starts, there should be a /tmp/.IMT501 (or some other number) file created. If not, this is either a DS9 problem you need to report to SAO, or a resource setting. Try also
Code:
% xrdb -query | grep -i unix
which should return nothing to indicate you haven't reset the unix socket to be something else. Also, I was using the 'darwin' binaries and not the 'macosx' form of DS9.
The "xrdb -query" will dump all the active X resources.
The other way to approach this is to force the use of the inet sockets, e.g.
Code:
% ds9 -inet_only & # start DS9 using only inet sockets
% export IMTDEV=inet:5137 # set Bash shell variable to force inet
% cl
cl> display dev$pix 1
If you're using a C-shell use "setenv IMTDEV = inet:5137" to set the variable, this is used to tell IRAF to display to port 5137 on the local machine (which should be opened by the '-inet_only" flag by default).
I remember the unix socket display being broken once before but I'm not sure if it was a version glitch or resolved as some sort of user environment thing. SAO might remember.
Joined: 07 Jun 2011 Posts: 9 Location: Willamette University
Posted: Tue Jun 07, 2011 11:36 pm Post subject:
Before this goes any further I want to check that I'm installing ds9 correctly. All I did is move both the ds9 binary and the file ds9.zip to /usr/local/bin
Right, that should be all you need. Do a "which ds9" to then make sure you're running the /usr/local/bin/ds9 and not some other version in your path (or else explicitly type /usr/local/bin/ds9 to start it). Be sure you installed the ds9.zip file from the same version, I've seen mismatched files cause other error messages in the past (i.e. don't use whatever existing ds9.zip you have, download it again if needed).
The GUI is a matter of personal taste and XImtool doesn't support things like regions, but for basic image display/cursor read they should be equivalent. This does indicate a problem in DS9 though which SAO might be able to sort out. Older versions of DS9 for 10.5 can be found at http://hea-www.harvard.edu/RD/ds9/archive/darwinleopard/ (the v5.7 binary worked for me as I remember).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum