[wplug] Perplexing terminal emulation problem

Brian Sammon brians+ at cs.cmu.edu
Fri May 30 18:02:38 EDT 2003


> Moreover, if I raise an xterm on the 7.2 machine on the W2K machine,
> and from there log in to the 9.0 machine, everything works fine.
> 
> Is there a place I need to look other than stty that might be causing
> problems?

There's a couple of places where keyboard-related stuff goes through a 
mapping/conversion layer.

The X Server (in this case StarNet X-Win32) converts MSWindows key-events 
into XWindows XKeysyms.  This may be configurable.  You can use the "xev" 
command to see what XKeysyms are being generated when you hit each key.

xterm converts XKeysyms into characters/bytes.  This is configurable by a 
number of methods.  As someone else mentioned, doing Ctrl-LeftMouseBtn may 
be enough to configure this the way you want.  It can also be configured 
through Xresources for xterm, but this requires that your X Server have 
working support for X resources.  I've had problems with that in the past 
when using Windows X-servers.
Here's the lines I use:
  xterm*VT100.Translations: #override\n\
        <Key>BackSpace:  string(0x7F)\n\
        <Key>Delete:        string(0x1b) string("[3~")
This converts the BackSpace Xkeysym to a ascii 127(7F in hex), AKA ^? and 
converts the Delete Xkeysym into an escape sequence which many 
applications interpret as "Delete-next-character" or "delete-forwards" or 
something like that.
If you write those three lines to a file and do "xrdb -merge <filename>", 
and if your X-server has good Xresources support, it might work.
Alternatively, adding those lines to /usr/X11R6/lib/X11/app-defaults/Xterm 
might bypass the need for the X-server to have Xresources support.

Inside of xterm, there's things like stty, and shell configuration.  
There's some keyboard-remapping stuff that can happen at that level, too.  
I'm not too familiar with them.  I've found that if you configure Xterm to 
generate the ascii-127/^? when you press the appropriate button, then 
everything inside xterm generally falls into line.






More information about the wplug mailing list