quoting from the entry man page (it's the _first_ option - doesn't
_anybody_ even glance at these anymore?):
WIDGET-SPECIFIC OPTIONS
Command-Line Name:-show
Database Name: show
Database Class: Show
If this option is specified, then the true contents
of the entry are not displayed in the window.
Instead, each character in the entry's value will
be displayed as the first character in the value of
this option, such as ``*''. This is useful, for
example, if the entry is to be used to enter a
password. If characters in the entry are selected
and copied elsewhere, the information copied will
be what is displayed, not the true contents of the
entry.
Ross
--
Ross J. Reedstrom, Ph.D., <r...@bioc.rice.edu> NSF Postdoctoral Fellow
W.M. Keck Center for Computational Biology
Department of Biochemistry & Cell Biology
Rice University, 6100 S. Main St., Houston, TX 77005
entry .base -width 6 -relief sunken -textvariable base\
-background #ffffffffffff -foreground #ffffffffffff
sets both background color & foreground color to white, and nothing
shows up. Hope it helps.
entry .password -width 15 -show "-"
--
Jeroen Hoppenbrouwers, Senior Researcher at | Stop connecting computers;
Infolab, Tilburg University, The Netherlands | start connecting people!
http://infolabwww.kub.nl:2080/infolab/people/hoppie
> Trac Tran wrote:
> >
> > I am writing a Tcl/Tk's password screen using 1 line text entry widget
> > (entry), how can I set the password to be hidden with "*"?
> Don't know, but the following causes the entry to be unseen.
>
> entry .base -width 6 -relief sunken -textvariable base\
> -background #ffffffffffff -foreground #ffffffffffff
>
> sets both background color & foreground color to white, and nothing
> shows up. Hope it helps.
>
>
Yes, that's one way to do it, but innefficient, and possibly dangerous
because it's possible an option command later on could undo things.
A better approach is the -show flag to entry.
add -show {*} and it will show a star for every character typed.
I do that for our own password changing program.
____________________________________________________________________________
Doug Hughes Engineering Network Services
System/Net Admin Auburn University
do...@eng.auburn.edu
<suggesting white on white for password hiding>
> Yes, that's one way to do it, but innefficient, and possibly dangerous
> because it's possible an option command later on could undo things.
> A better approach is the -show flag to entry.
Not only that, a quick cut&paste will get you the password!
> add -show {*} and it will show a star for every character typed.
> I do that for our own password changing program.
Much better- and takes care of the cut&paste problem
> Don't know, but the following causes the entry to be unseen.
>
> entry .base -width 6 -relief sunken -textvariable base\
> -background #ffffffffffff -foreground #ffffffffffff
>
> sets both background color & foreground color to white, and nothing
> shows up. Hope it helps.
No, but it's still perfectly trivial to retrieve the text via
cut'n'paste or anything that is allowed to contact your X server. It
will only thwart the random glance towards the screen.
--
//Tom Grydeland <Tom.Gr...@phys.uit.no>
>Craig Ewert <Cewe...@starnetinc.com> writes:
>> entry .base -width 6 -relief sunken -textvariable base\
>> -background #ffffffffffff -foreground #ffffffffffff
>it's still perfectly trivial to retrieve the text via
>cut'n'paste or anything that is allowed to contact your X server. It
>will only thwart the random glance towards the screen.
even -show can be thwarted if send is working.
--
Hume Smith hclsmith at tallships dot istar dot ca
Check the man page (unix) or the help (win) for entry, and take a look
at the -show option
--
Will Coleda http://www.coleda.com/
----------------------------------------------------------
"I was gratified to be able to answer promptly, and I did.
I said I didn't know." -- Mark Twain
: even -show can be thwarted if send is working.
And even if send is disabled, a hacker need not care about output, but could
intercept keystrokes. So make access to the X-server as secure as possible.
Bye, Heribert (da...@ifk20.mach.uni-karlsruhe.de)