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 

xgterm problems

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



Joined: 02 Aug 2006
Posts: 12

PostPosted: Wed Aug 08, 2007 3:32 pm    Post subject: xgterm problems Reply with quote

I am now having a devil of a time with a problem with xgterm OUTSIDE of IRAF. Just to be clear, I am running the current version of MacOS (10.4.10) using Apple's current version of X11 and using the Scisoft PPC beta installation of IRAF and X11IRAF.

The issue is that the folks at Harvard have set up their reduction scripts for the Hectospec on the MMT to call IRAF routines from shell scripts to allow parallel processing. Here's the interesting bit. I have run some of their software under IRAF directly and it worked properly (running in xgterm). However, when run from their script under xterm with Tek emulation, this particular IRAF command upchucks. So I thought to just replace the call for xterm with xgterm. This crashes nastily as I show here:

[By Your Command]> xgterm -e callhectospec hcal comp.ms
Error in message to server, line 6: send: could not find object gterm
while executing
"send gterm setGterm"
xgterm Xt error: Shell widget gterm-iraf has zero width and/or height

I have looked on Google and found that people seem to believe the solution is to remove the /private/etc/X11/app-defaults/XGterm file, but when I do, I get a non-interactive Xgterm window (mouse clicks and the like don't take). I have also played with the suggestion to set the environmental variable DYLD_FORCE_FLAT_NAMESPACE to no effect. Have anyone here heard anything else about how to resolve this?
Back to top
View user's profile Send private message
JCab



Joined: 02 Aug 2006
Posts: 12

PostPosted: Wed Aug 08, 2007 8:07 pm    Post subject: X11IRAF 1.5DEV also fails Reply with quote

At the suggestion of Marcos Huerta, I decided to try installing the v1.5DEV binaries of xgterm, since I believe SciSoft OSX used version 1.3. Still no joy in mudville, xgterm still strikes out with a zero width and/or height error.
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 2523
Location: Tucson

PostPosted: Wed Aug 08, 2007 8:25 pm    Post subject: Reply with quote

What kind of script is 'callhectospec', some unix shell or a #!cl script? If the latter, does it do anything to initialize the environment (in this case the 'stdgraph' or some 'stty' command)? Are there any resources set in your .Xdefaults file dealing with xgterm? If the script isn't too long could you post at least the first parts of it dealing with the initialization. As a test, you might try executing the #!cl script:

Code:

#!/iraf/iraf/bin.macosx/cl.e -f
plot
reset stdgraph = "xgterm"
implot ("dev$pix")
logout


Assuming the iraf path is correct, make it executabel and run with the same 'xgterm -e' syntax.

I've seen similar problems with incompatible builds of say ximtool and an old X11 system, even with the v1.5 version so you might try a local build of the v1.5 sources (just use "xmkmf ; make World") .


-Mike
Back to top
View user's profile Send private message
JCab



Joined: 02 Aug 2006
Posts: 12

PostPosted: Thu Aug 09, 2007 4:03 pm    Post subject: Problem resolved... bad environmental setup Reply with quote

fitz wrote:
What kind of script is 'callhectospec', some unix shell or a #!cl script?


callhectospec is a "ecl" script, its path is set to

Code:
#!/scisoft_beta/iraf-2.12.2/irafbin/bin.macosx/ecl.e -f


which is the location of my ecl binary. I did check and your snippet of code worked. For that reason I started digging into the callhectospec script (which does initialize lots of environmental variables via stty, but ASSUMES a xterm, not an xgterm). Sure enough, replacing the following block of code:

Code:
else if (envget("TERM") == "xterm") {
   stty xterm
}


with

Code:
else if (envget("TERM") == "xterm") {
   stty xgterm
}


Now my question is, is there any way to detect a 'xgterm' environment versus 'xterm' environment, just for the purposes of scripting this.

fitz wrote:
I've seen similar problems with incompatible builds of say ximtool and an old X11 system, even with the v1.5 version so you might try a local build of the v1.5 sources (just use "xmkmf ; make World") .


Actually, build from source failed, when I grabbed the X11IRAF 1.5DEV source, xgterm failed to compile... I did not spend a lot of time trying to figure out why.
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 2523
Location: Tucson

PostPosted: Thu Aug 09, 2007 5:33 pm    Post subject: Reply with quote

TERM is a general unix/linux environment variable that points to some entry in the system terminfo/termcap database, but since 'xgterm' isn't going to be in that database setting the TERM=xgterm will only confuse other apps and wouldn't be recognized by the '-tn' commandline flag to set TERM automatically anyway. A not-so-foolproof method would be to search the process table with a 'ps' command to see if an xgterm is running on the current tty, but in a pipeline environment like yours it's generally easier to be sure you're spawning an xgterm directly.

Be careful though of other initializations such as redirecting from some global loginuser.cl to pick up definitions.

Quote:
Actually, build from source failed, when I grabbed the X11IRAF 1.5DEV source, xgterm failed to compile... I did not spend a lot of time trying to figure out why.

I'd have to see the spool file to comment, but the binaries are on the site.

-Mike
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-2009 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.12 seconds