Welcome to iraf.net Thursday, March 28 2024 @ 10:43 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 xgterm on Mac PPC
   
gudehus
 03/03/2008 09:04PM (Read 11553 times)  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Hello,I downloaded your precompiled binary of xgterm and tried it on my Mac PPC running system 10.4.11. While I can display a plot with it, I can't do any cursor readback from it. Can you fix this, maybe by recompiling on system 10.4.11?Donald

 
Profile Email Website
 Quote
fitz
 03/03/2008 09:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The binary at https://iraf.net/ftp/iraf/x11iraf/x11iraf-v1.5DEV-bin.macosx.tar.gz is known to work on a 10.4.11 PPC system.If you see a B&W plot then your terminal type is probably set to 'xterm' instead of 'xgterm', I can reproduce the cursor read failure in this case. To fix it, re-run MKIRAF and reset the terminal type, or at the CL prompt do [code:1:27a806fb34]
cl> stty xgterm
cl> gflush
[/code:1:27a806fb34]Cheers,
-Mike

 
Profile Email
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
No, 1) I don't see a B&W plot, 2) my terminal type is not xterm instead of xgterm. By the way, I'm not using xgterm with iraf. A previous version of xgterm had this problem when the OS was upgraded to Tiger, but Chip Coldwell got a version going that worked with systems up to 10.4.8 or so. Now with 10.4.11 the problem has reappeared. Also, going back to older systems solves the problem of xgterm not handling cursor readback, but I'd rather not have to downgrade my Mac. Is it possible for you to recompile xgterm on 10.4.11; that could conceivably solve the problem.Donald

 
Profile Email Website
 Quote
fitz
 03/03/2008 09:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:9b0abbde96]s it possible for you to recompile xgterm on 10.4.11; that could conceivably solve the problem. [/quote:9b0abbde96]There's no particular reason to believe this would fix the problem, but stranger things have happened. Use the source from https://iraf.net/ftp/iraf/x11iraf/x11iraf-v1.5DEV-src.tar.gz and compile with the commands "xmkmf ; make World". This might also be a problem in whatever it is you're running that's trying to read the cursor.-Mike[/quote]

 
Profile Email
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Thanks Mike,I went to the xgterm directory and tried:[gudehus@schumann]# xmkmf ; make World
imake -DUseInstalled -I/usr/X11R6/lib/X11/config
make: *** No rule to make target `World'. Stop.Any suggestions?Donald

 
Profile Email Website
 Quote
fitz
 03/03/2008 09:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:4199d5c95d]Any suggestions? [/quote:4199d5c95d]You need to run the commands from the toplevel X11IRAF directory to build everything.-Mike

 
Profile Email
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Going up one level to x11iraf-v1.5DEV-src I get:[gudehus@schumann]# xmkmf ; make World
imake -DUseInstalled -I/usr/X11R6/lib/X11/config
Building the X11IRAF v1.5DEV software treeMon Mar 3 14:06:30 PST 2008
+ mkdir -p include
+ mkdir -p app-defaults
make arch X11IRAFDIR=$PWD
Configuring X11IRAF for macosx...
Restore archived macosx objects...
No object archive found; full sysgen will be needed.
make[1]: *** No rule to make target `Engineering/IRAF/x11iraf-v1.5DEV-src'. Stop.
make: *** [World] Error 2
Donald

 
Profile Email Website
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Mike,It didn't like the Mac style of spaces in one of my directory names, so after inserting and underscore, it went a bit further but I'm not sure if it succeeded. Where would the binary xgterm be located?Here are a few of the messagesmake[2]: *** No rule to make target `/Users/gudehus/Engineering/Computer_Engineering/IRAF/x11iraf-v1.5DEV
-src/obm/libobm.a', needed by `xgterm'. Stop./usr/bin/ld: can't locate file for: -lobm
collect2: ld returned 1 exit status
make[2]: *** [ximtool] Error 1tclBasic.c:1257: error: conflicting types for 'Tcl_VarEval'
tclBasic.c:1257: note: a parameter list with an ellipsis can't match an empty parameter name list declara
tion
tcl.h:630: error: previous declaration of 'Tcl_VarEval' was here
make[3]: *** [tclBasic.o] Error 1
make[2]: *** [Tcl] Error 2make[2]: *** No rule to make target `/Users/gudehus/Engineering/Computer_Engineering/IRAF/x11iraf-v1.5DEV
-src/obm/libobm.a', needed by `xgterm'. Stop.

 
Profile Email Website
 Quote
