[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page

Top Document: Motif FAQ (Part 4 of 9)
Previous Document: 91) Does the text widget support 16 bit character fonts?
Next Document: 93) How can I replace characters typed with say a `*'? I want to


92) How can I stop the text widget from echoing characters typed? I


need to turn off echo for password input.

Answer: Use the XmNmodifyVerifyCallback to tell when input is received. Set
the `doit' field in the XmTextVerifyCallbackStruct to False to stop the echo.
(In Motif 1.0 this will cause a beep per character: Live with it, because at
1.1 you can turn it off.) Note that password hiding is inherently insecure in
X - someone may have an X grab on the keyboard and be reading all characters
typed in anyway.

Another solution often proposed is to set the foreground and background
colours to be the same, effectively hiding the text.  This has a major flaw:
someone may select the text (triple click the mouse to get the line), and then
paste the password into say an xterm with *different* foreground and
background colours.  This immediately shows the password.



Top Document: Motif FAQ (Part 4 of 9)
Previous Document: 91) Does the text widget support 16 bit character fonts?
Next Document: 93) How can I replace characters typed with say a `*'? I want to

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page


[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
kenton@rahul.net (Ken Lee)

Last Update July 25 2008 @ 00:12 AM

© 2008 FAQS.ORG. All rights reserved.