cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard Setup?

Matey
Occasional Advisor

Keyboard Setup?

Hello All;

I am very new to HP-UX in fact this is my first encounter with this OS but I am disappointed at its keyboard handling!
We also have a Sun server with the same keyboard problem.
Is there any way we could get the keyboard setup to function the same as in redhat or ubuntu Linux?

The arrow keys put nothing on the screen at all?
the tab key functions as if I am in a text editor mode (jumps few spaces)
the backspace key puts a ^? on the screen etc, etc,
Is this the way it is or some thing's wrong with this server which I have inherited?

Thank You!
This is uname -a;

HP-UX ... B.11.23 U ia64 0267.... unlimited-user license
12 REPLIES
Matey
Occasional Advisor

Re: Keyboard Setup?

Oh BTW can someone show me a link to HP-UX list of commands please?

Thank You very Much!
Torsten.
Acclaimed Contributor

Re: Keyboard Setup?

hp-ux servers are using different shells (sh/ksh) than linux machines (bash).

To recall a command use

ESC -
or
ESC k

Commands are here:

http://docs.hp.com/en/B3921-60631/index.html

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Matey
Occasional Advisor

Re: Keyboard Setup?

Thank you very much for the reply!
(yes indeed, it is the differences in shell)...
I'll give that a try and thanks very much for the link as well!
Matey
Occasional Advisor

Re: Keyboard Setup?

BTW I even fixed the prompt;
I called bash and got the prompt.
I typed set and saw the PS1= statement
then I just added the things I like:

bash-3.2# PS1='\s-\v\u\w\$ '
bash-3.2root/# cd etc
bash-3.2root/etc#

I may be a noob but I am happy :-)

Thanks again!

Torsten.
Acclaimed Contributor

Re: Keyboard Setup?

... so there are more linux fans around you and one of them already installed bash ...

However, some scripts may require "sh". Keep this in mind.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Duncan Edmonstone
Honored Contributor

Re: Keyboard Setup?

playing devil's advocate...

>I am very new to HP-UX in fact this is my first encounter with this OS but I am disappointed at its keyboard handling!
We also have a Sun server with the same keyboard problem.

Why would you _expect_ it to be like Linux? It's a different OS. Those sorts of features are "de-facto" standards, in that a lot of people expect them because they work that way in a popular OS like linux. If this was the default on HP-UX and Solaris it would upset a great number of people and maybe break a lot of functions too.

People who use HP-UX and Solaris _value_ backwards compatability a lot more than the Linux crowd, so things tend to chnage only slowly...

Also, don't be tempted to change /etc/passwd and make bash root's default shell - you will break your box, but you won't know it until you find you can't get into single user mode...

HTH

Duncan

HTH

Duncan
OldSchool
Honored Contributor

Re: Keyboard Setup?

and since you didn't mention which user you're logging in with, be aware that you should not ever change the default shell for the "root" account. Doing so can potentially cause you not to be able to access the system.
Matey
Occasional Advisor

Re: Keyboard Setup?

Thanks Torsten for the reminder.

Duncan;

I dont know? Good question!
I thought most Unix based OSes are alike
But thanks for the warning.(there at the end) sounds important enough...
Oh and OpenBSD is also too ridgid looking to me as well, I want to see colors when I do an ls so I know whats file and which is directory, executable or what?? etc..

About the keyboard function, well even in DOS we used to have some functions assigned to the arrow and F- keys.

I always thought it was a misconfiguration at the setup using System V .
I used to have Unix instructors complain about the keyboard layout etc.(I was only a lab tech)

Anyway I am trying to learn and hopefully I wont do too much damage in process.
That is why I am here asking the experts before trying things on our production server.
Thanks again!


OldSchool
Honored Contributor

Re: Keyboard Setup?

Matey> "I thought most Unix based OSes are alike "

there are basically two or three flavors of Unix'es, those that are based around BSD, those that revolve around SystemV and those that are a little of both.

Remember that GNU is a recursive acronym "Gnu's Not Unix". Linux / GNU based systems may work alike (even to the point of sharing common command names), but they are not UNIX. Most GNU versions of the commands are heavily extended. To me, its seems easier to transition from *nix to Linux then the other way around.

Matey> "also too rigid looking to me as well, I want to see colors...."

Well, I believe that you can get that. The GNU package coreutils (IIRC) can be installed should get you there. But, it's one of those "why bother" / "ooohh cool" thing IMHO.

"About the keyboard function, well even in DOS we used to have some functions assigned to the arrow and F- keys."

OK, you've got bash installed. As I recall, you can configure the .inputrc file to map keys so that up-arrow is "command recall" and so forth. I no longer recall the details, and again, it seems a trivial issue (to me). I'd just use the ksh and a "set -o vi".

You want to see rigid, try a non-unix platform, like MVS/XA w/ green screens.
Duncan Edmonstone
Honored Contributor

Re: Keyboard Setup?

So you can use bash - but what happens when you're working on another box where it's not installed (or in single user mode)?

There are all sorts of tools out there that can enhance productivity, but a good sysadmin should be able to admin a box successfully in its "virgin" state - on HP-UX that means using the POSIX shell, and using vi style command line editing - so like vi, we press ESC to exit input mode, and then use h, j, k, and l to navigate left, down, up and right respectively, and then use the normal vi commands to go back to input mode (such as i to insert a to append or cw to change a word). To get all this to work by default for the roor user just make sure the following lines are included in root's .profile

export HISTFILE=/.sh_history
export HISTSIZE=1000

That will keep the last 1000 commands entered by root

I'm surprised about a bunch of UNIX tutors complaining about this! They should have known better.

HTH

Duncan

HTH

Duncan
Tom Henning
Trusted Contributor

Re: Keyboard Setup?

matey> That is why I am here asking the experts before trying things on our production server.

One piece of advise: don't try things on the production box. If you "try something" and manage to break the production box, people are going to be upset with you. Use a development/training box, if you have one and if you don't try to find one. I understand that some somewhat older hardware can be found on ebay for quite reasonable pricing, if that is a problem.

At the very least, if you must use the production box use a test account as a normal user. Be extremely careful with the root account.

My 0.02 US Dollars worth.

And please assign points if you find the replies useful.
What is it that possesses otherwise sane individuals to change something just because it has not been changed in a while?
Matey
Occasional Advisor

Re: Keyboard Setup?

Thank You All:
OldSchool
Duncan and
Tom Henning

For taking the time and posting complete replies.
This is a great place.
:-)
One question tho.
As Tom said (and he is right) the Production server should never be used to test or play around...

so is there a way I could do the my testings?
(like the Linux in Windows sort of thing)?
Anyways thanks a lot!
btw lol @ 2 cents in USD (dollars worth)
:D
I hope I am alive to see the day that all moneys have gold and silver backing. as for these information they are already gold to me.
thanks a lot!