Can’t get Xgterm (and implot) to work
Gabriel wrote on Oct 10, 2008
Hello,
I've installed IRAF v2.14.1 in my Fedora 9 (running on VMware). I've installed v1.5 of X11iraf, my xgterm is in /usr/local/lib/. My "login.cl file" reads: "stty xgterm". So here's the thing:
1)When I start IRAF (typing cl), this first error appears :? :
timeout - terminal type set wrong? (`stty termtype' to reset)
after wich it seems to load fine. Typing "ecl>stty xgterm" produces:
timeout - terminal type set wrong? (`stty termtype' to reset)
2) If I type: "ecl>!xgterm &", a xgterm windows appear; but when I type "ecl> implot nxxxxx.fit", this happens :shock::
server # XGTERM.GUI -- Default GUI for Xgterm, providing a standard graphics terminal
# emulation.
reset-server
appInitialize irafterm IRAFterm {
IRAFterm.objects: toplevel Gterm gterm
*allowShellResize: true
*gterm.warpCursor: true
*gterm.raiseWindow: true
*gterm.deiconifyWindow: true
}
createObjects
send gterm setGterm
activate
sre[] ssz[R]
rir
rir /nc[9] ` @ `?_8k?_8k /nc[0]#r#S#r<K5o<K5o etc...
and I have to Ctrl-Z to exit.
Now if I open Xgterm and access IRAF, implot works fine, but after the image is plotted I can't gain control over the Xgterm terminal without Ctrl-Z!, which shuts down the session.
Any help will be very much appreciated, I really don't know what else to try since I have re-installed X11iraf and restarted IRAF through mkiraf in a new directory and it still won't work.
Thanks!
I've installed IRAF v2.14.1 in my Fedora 9 (running on VMware). I've installed v1.5 of X11iraf, my xgterm is in /usr/local/lib/. My "login.cl file" reads: "stty xgterm". So here's the thing:
1)When I start IRAF (typing cl), this first error appears :? :
timeout - terminal type set wrong? (`stty termtype' to reset)
after wich it seems to load fine. Typing "ecl>stty xgterm" produces:
timeout - terminal type set wrong? (`stty termtype' to reset)
2) If I type: "ecl>!xgterm &", a xgterm windows appear; but when I type "ecl> implot nxxxxx.fit", this happens :shock::
server # XGTERM.GUI -- Default GUI for Xgterm, providing a standard graphics terminal
# emulation.
reset-server
appInitialize irafterm IRAFterm {
IRAFterm.objects: toplevel Gterm gterm
*allowShellResize: true
*gterm.warpCursor: true
*gterm.raiseWindow: true
*gterm.deiconifyWindow: true
}
createObjects
send gterm setGterm
activate
sre[] ssz[R]
rir
rir /nc[9] ` @ `?_8k?_8k /nc[0]#r#S#r<K5o<K5o etc...
and I have to Ctrl-Z to exit.
Now if I open Xgterm and access IRAF, implot works fine, but after the image is plotted I can't gain control over the Xgterm terminal without Ctrl-Z!, which shuts down the session.
Any help will be very much appreciated, I really don't know what else to try since I have re-installed X11iraf and restarted IRAF through mkiraf in a new directory and it still won't work.
Thanks!
Mike Fitzpatrick wrote on Oct 10, 2008
XGterm is a terminal program you need to start before you login to iraf with the 'cl' command, i.e. once you have an xgterm window open, type 'cl' in that new window to start iraf.
-Mike
-Mike
Gabriel wrote on Oct 10, 2008
Hi Mike, thanks a lot for your help.
I have two problems using IRAF from xgterm instead of using it from a Linux terminal:
1)In a regular Linux terminal I can set the background colour and the text colour and various settings more. I know this sounds silly, but I have to work with this terminal several hours a day and the text font, for example, is really small.
2) I still have the implot problem. I can open a image with implot from xgterm without problems, but then I can't gain control over the xgterm terminal to resume work, unless I Ctrl-Z, which closes the IRAF session (without logging out, which I've heard it's not good) and I have to "cl" again to re-enter IRAF.
Thanks again!
-Gabriel
I have two problems using IRAF from xgterm instead of using it from a Linux terminal:
1)In a regular Linux terminal I can set the background colour and the text colour and various settings more. I know this sounds silly, but I have to work with this terminal several hours a day and the text font, for example, is really small.
2) I still have the implot problem. I can open a image with implot from xgterm without problems, but then I can't gain control over the xgterm terminal to resume work, unless I Ctrl-Z, which closes the IRAF session (without logging out, which I've heard it's not good) and I have to "cl" again to re-enter IRAF.
Thanks again!
-Gabriel
Mike Fitzpatrick wrote on Oct 10, 2008
1)In a regular Linux terminal I can set the background colour and the text colour and various settings more. I know this sounds silly, but I have to work with this terminal several hours a day and the text font, for example, is really small.
XGterm is basically an XTerm window with a new graphics window; as such, it has the same commandline options to set foreground/background and fonts. See the XTerm man page for a list of options, or try something like
xgterm -bg red -fg blueto reset the colors.
2) I still have the implot problem. I can open a image with implot from xgterm without problems, but then I can't gain control over the xgterm terminal to resume work, unless I Ctrl-Z, which closes the IRAF session (without logging out, which I've heard it's not good) and I have to "cl" again to re-enter IRAF.
You can start xgterm in the background from another terminal, e.g. "xgterm &", and the window will run on it's own. Once in implot, the 'q' keystroke is used to quit the task and get back to the CL prompt. You may need to click on the graphics window itself to set the input focus so it takes the keystroke command. How you adjust the window-focus policy depends on the type of window manager you're using, usually it can be set with the control panel in most desktop managers.
-Mike
Gabriel wrote on Oct 10, 2008
Thanks again Mike,
the command 'q' worked perfect to get back to the CL prompt. However I could not find anywhere a way to resize the text in xgterm. I can change the background/foreground colours, but not the text. This is pretty annoying, but I guess I can live with it... If you know a way to do it however, please let me know.
Cheers!
Gabriel
the command 'q' worked perfect to get back to the CL prompt. However I could not find anywhere a way to resize the text in xgterm. I can change the background/foreground colours, but not the text. This is pretty annoying, but I guess I can live with it... If you know a way to do it however, please let me know.
Cheers!
Gabriel
Mike Fitzpatrick wrote on Oct 10, 2008
Using Ctrl-Middle-Mouse- Button should bring up a menu of fonts to select a different size. If you don't have the app-defaults file installed these will just say 'font1' thru 'font6' or so but represent 'tiny' thru 'huge'. The exact fonts depend on your X setup. Additionally, you can use the '-fn' flag to name a font on the command-line, e.g.
will bring up a login shell with a nice large font on a dark background.
Cheers,
-Mike
xgterm -ls -fn 9x15 -bg black -fg wheatwill bring up a login shell with a nice large font on a dark background.
Cheers,
-Mike
Gabriel wrote on Oct 10, 2008
Thanks, I could increase the size of the font.
I have a scroll on my mouse instead of a middle button, and pressing Ctrl-Scroll does nothing.
How could I set xgterm so I don't have to type that line each time I open it? I need to build a script of some sort? If so, could you explain how?
Your help has been amazing.
Cheers!
Gabriel
I have a scroll on my mouse instead of a middle button, and pressing Ctrl-Scroll does nothing.
How could I set xgterm so I don't have to type that line each time I open it? I need to build a script of some sort? If so, could you explain how?
Your help has been amazing.
Cheers!
Gabriel
Gabriel wrote on Oct 10, 2008
I've build this script:
#!/bin/bash
xgterm -fn 9x15
cd /iraf
but it won't do the 'cd' command. The 'xgterm -fn 9x15' command works fine. Any ideas?
#!/bin/bash
xgterm -fn 9x15
cd /iraf
but it won't do the 'cd' command. The 'xgterm -fn 9x15' command works fine. Any ideas?
Mike Fitzpatrick wrote on Oct 10, 2008
In your script, the xgterm command is running in the foreground and so the 'cd' won't be executed until the xgterm command completes. I think what you want is something like
which will set the font and then execute the quoted shell command to start IRAF automatically. You can set the 'font' resource for xgterm to avoid the flag, but this is just as easy and can be made an alias.
-Mike
xgterm -fn 9x15 -e "(chdir $HOME/iraf ; cl)"which will set the font and then execute the quoted shell command to start IRAF automatically. You can set the 'font' resource for xgterm to avoid the flag, but this is just as easy and can be made an alias.
-Mike
Gabriel wrote on Oct 10, 2008
Great! I've added that line to the link I had to xgterm and now with one click I can start IRAF with a bigger font. You've been an amazing help and I'm pretty sure I'll be coming back to the forum. Thanks again Mike!
Cheers!
Gabriel
Cheers!
Gabriel
Last post on Oct 10, 2008