Operating System - HP-UX
1821985 Members
3367 Online
109638 Solutions
New Discussion юеВ

Re: Linux to HP-UX access

 
ken_5
Advisor

Linux to HP-UX access

Currently I work from the office using Exceed's Xterminal sessions. Everything is find, until I go home and access the same account from my Linux box. It appears that the backspace key works differently from my linux telnet session back into my HP-UX box. I have to use the ctrl-H key to backspace and the backspace produces ^?. I need a way to configure my linux box so that it will send the correct character. I don't want to setup an additional account. Just looking for what everyone else is doing. Thanks for you help.
8 REPLIES 8
Alex Glennie
Honored Contributor

Re: Linux to HP-UX access

5.2 How to tell Linux what code to generate when a key
is pressed

On the console or more precisely when not in (MEDIUM)RAW mode use

% loadkeys mykeys.map

and under X use

% xmodmap mykeys.xmap

Note that (since XFree86-2.1) X reads the Linux settings of the keymaps when initialising the X
keymap. Although the two systems are not 100% compatible this should mean that in many
cases the use of xmodmap has become superfluous.

For example suppose that you would like the Backspace key to send a BackSpace (^H octal
010) and the grey Delete key a DEL (octal 0177). Add the following to /etc/rc.local (or
wherever you keep your local boot-time stuff):

/usr/bin/loadkeys << EOF
keycode 14 = BackSpace
keycode 111 = Delete
EOF

Note that this will only change the function of these keys when no modifiers are used. (You need
to specify a keymaps line to tell which keymaps should be affected if you want to change
bindings on more keymaps.) The Linux kernel default lets Ctrl-Backspace generate BackSpace
- this is sometimes useful as emergency escape when you find you can only generate DELs.

The left Alt key is sometimes called the Meta key and by default the combinations AltL-X are
bound to the symbol MetaX. But what character sequence is MetaX? That is determined
(per-tty) by the Meta flag set by the command setmetamode. The two choices are: ESC X or
X or-ed with 0200.

`Why doesn't the Backspace key generate BackSpace by default?'

(i) Because the VT100 had a Delete key above the Enter key.

(ii) Because Linus decided so.

5.3 How to tell X to interchange Delete and Backspace

% xmodmap -e "keysym BackSpace = Delete" -e "keysym Delete = BackSpace"

Or if you just want the Backspace key to generate a BackSpace:

% xmodmap -e "keycode 22 = BackSpace"

Or if you just want the Delete key to generate a Delete:

% xmodmap -e "keycode 107 = Delete"

(but usually this is the default binding already).
Richard Darling
Trusted Contributor

Re: Linux to HP-UX access

I sometimes have the same problem ..set your backspace key with:

stty erase ^?

I put this command in a script, called the script b, and whenever I have the problem I just enter b from the prompt and I am all set. Maybe this is a simplistic approach, but it works for me.
Alex Glennie
Honored Contributor

Re: Linux to HP-UX access

Try Richards suggestion as well, but you could put xmodmap into a users startup script / xsession file as well
Victor BERRIDGE
Honored Contributor

Re: Linux to HP-UX access

I put
stty erase ^?
in my .profile
Richard Darling
Trusted Contributor

Re: Linux to HP-UX access

Victor, I have stty erase ^? in my .profile, but for some reason I will intermittently lose the functionality...then I use the little script

Richard Darling
Tom Danzig
Honored Contributor

Re: Linux to HP-UX access

I thinks he needs :

stty erase "^H" echoe

as he states he needs to CTL-H to backspace. I believe "^?" is the delete key.
Victor BERRIDGE
Honored Contributor

Re: Linux to HP-UX access

Hi Richard,
I must confess it happens to me too since some apps reset stty..., and if you map the keyboard (ReflectionX) you have to choose a default host keyboard, thats fine till you have to connect to something different...
I think it some a question of finding an acceptable compromise...

Best regards
Victor
Richard Darling
Trusted Contributor

Re: Linux to HP-UX access

Here is the one line script. Just put it in a directory in PATH.