stty sane and xterm

Alexander E. Patrakov patrakov at
Sun Jan 20 00:14:20 PST 2008

2008/1/20, DJ Lucas <dj at>:
> This is a silly little issue that has bugged me for a while now, but it
> disappears when I finally install gnome's term, so I've never bothered
> to mess with it.  Anyway, 'stty sane' breaks the backspace character in
> recent xterm.  I'm not sure if this is related to utf8 or not, can
> anybody verify?  Anyway, the 'fix' (xterm -ie) is fairly easy for the
> default xinitrc ($XORG_PREFIX/lib/xinit/xinitrc) and I wondered if this
> should be added to the book in the configuring xorg page?  Better solution?

Remove xterm. This terminal emulator is just insane. Sadly, it is used
as a part of the default session (i.e., "xinit" without parameters),
so we can't do this now.

It already requires the "locale: true" resource (or a locale-specific
override of all bitmap fonts) in order to be useful in non-UTF-8
non-ISO-8859-1 locales. It relies on the strange "luit" utility in
order to do character recoding, and it breaks line drawing characters
over ssh connections to old hosts that have ncurses 5.4 or older.
Then, when built on LFS LiveCD, xterm-231 confuses the background
color (it is initially black, but changes to white after a "reset" or
if I display and dismiss the popup menu). Finally, it has this
backspace problem, related to the fact that Backspace sends Ctrl+H by
default, which is wrong for Linux. This backspace problem is solvable
by setting two more resources:

*VT100*backarrowKey: false
*VT100*ptyInitialErase: true

This can also be toggled at runtime by Ctrl+LeftBtn and checking or
unchecking the "Backarrow Key (BS/DEL)" menu item.

If you don't mind, I will add these two resources to the book.

Alexander E. Patrakov

More information about the blfs-dev mailing list