fitz
 03/03/2008 09:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
On line 128 of the Imakefile in x11iraf/obm/Tcl delete the line that says:[code:1:72ffcbc13d] CPP_FLAGS = -traditional-cpp
[/code:1:72ffcbc13d]Then retry the 'make World' from the toplevel x11iraf directory.-Mike

 
Profile Email
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Mike,Ok, that allows it to compile. Unfortunately, recompiling doesn't allow the cursor readback to function. Also, I noticed something peculiar about its operation - I can never give it focus by clicking in the title bar!However, there is good news to report. On the Mac, I cycled through the number of color bits displayed on X11, restarting it each time, and then tried the old version from Chip Coldwell. It now works like its old self! Something had temporarily gone haywire with the Mac's X11 operation. I am trying to find out from him what he changed in his version. If you are interested, you can get a copy of Chip's xgterm at
www.chara.gsu.edu/~gudehus/fits_package_download.htmlI wonder if simply correcting your xgterm to allow it to accept focus (the red, orange, and green circles at the left of the tile bar will come on) could solve the problem. Can you do that?Donald

 
Profile Email Website
 Quote
fitz
 03/03/2008 09:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:4afbf3ef46]I wonder if simply correcting your xgterm to allow it to accept focus (the red, orange, and green circles at the left of the tile bar will come on) could solve the problem. Can you do that? [/quote:4afbf3ef46]Unfortunately, I'd need to be able to recreate the problem in order to know whether I've fixed anything, and I've never had/heard-of problems getting the focus. The Coldwell xgterm is just a binary, impossible to tell what was changed in it.-Mike

 
Profile Email
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Just to clarify, it is the plotting window of xgterm that can't receive focus on the Mac. On Linux there is no problem in this regard.Donald

 
Profile Email Website
 Quote
fitz
 03/03/2008 09:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
