2
$\begingroup$

Sometimes it does not let me delete text in an xgterm terminal and outputs ^H instead.

Example:

Run IRAF:

xgterm -e cl

It opens the xgterm, there I type:

splot black_hole.fits[0]
Image line/aperture to plot (0:) (12): 192

Then I realise I made a mistake and press the Delete key on Mac, and it writes the ^H text instead:

Image line/aperture to plot (0:) (12): 192^H^H

This is very annoying. Is there a way to fix it?

Note that delete key works in xgterm initially, but breaks and writes ^H in the case above.

I've installed IRAF 2.16 through astroconda iraf-all package on Mac.

Update

The only solution I found was to use PyRAF instead. PyRAF uses the normal Mac's terminal, which does not have those Delete key issues. I can still run the same IRAF commands in PyRAF terminal, so it works fine for me.

$\endgroup$
  • 2
    $\begingroup$ I had originally suggested migrating this to Unix.SE or Apple.SE however, this question is about a quirk of how IRAF (used by astronomers to analyze images and spectra) handles terminal settings. IMO then it is on-topic. $\endgroup$ – Alex Hajnal Jan 11 at 3:13
2
$\begingroup$

This sounds like a problem with your terminal settings. Quoting the Setting up IRAF section this page, "We assume the user has defined this correctly when issuing the MKIRAF and no longer key off the unix TERM to set a default." The page goes on to say that one should add stty xgterm the to your login.cl file (directly above the final keep line might be a good place). The page linked above goes into more detail.

$\endgroup$
  • $\begingroup$ Thanks, I already had stty xgterm in my locin.cl. $\endgroup$ – Evgenii Jan 11 at 10:01
  • $\begingroup$ @Evgenii Does it appear after all other mentions of stty and also not within a conditional block (if (...) { ... } else { ... })? $\endgroup$ – Alex Hajnal Jan 11 at 10:04
  • $\begingroup$ Yes, stty xgterm is the only stty command and it is not within any other blocks. $\endgroup$ – Evgenii Jan 11 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.