Appreciated with someone could help. Thanks.
--
Posted via http://dbforums.com
>
> What command or parameter should I put into /etc/profile in order to
> prevent user hit del key after the login "Term=ansi" prompt?
>
> Appreciated with someone could help. Thanks.
stty intr ""
--
Brian K. White -- br...@aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
Thank you for your helpful reply. :)
Is that any way I could disable only all oridinary user hit delete key
but not root?
I have thousand plus users ID, I tried put (stty intr "") into
/etc/profile, but it effect even root.
Why not put a conditional in /etc/profile?
if [ `id -u` = 0 ]; then
stty intr ""
fi
(cadged from a RH box)
--
_________________________________________
Nachman Yaakov Ziskind, EA, LLM aw...@egps.com
Attorney and Counselor-at-Law http://yankel.com
Economic Group Pension Services http://egps.com
Actuaries and Employee Benefit Consultants
>
> Brian K. White,
>
> Is that any way I could disable only all oridinary user hit delete key
> but not root?
>
> I have thousand plus users ID, I tried put (stty intr "") into
> /etc/profile, but it effect even root.
>
> Thanks.
((`id -u`)) && stty intr ""
> On Thu, 10 Jul 2003 02:55:56 +0000, irontech wrote:
>
>>
>> Brian K. White,
>>
>> Is that any way I could disable only all oridinary user hit delete key
>> but not root?
>>
>> I have thousand plus users ID, I tried put (stty intr "") into
>> /etc/profile, but it effect even root.
>>
>> Thanks.
>
>
> ((`id -u`)) && stty intr ""
excuse me
that works only in ksh (and bash and probably others) but not
plain sh. So here is the less interesting but more compatible:
[ `id -u` = 0 ] || stty intr ""
>
> Brian K. White,
>
> Is that any way I could disable only all oridinary user hit delete key
> but not root?
>
> I have thousand plus users ID, I tried put (stty intr "") into
> /etc/profile, but it effect even root.
>
> Thanks.
Depending on the circumstances, I think a better option might be to change
intr to something the users aren't likely to hit accidentally. That way,
you still have an "interrupt" key available if a user actually needs it.
The key can be the same for all users, but if you have different terminal
types, that could be an issue (not all keyboards have the same keys).
For example, we wanted to use Delete as a "hot key" in our application
(along with Insert, Home, End, etc.), so we changed intr to something else.
FWIW, we used "stty intr \^\~". On most US terminal keyboards, that was a
Control-tilde (Control and the character to the left of the number 1 above
the letters, either "`" or "~"). On an SCO console it was Control-6 (the 6
above the letters, not on the numeric keypad).
James
> Depending on the circumstances, I think a better option might
>be to change intr to something the users aren't likely to hit
>accidentally. That way, you still have an "interrupt" key
>available if a user actually needs it. The key can be the same
>for all users, but if you have different terminal types, that
>could be an issue (not all keyboards have the same keys).
> For example, we wanted to use Delete as a "hot key" in our
>application (along with Insert, Home, End, etc.), so we changed
>intr to something else.
> FWIW, we used "stty intr \^\~". On most US terminal keyboards,
>that was a Control-tilde (Control and the character to the left
>of the number 1 above the letters, either "`" or "~"). On an SCO
>console it was Control-6 (the 6 above the letters, not on the
>numeric keypad).
The old terminals generated control characters by just grounding
the top three bits in hardware.
So ctrl-~ should map the same as ctrl-^ or ctrl->.
Many keyboard mapping won't let you generate a shifted control
so be sure to test your choice by doing something like
going into vi in insert mode and pressing control-v and the
control-key of your choice. Or change your keyboard mappings.
For example on this machine [non-SCO] a control-6 actually
generates control-^ [caret]
--
Bill Vermillion - bv @ wjv . com