[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    Bug#1348: Update to bug #1348: There are two problems: bash/readline/stty and kvt/termios
From:       Stefan.Becker () nmp ! nokia ! com
Date:       1999-07-28 9:17:01
[Download RAW message or body]

Hi!

I've now made a more detailed analysis of the problem. There are actually
two problems and only one is a kvt bug:

1) "Can't change the tty settings with stty"

This is a problem of bash/readline and stty interaction. If you enter a
stty command into a bash which changes the control characters, then ONLY
the tty settings are changed and NOT the readline key mappings. You have
to use additionally the bash internal command "bind" to update those key
mappings. See examples/functions/fstty from the bash distribution for a
stty-frontend for bash/readline.

readline reads the current tty settings when it is initialized, so any
stty command in .profile or .bashrc executed BEFORE the first command
prompt appears is OK and the tty changes will also be used by readline.
Thus you can circumvent the strange kvt tty default setting (see below)
with the following lines in .bashrc:

# Make sure that the control characters are correct under kvt
if ( [ -t 0 ]; &&
     [ x`ps -fp $PPID | tail -1 | awk '{ print $8 }'` = "xkvt" ] ); then
        echo "Fixing kvt's tty settings..."
        stty erase '^H' kill '^U' intr '^C' susp '^Z'
fi

So 1) is NOT a kvt problem.

2) "Control characters are set to the defaults"

This is a kvt problem. When you open a kvt the tty control characters are
set to the HP-UX (POSIX?) defaults, e.g. ERASE = # and KILL = @. Any
other terminal emulator on HP-UX (xterm, dtterm, ...) uses the settings
which were set at login time. This might be true also for other
platforms.

One idea: Maybe kvt should read the termios data from the parents' tty?
Or check the xterm source code what they do with the tty settings...

Regards,

	Stefan

---
Stefan Becker
E-Mail: Stefan.Becker@nmp.nokia.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic