General
cancel
Showing results for 
Search instead for 
Did you mean: 

Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

 
SOLVED
Go to solution
girija_1
Occasional Advisor

Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

I am using Ksh shell
I need arrows , delete and backspace key to work .

And Up and down arrow to give history
12 REPLIES 12
James R. Ferguson
Acclaimed Contributor

Re: Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

Hi:

If you want this functionality, install the bash shell. Whatever you do, do *NOT* make root's default login shell as defined in '/etc/passwd' anything other than '/sbin/sh'.

As root, you can still dynamically invoke the bash shell if you choose.

You can fetch a 'bash' binary here:

http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.1.007/

Be sure to install all of the runtime dependencies too!

Regards!

...JRF...
girija_1
Occasional Advisor

Re: Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

I am not the root ... i am one of the user of the box
James R. Ferguson
Acclaimed Contributor

Re: Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

Hi (again):

> I am not the root ... i am one of the user of the box

OK, then you could (if you like) make *your* default login shell. You will still need to install 'bash' as I noted.

Regards!

...JRF...

Matti_Kurkela
Honored Contributor
Solution

Re: Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

Add the following to your .profile:

---------
# backspace: if it does not work, comment the first line
# and uncomment the 2nd
stty erase ^?
# stty erase ^H

# load the rest of shell settings
. $HOME/.kshenvironment
# make sure any child shells will use them too
export ENV=$HOME/.kshenvironment
---------

Then create the .kshenvironment file and write this into it:
---------
# define hpterm cursor keys
alias -x _A=$(echo '\020')
alias -x _B=$(echo '\016')
alias -x _D=$(echo '\002')
alias -x _C=$(echo '\006')

# define vt100 normal (non-application) cursor keys
alias -x __A=$(echo '\020')
alias -x __B=$(echo '\016')
alias -x __D=$(echo '\002')
alias -x __C=$(echo '\006')

# define Home and End for typical vt100 emulations
alias -x __H=$(echo '\001')
alias -x __F=$(echo '\005')

# enable history browsing and command line editing with arrow keys
set -o emacs
---------

This should give you a working backspace, arrows, Home and End keys. I don't remeber whether the Delete key functionality is included in "set -o emacs" or not.

MK
MK
girija_1
Occasional Advisor

Re: Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

Thanks Matti Kurkela

It was grt Help.

But Still my backspace is not working and delete too.

When i gave the backspace it is coming of that line(Just like Ctrl+C)

but here Here Ctrl+C is also not working.
Please tell for that too
Matti_Kurkela
Honored Contributor

Re: Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

If you have in your .profile:

stty erase ^?

and backspace does not work, try this instead:

stty erase ^H

(The correct setting depends on how your terminal/emulator is configured.)

To make Ctrl+C (and a few others) to work, add this command to your .profile:

stty intr ^C kill ^U susp ^Z

You can use the "stty -a" command to view the current settings.

MK
MK
girija_1
Occasional Advisor

Re: Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

Thanks ... it working file now with
stty intr ^C kill ^U susp ^Z
girija_1
Occasional Advisor

Re: Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

Sorry its not working properly ...

If i type ... wrong command
example

iam typing lss and deleted s using backspace and i did enter .. it is giving command not found bz it is appening ^? ...

Prevously i tried with the same shell where i executed stty intr ^C kill ^U susp ^Z ...
i logged of the shell and logged in again .. then i am facing this problem

[seehps000://home/tor]$ ls
ksh: lss^?: not found
[seehps000://home/tor]$
Mike Miller_8
Regular Advisor

Re: Need backspace , delete , arrows , home and end key to work in Hp-UX 11.11 version

try typing:

stty erase (control v)(backspace)

where 'control v' is you holding down the control key and hitting the 'v' character at the same time and backspace is the actual backspace key (the hit enter). After this is done type something and hit the backspace key. If this works add the line to your .kshrc file.