I understand, but other than using an 'xterm' setting from within IRAF I can't reproduce the problem. How are you initiating graphics mode from your program? Perhaps you're sending the xterm open-workstation sequence instead of the xgterm one (which is the same as for a Tek4012)?-Mike

 
Profile Email
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
I send the following bytes:
ESC (or 1B in hex)
[
7
3
8
h
followed by
GS
ESC
FF
Up to this point, the xterm and xgterm initializations are the same.Does this look right?Donald

 
Profile Email Website
 Quote
fitz
 03/03/2008 09:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The graphics start is an escape followed by "[?38h", are you sure the '7' isn't a typo (in your message)?-Mike

 
Profile Email
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Oops,Yes it is "?" not "7". I just couldn't read my screen.Donald

 
Profile Email Website
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Mike,If I send
ESC
[
?
3
8
hor that followed by
GS
ESC
FF the plot window still does not get focus when clicking in the title bar. What commands are you using?Donald

 
Profile Email Website
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Mike,Here is another oddity about xgterm (both your binary and my compiled version). If I bring up xgterm, and then on my Mac press control+command and click in the xgterm window to bring up the VT Options menu, selecting tekshow (gterm-iraf) brings up the Tek window as expected. However, the Tek window cannot be given focus. Is this your experience too? If not, what are you doing that is different?Donald

 
Profile Email Website
 Quote
fitz
 03/03/2008 09:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Donald,Window focus is generally a window manager property, not something the application will control itself. Try issuing the following two commands, checking to see whether the focus is fixed after each one:[code:1:7b199e04fa]
defaults write com.apple.x11 wm_ffm true
defaults write com.apple.x11 wm_click_through -bool true
[/code:1:7b199e04fa]The first command changes the focus policy so it applies to the window under the mouse, the second changes the default behavior of "window-activating events".See 'man Xquartz' and 'man quartz-wm' for other options. I'll have to get back to you later to confirm exactly what chars IRAF sends to open the window, more or less it is the 'OW' item in the graphcap entry for the device. Let me know if this helps.Cheers,
-Mike

 
Profile Email
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Mike,Neither the first nor both of the "defaults ..." commands changed the behavior, i.e., no focus in the Tek window either after setting "tekshow" in the menu or from running an application with the ESC sequences.Donald

 
Profile Email Website
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Mike,Have you had a chance to see what characters iraf is sending to xgterm when running on Mac OS X so that the Tek window will be able to receive focus?Donald

 
Profile Email Website
 Quote
fitz
 03/03/2008 09:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Hi Donald,Sorry, once the topic scrolled off the screen I forgot about it. I had a closer look and think I can explain what's happening. XTerm defines a 'graphics start' sequence known as XGS which is "\033[?38h" and
this is the string you are sending. You say you then follow this with a GS/ESC/FF sequence, however because of the way the input processing is done the ESC is being "lost" and the xgterm ends up in the wrong mode. XGterm OTOH opens the workstation using the sequence "\035^_" (where \035 is GS, and \033 is ESC in octal). The GS is critical in activating the default GUI that is the graphics window but it depends on the following characters to not only create the window to activate it.So, I think there are two solutions: The first is to send the XGS string as you do now but follow it with GS/ESC/ESC/FF so the second escape puts the terminal in the right mode. The second is to follow your XGS string with the XGterm string to activate the interface. Here's a small C test program you can use to experiment with init strings:[code:1:489dd3cafb]
#include <stdio.h>main (int argc, char **argv)
{
if (argc) {
printf ("\033[?38h\035\033\033\014"); /* XTerm OW plus GS/ESC/FF *//* printf ("\033[?38h\035^_"); /* XTerm OW plus XGterm OW */ } else
printf ("\035^_"); /* XGterm OW */
}
[/code:1:489dd3cafb]of you compile is an run it without args you'll simply output the xgterm open-workstation string, give it some dummy arg and you'll use the XGS string followed by either the double escape or the xgterm stirng mentioned above.If you can run this and get window focus then problem solved. Otherwise, I'm not sure where to go since I don't see the problem and this is all that IRAF sends to init the window. As I said before, window focus is usually a window manager property and/or interaction with the window manager. Are you using something other than the default Quartz window manager? Do you have the NumLock key enabled (this changes the event masking and might be interacting with the window focus somehow)? Hope this helps.Cheers,
-Mike

 
Profile Email
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Hi Mike,I sent xgterm the various combinations of strings that you suggested. The Tek window opens, but as before, it never attains focus. To answer your other questions, I am using the default Mac OS X Window System, i.e. X11 1.1.3 - XFree86 4.4.0; as I understand it, this include Quartz. There is no NumLock key on my G5 PowerMac. The window manager commands:
defaults write com.apple.x11 wm_ffm true
defaults write com.apple.x11 wm_click_through -bool true
simply allow focus to be attained by moving the mouse into an X11 window rather than clicking on the title bar. This works for xterm and Chip Coldwell's version of xgterm, for example. For iraf.net's xgterm it is a moot point since it never gets focus.I am very curious about your statement that you don't see this problem. Could you try the following? 1) Bring up xgterm on a Mac (without any involvement of iraf), say with /usr/bin/xgterm or wherever you have the executable 2) Press Control-Command-Mouse to bring up the menu 3) Select "tekshow" 4) See if you can give the Tek window focus.Thanks for your help so far,Donald

 
Profile Email Website
 Quote
gudehus
 03/03/2008 09:04PM  
++---
Junior

Status: offline


Registered: 03/03/2008
Posts: 15
Mike,Have you had a chance to try this simple test?1) Bring up xgterm on a Mac (without any involvement of iraf), say with /usr/bin/xgterm or wherever you have the executable
2) Press Control-Command and click the Mouse to bring up the menu
3) Select "tekshow"
4) See if you can give the Tek window focus.Thanks,Donald

 
Profile Email Website
 Quote
fitz
 03/03/2008 09:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Hi Donald,Sorry, I thought I replied to this long ago. I just did this experiment and saw several results: 10.3.9 PPC system - works fine, tek window gets focus
10.4.11 Intel system - xgterm crashes with a 'cannot find gterm' error
10.4.11 PPC system - no window focus just as you describe.The Intel system is my development machine and so may have a quirky version of xgterm on it and unfortunately I don't have a 10.4 PPC machine in my office (had to borrow one for the test). However, if I login to the machine remotely I can still reproduce the problem which rules out the window manager.I'll see what I can figure out....Cheers,
-Mike

 
Profile Email
 Quote
   
Content generated in: 0.69 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login