View previous topic :: View next topic |
Author |
Message |
eponymous Tux's lil' helper
Joined: 02 Feb 2005 Posts: 141
|
Posted: Tue Aug 27, 2013 8:40 am Post subject: Creating a graphical password prompt for a cmd line only app |
|
|
Hi,
I have a relatively simple task I need to do but since I'm not very up to speed with GUI programming I'm not sure the best way to go about this.
I have a command line application which when run, will prompt for a password and then fork off into the background.
What I want to do is create a graphical interface to this application which when run will prompt the user for the same password and pass it (securely) to the application.
This is so I can add the application to the XFCE startup manager and have it run at login.
This is very much akin to OpenSSH and the ssh-askpass setup I already have.
Does anyone have any ideas? Python, Tcl/Tk, Gtk?
Thanks! |
|
Back to top |
|
|
franzf Advocate
Joined: 29 Mar 2005 Posts: 4565
|
Posted: Tue Aug 27, 2013 8:46 am Post subject: |
|
|
What about shell-script + xdialog? (You might also add support for kdialog...) |
|
Back to top |
|
|
eponymous Tux's lil' helper
Joined: 02 Feb 2005 Posts: 141
|
Posted: Tue Aug 27, 2013 7:58 pm Post subject: |
|
|
franzf wrote: | What about shell-script + xdialog? (You might also add support for kdialog...) |
Ah this looks promising.
Are there any security concerns with using Xdialog for capturing a password?
Cheers! |
|
Back to top |
|
|
franzf Advocate
Joined: 29 Mar 2005 Posts: 4565
|
Posted: Wed Aug 28, 2013 8:46 am Post subject: |
|
|
eponymous wrote: | franzf wrote: | What about shell-script + xdialog? (You might also add support for kdialog...) |
Ah this looks promising.
Are there any security concerns with using Xdialog for capturing a password?
Cheers! |
I think that should be safe - as long as you make sure your password won't be saved in plaintext to disk.
just a short example:
Code: | pwd=$(Xdialog --stdout --left --title "I need your password" --password --inputbox "Password needed for action XYZ" 0 0) |
$pwd now stores your pwd. |
|
Back to top |
|
|
|