Operating System - HP-UX
1833753 Members
2932 Online
110063 Solutions
New Discussion

how to disable the terminal keyboard temparyly?

 
faust2004
Regular Advisor

how to disable the terminal keyboard temparyly?

Hi , friends

I wish to disable the terminal keyboard temparyly, the enable it , how to do it using
os command. the terminal is vt100 connect the the server hp N4000.

Thanks
Sunny

5 REPLIES 5
Michael Tully
Honored Contributor

Re: how to disable the terminal keyboard temparyly?

From the /etc/inittab file (assuming console or directly plugged terminal) comment out the line has the terminal tty.
For example, if you wanted the console not to be allowed, change the word 'respawn' to 'off'
cons:123456:respawn:/usr/sbin/getty console console

You could also stop users logging in by adding an exit statement to their .profile file.
Anyone for a Mutiny ?
Rajeev  Shukla
Honored Contributor

Re: how to disable the terminal keyboard temparyly?

Hi sunny,
Can you tell us how the terminal is connected to the server. Is it through directly connected through serial port. If that is the case then /etc/inittab is the file..

Rajeev
faust2004
Regular Advisor

Re: how to disable the terminal keyboard temparyly?

Hi,
Actually, My terminal is connected to the appliction server through terminal server. keyboard and a card reader mechine are connect to the terminal. when the terminal call a c program to read information from the card reader, if I press any key, the program will end with a error:program is terminated by ctrl_c. so I wish if I can disable the keyboard
, the program will not exit.

Thx
Sunny
Wodisch
Honored Contributor

Re: how to disable the terminal keyboard temparyly?

Hi Sunny,

how about simple commands like:

to STOP: stty -g > ~/tty-set; stty -isig -brkint -cread

to CONTINUE: stty $(cat ~/tty-set)

That should work fine ;-)

FWIW,
Wodisch

Robert-Jan Goossens
Honored Contributor

Re: how to disable the terminal keyboard temparyly?

Hi Sunny,

Wy not use lock ??
# lock
Key:
Again:
LOCKED

Hope it helps,

Robert-Jan.