SuSE Support Database

Title: Backspace and delete

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

Backspace and delete

Applies to

SuSE Linux: All versions

Symptom:

backspace and/or the function keys do not work as usual in a telnet connection that runs in a xterm.

Cause:

S.u.S.E. Linux uses for backspace the sign \177 instead of \010 (Ctrl-H). This has two simple reasons:

Also on the Linux console \177 is backspace and delete is \033[3~
Many programmes use Ctrl-H in order to access some help function.

Background

The backspace/delete problem traces back to the times of the telex machines and the first UNIX/DOS machines. According to the ASCII table \010 really means: move back the cursor one sign (that does not mean deleting, but overwriting), \177 means ignore character under cursor (means deleting).

Over the times the meaning of these characters in several terminals and terminal emulations was slightly altered. E.g. the standard vt100 usually uses \010 for BackSpace while a standard vt220 often uses \177. Since there is software under Linux, that was developed under most different platforms, this leads to problems with the mapping of BackSpace and Delete. This should be controlled by the suitable descriptions either in the /usr/lib/terminfo/*/ files or in the /etc/termcap entries.

Now lets focus on the real problem : Unfortunately the entries for terminals with same name are different between the various types of UNIX operating systems.

It is therefore recommended to leave the terminfo files the way they are used in S.u.S.E.-Linux. A terminfo file describes the behaviour of either the terminal or the terminal emulator, for example the xterm. It behaves exactly as described in the terminfo file /usr/lib/terminfo/x/xterm and in the C sources. The keyboard mapping in the xterm is exactly defined in /usr/X11R6/lib/X11/app-defaults/XTerm in our distribution. It complies with the standard definition in release X11R6.1/6.3. The BackSpace key returns \177, the Delete key returns \033[3~. With this, there are no problems at all with Motif programs, since the XKeymap remains unchanged.

If you create a telnet connection to another system, you should pay attention that the local xterm with its local terminfo file /usr/lib/terminfo/x/xterm isn't necessarily identical with the remote xterm with its termcap/terminfo-file. Even without the applied changes the xterm that is contained in XFree86[tm]-3.2 (which is capable of using colours) is completely different from the xterms used on other workstations (X11R5 oder X11R6). Often even function keys use completely different escape sequences than those that are usually used in the original xterm.

Solution:

The second possibility is the most comfortable one provided that you have a good network connection. For this purpose under S.u.S.E. Linux there exists a script named xlogin (contained in the package xlogin). This script first passes the Xauthority key via rsh and then opens a remote xterm on the local screen. It can simply be called with

     xlogin hostname

Here's the script xlogin to help users with versions of S.u.S.E.-Linux older than 4.4.1 :
----------------------------------------------------------------------------
#!/bin/bash
#
rechner=$*
   term="/usr/bin/X11/xterm -ls"
  xauth="/usr/bin/X11/xauth"
   redi="< /dev/null > /dev/null"
#
if [ -z "${DISPLAY}" ]; then
  echo "No DISPLAY variable" 2>1&
  exit 2
else
  DISPLAY=`echo ${DISPLAY%%unix}`
fi
#
#
if [ -z "${HOSTNAME}" ]; then
  HOSTNAME=`hostname -f`
fi
#
#
case ${DISPLAY} in
:*)
  DISPLAY=${HOSTNAME}${DISPLAY}
esac
#
#
if [ -z "${XAUTHORITY}" ]; then
  XAUTHORITY="${HOME}/.Xauthority"
fi
#
# Programs
#
remote_xauth="${xauth} -i merge -"
 local_xauth="${xauth} -f ${XAUTHORITY} extract - ${DISPLAY}"
       xterm="${term} -display ${DISPLAY}"
#
#
for host in $rechner; do
  title="-T ${host} -n ${host}"
  ${local_xauth} | rsh ${host} "${remote_xauth}"
  rsh -n ${host} "exec ${xterm} ${title} ${redi}" &
done

exit 0
----------------------------------------------------------------------

---

See also:

---

Keywords: BACKSPACE, DELETE, TELNET, XTERM

---

Categories: X Applications

---

Feedback welcome: Send Mail to werner@suse.de (Please give the following subject: SDB-backspace_delete)

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

SDB-backspace_delete, Copyright SuSE GmbH, Nuremberg, Germany - Version: 24. Mar 1997
Impressum - Last generated: 24. Feb 1999 14:43:55 by maddin with sdb_gen 1.00.0