Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error cannot open device

 
Post new topic   Reply to topic    iraf.net Forum Index -> Applications
View previous topic :: View next topic  
Author Message
rwatkins77



Joined: 07 Jun 2011
Posts: 9
Location: Willamette University

PostPosted: Tue Jun 07, 2011 9:56 pm    Post subject: Error cannot open device Reply with quote

I successfully installed IRAF and ds9 on my Mac Pro (Mac OSX 10.5.Cool. 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?
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Tue Jun 07, 2011 10:31 pm    Post subject: Reply with quote

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)??
Back to top
View user's profile Send private message
rwatkins77



Joined: 07 Jun 2011
Posts: 9
Location: Willamette University

PostPosted: Tue Jun 07, 2011 10:57 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Tue Jun 07, 2011 11:06 pm    Post subject: Reply with quote

Try this: Start DS9 using

Code:
% ds9 -unix_only &


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.
Back to top
View user's profile Send private message
rwatkins77



Joined: 07 Jun 2011
Posts: 9
Location: Willamette University

PostPosted: Tue Jun 07, 2011 11:23 pm    Post subject: Reply with quote

I tried ds9 -unix_only and the .IMT file wasn't created.

I reinstalled ds9 6.2 (using the darwinleapard.6.2 from the ds9 downloads) and tried that and it also doesn't create a file

I tried the xrdb code you gave and got nothing returned.

Is there a way to check the resource settings?

Thanks so much for your help
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Tue Jun 07, 2011 11:30 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
rwatkins77



Joined: 07 Jun 2011
Posts: 9
Location: Willamette University

PostPosted: Tue Jun 07, 2011 11:36 pm    Post subject: Reply with quote

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

is that correct?

Thanks
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Tue Jun 07, 2011 11:38 pm    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
rwatkins77



Joined: 07 Jun 2011
Posts: 9
Location: Willamette University

PostPosted: Tue Jun 07, 2011 11:42 pm    Post subject: Reply with quote

Unfortunately, the inet route also doesn't work. I still get the same error.
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Tue Jun 07, 2011 11:45 pm    Post subject: Reply with quote

You could always just try XImtool to rule out a problem on the iraf side (see ftp://iraf.noao.edu/iraf/x11iraf/x11iraf-v2.0BETA-bin.macintel.tar.gz), or go back to even an older DS9 version.
Back to top
View user's profile Send private message
rwatkins77



Joined: 07 Jun 2011
Posts: 9
Location: Willamette University

PostPosted: Wed Jun 08, 2011 5:42 pm    Post subject: Reply with quote

I tried XImtool and it works just fine. Are there any disadvantages to just using XImtool instead of ds9?

Thanks
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Wed Jun 08, 2011 5:50 pm    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Applications All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.18 seconds