[Lazarus] How can a program executing a command via TProcess detect an input prompt and create a graphical dialog for the input?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Jan 3 06:22:40 CET 2013


Mark Morgan Lloyd schrieb:

> Considering the particular case of SSH, I think there's a related daemon 
> which can detect whether sshd is asking for a passphrase and present a 
> dialog(ue). I've not used it, and can't remember the extent to which it 
> e.g. worked across networked systems.

Doesn't ssh have according parameters, so that it must not ask the user?

> I think the question needs to be clarified: would the requirement be 
> better served by (a) finding some way for an alternative daemon or API 
> to display the prompt or (b) investigating how to hook the TProcess 
> child's request for input.

I'd write a new GUI around the worker code, so that ssh (or whatsoever) 
can be used as a library in every program. I did this already for tools 
like gzip, so that these can be used in my own console or GUI programs.

DoDi





More information about the Lazarus mailing list