Putty and HP-UX config (347 Views)
Reply
Trusted Contributor
Monty Phillips
Posts: 59
Registered: ‎03-17-2004
Message 1 of 6 (347 Views)

Putty and HP-UX config

Novice Putty/HP-UX user here. I've been reading the various threads about using Putty from WIndows to access HP-UX servers.

The problem I am having is that I can not get the "esc" key to work to scroll through last commands, etc. Things like esc-k and esc-j don't work for me.

I think I am missing something obvious so hopefully someone can guide me in the right direction.

Thanks.
Esteemed Contributor
Marco A.
Posts: 521
Registered: ‎09-28-2006
Message 2 of 6 (347 Views)

Re: Putty and HP-UX config

Try to use the vi editor ... :

vi editor style:

ESC k will bring the last command on the line, andput you in vi mode (actually, ESC puts you in vi mode, and k recallsthe last issued command).
l moves the cursor one position to the right.
h moves the cursor one position to the left.
k recalls the previous command.
j recalls the next command.
O moves the cursor to the beginning of the line.
$ moves the cursor to the end of the line.
fc finds next character c on the line.
i puts you in input mode.a brings the cursor forward one, then puts you in input mode.A brings the cursor to the end of the line, and puts you in input mode.ESC takes you out of input mode (or beeps if in vi mode).

This style of command line editing is enabled with ...

set -o vi

either in your .profile file, or manually during your logon session.

The previous command can be recalled and automatically executed bytypingron a command line.r [string]will recall and execute the last command used, that began with string.


Hope this helps,

Rgds.
Just unplug and plug in again ....
Trusted Contributor
Piergiacomo Perini
Posts: 219
Registered: ‎05-19-2003
Message 3 of 6 (347 Views)

Re: Putty and HP-UX config

Hi Monty,

escuse me for my silly question:
do you have check in
PUTTY configuration
Terminal - Keyboard

if "the Function keys and keypad"
is set to "ESC[ "
?

regards
pg

Honored Contributor
spex
Posts: 1,367
Registered: ‎05-14-1996
Message 4 of 6 (347 Views)

Re: Putty and HP-UX config

Hello,

Make sure that the $EDITOR environmental variable is set to 'vi' (this is usually accomplished through ~/.profile).

PCS
Honored Contributor
Mel Burslan
Posts: 3,214
Registered: ‎08-26-1998
Message 5 of 6 (347 Views)

Re: Putty and HP-UX config

is this esc-k/j command scrolling working if you login as the same username via another terminal emulator or from the console ? If not, I should say, you need

set -o vi

command somewhere in your .profile but if it is working at other places and not here, then I would check my environment variable, TERM, and also the putty terminal settings, keyboard sub-item.

Hope this helps
________________________________
UNIX because I majored in cryptology...
Trusted Contributor
Monty Phillips
Posts: 59
Registered: ‎03-17-2004
Message 6 of 6 (347 Views)

Re: Putty and HP-UX config

Thanks all for the fast responses and help. Much appreciated.

Major mistake such that I did not have:

export HISTFILE=$HOME/.sh_history
export HISTSIZE=8192

in my .profile!

PLus, the set -o vi helped.

Thanks again to all.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.