Operating System - HP-UX
1834650 Members
1932 Online
110069 Solutions
New Discussion

Re: Personalising env in /etc/profile

 
Mazhar Najeeb
New Member

Personalising env in /etc/profile

Hello

I am accessing a HP-UX box using Reflections to open an X-client session. However, I cannot use the backspace key nor recall previous commands using the esc k keys. What do I need to change in the /etc/profile file to make these permanent changes?

Thanks
7 REPLIES 7
malay boy
Trusted Contributor

Re: Personalising env in /etc/profile

This what you do in the shell.

type ksh.
type set -o vi.

wlah!!! now you can use the esc k.
There are three person in my team-Me ,myself and I.
Pete Randall
Outstanding Contributor

Re: Personalising env in /etc/profile

To recall previous commands you need to set your HISTFILE variable (export HISTFILE=/tmp/.sh_history.$(whoami))
and then "set -o vi".

The backspace key is a Reflections setup issue. Make sure that, in the keyboard settings under XClient Manager, you DO NOT have the "Backspace key sends delete" item checked.


Pete

Pete
Mazhar Najeeb
New Member

Re: Personalising env in /etc/profile

Great - that solves the recall command problem. Will that make it a permanent change which will remain there when the box is restarted?

How do I assign points?
Leif Halvarsson_2
Honored Contributor

Re: Personalising env in /etc/profile

Hi,
I don't think you should change anything in /etc/profile. Instead, create a file in your home directory called (for ex.) .shrc
In your $HOME/.profile add the following:

ENV=$HOME/.shrc ; export ENV
And, if you use CDE, in $HOME/.dtprofile:

DTSOURCEPROFILE=true

To set backspace, add the following to .shrc


stty erase ^?

Pete Randall
Outstanding Contributor

Re: Personalising env in /etc/profile

To assign points, look for the drop-down box next to each response, click on it, select an appropriate point value. Do this for each response, then at the bottom of the page, click submit.

Then, because there have been some issues with point assignments not taking, go back to the question and double check. If you don't see points, assign them again. It sometimes takes a couple of tries.


Pete

Pete
Mazhar Najeeb
New Member

Re: Personalising env in /etc/profile

Thanks all - that's fixed it.
Tim Sanko
Trusted Contributor

Re: Personalising env in /etc/profile

I actually prefer to remain in /bin/sh because of posix's lack of certain limitations.


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

will do the trick for the history command

Setting the backspace / erase is correct above.

Tim