When attempting to connect to a secured XPRA server, especially through command line (i.e. xpra start ssl/user@host
), if no password is specified through either password-file or on the command line, then XPRA should prompt for the password to use rather than exiting with an error.
This would allow for the password to be omitted from any environment variables, command lines or files where they may be sniffed by other processes.
Done in r16907.
This could be re-used for ssh prompts (#1646).
Limitations:
@vinglya: please close if that works for you.
Works fine for me.
Of note - there's no prompt when doing an xpra info ssl/user@host
.
Commands like "xpra info", "xpra version", etc are command line utilities with no GUI, adding a GUI prompt would cause problems with scripts.
Just as a note - when I'd mentioned prompting for password in IRC I had thought a simple call to python's getpass
module would suffice to request it from stdin of the process rather than a GUI prompt. Either way this at least covers my usecase of only having to provide the password transiently.
@vinglya: you're right about using getpass, r16940 does that for command line tools like "xpra info". We first check to see if we're running from a tty so this should remain compatible with any wrapper scripts.
Some minor related improvements in r16941.
r16942 also uses the same code for "xpra attach": if the user started the command from a terminal, we prompt for the password there instead of using the GUI. (minor gripe: if you just press enter from the getpass prompt, the GUI prompt still comes up..)
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1645