diff -ur tigervnc-1.3.1/vncviewer/parameters.cxx tigervnc-1.3.1.new/vncviewer/parameters.cxx --- tigervnc-1.3.1/vncviewer/parameters.cxx 2013-07-01 14:00:20.000000000 +0000 +++ tigervnc-1.3.1.new/vncviewer/parameters.cxx 2014-06-25 12:19:01.529927256 +0000 @@ -59,6 +59,7 @@ StringParameter passwordFile("PasswordFile", "Password file for VNC authentication", ""); AliasParameter passwd("passwd", "Alias for PasswordFile", &passwordFile); +BoolParameter passwdInput("passwdInput", "Gets password from stdin", false); BoolParameter autoSelect("AutoSelect", "Auto select pixel format and encoding. " diff -ur tigervnc-1.3.1/vncviewer/parameters.h tigervnc-1.3.1.new/vncviewer/parameters.h --- tigervnc-1.3.1/vncviewer/parameters.h 2013-02-15 08:33:39.000000000 +0000 +++ tigervnc-1.3.1.new/vncviewer/parameters.h 2014-06-25 12:19:01.529927256 +0000 @@ -26,6 +26,7 @@ extern rfb::BoolParameter dotWhenNoCursor; extern rfb::StringParameter passwordFile; +extern rfb::BoolParameter passwdInput; extern rfb::BoolParameter autoSelect; extern rfb::BoolParameter fullColour; diff -ur tigervnc-1.3.1/vncviewer/UserDialog.cxx tigervnc-1.3.1.new/vncviewer/UserDialog.cxx --- tigervnc-1.3.1/vncviewer/UserDialog.cxx 2012-04-25 15:43:56.000000000 +0000 +++ tigervnc-1.3.1.new/vncviewer/UserDialog.cxx 2014-06-25 12:29:19.717191042 +0000 @@ -22,7 +22,8 @@ #include #include -#include +#include +#include #include #include @@ -82,6 +83,15 @@ return; } + // QnD hack for reading password from stdin + if (passwdInput) { + std::string s; + std::cin >> s; + *password = strdup(s.c_str()); + if (user) *user = 0; + return; + } + Fl_Window *win; Fl_Box *banner; Fl_Input *username; diff -ur tigervnc-1.3.1/vncviewer/vncviewer.man tigervnc-1.3.1.new/vncviewer/vncviewer.man --- tigervnc-1.3.1/vncviewer/vncviewer.man 2014-06-25 12:31:45.837386688 +0000 +++ tigervnc-1.3.1.new/vncviewer/vncviewer.man 2014-06-25 12:19:01.529927256 +0000 @@ -160,6 +160,10 @@ Accept clipboard changes from the server (default). .TP +.B \-passwdInput +Get vnc password from standard input instead of showing dialog window (the default). + +.TP .B \-Shared When you make a connection to a VNC server, all other existing connections are normally closed. This option requests that they be left open, allowing you to Только в tigervnc-1.3.1.new/vncviewer: vncviewer.man.orig