With the correct patch attached this time...
On 07/06/2010 12:39 AM, Antoine Martin wrote:
> More details: I've tried vncviewer (various versions from 1.0.1 to
> r4080) on various platforms (win32, linux and osx).
> None of those will connect to a MacOSX VNC server using PasswordFile,
> whereas they are quite happy to connect to other servers.
> Very very strange.
> Why would the type of server have anything to do with parsing the
> PasswordFile I do not know!
>
> Anyway, is there are reason why the "ugly patch" that is included in
> Fedora builds is not merged?
> If anything, it provides a workaround for this issue.
> Attached is an updated patch against trunk.
>
> Cheers
> Antoine
>
>
>
> On 07/03/2010 09:12 PM, Antoine Martin wrote:
>> Hi,
>>
>> I can't seem to get vncviewer to connect to an OSX display exported via
>> VNC if I use the PasswordFile option!
>>
>> The server is setup using:
>> sudo
>> /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart
>> -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy
>> yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all
>>
>> Then the client just does:
>> vncviewer PasswordFile=mypasswd.txt OSX::5900
>>
>> It says it is connected, but doesn't display anything:
>> CConn: connected to host 192.168.42.111 port 5900
>> CConnection: Server supports RFB protocol version 3.889
>> CConnection: Using RFB protocol version 3.8
>> ^ Stuck at this point, no window appears.
>>
>> But if I do:
>> echo mypasswd | vncviewer passwdInput=1 192.168.42.111::5900
>> or if I just type the password into the dialog box... it works!
>>
>> I've tried vncviewer 1.0.1 on various platforms and the version that
>> comes with Fedora 13... no go
>>
>> Any ideas?
>> Antoine
>>
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> _______________________________________________
>> Tigervnc-devel mailing list
>> Tigervnc-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/tigervnc-devel
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>
>
>
> _______________________________________________
> Tigervnc-devel mailing list
> Tigervnc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tigervnc-devel
--- tigervnc-1.0.95-r4080/unix/vncviewer/CConn.cxx 2010-07-04
17:58:23.000000000 +0100
+++ tigervnc-1.0.95-r4080-patched/unix/vncviewer/CConn.cxx 2010-07-05
18:29:56.000000000 +0100
@@ -40,6 +40,8 @@
#include "ServerDialog.h"
#include "PasswdDialog.h"
#include "parameters.h"
+#include <string>
+#include <iostream>
using namespace rfb;
@@ -217,6 +219,16 @@
return;
}
+ /* XXX Who wrote this code? Yes, it is really ugly */
+ if (passwdInput) {
+ std::string s;
+ std::cin >> s;
+ *password = strdup(s.c_str());
+ if(user) *user = 0;
+ return;
+ }
+
+
const char* secType = secTypeName(csecurity->getType());
const char* titlePrefix = _("VNC authentication");
unsigned int titleLen = strlen(titlePrefix) + strlen(secType) + 4;
--- tigervnc-1.0.95-r4080/unix/vncviewer/parameters.h 2010-07-04
17:58:23.000000000 +0100
+++ tigervnc-1.0.95-r4080-patched/unix/vncviewer/parameters.h 2010-07-05
18:23:34.000000000 +0100
@@ -42,6 +42,7 @@
extern rfb::IntParameter compressLevel;
extern rfb::BoolParameter noJpeg;
extern rfb::IntParameter qualityLevel;
+extern rfb::BoolParameter passwdInput;
extern char aboutText[];
extern char* programName;
--- tigervnc-1.0.95-r4080/unix/vncviewer/vncviewer.man 2010-07-04
17:58:23.000000000 +0100
+++ tigervnc-1.0.95-r4080-patched/unix/vncviewer/vncviewer.man 2010-07-05
18:23:34.000000000 +0100
@@ -119,6 +119,11 @@
"~/.vnc/passwd".
.TP
+.B \-passwdInput \fItrue, false\fP
+Force standard vnc dialog to getting password and reads password from stdin.
+Default is false(shows dialog window)
+
+.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.0.95-r4080/unix/vncviewer/vncviewer.cxx 2010-07-04
17:58:23.000000000 +0100
+++ tigervnc-1.0.95-r4080-patched/unix/vncviewer/vncviewer.cxx 2010-07-05
18:49:09.000000000 +0100
@@ -58,6 +58,7 @@
"manager decoration around a window", 24);
StringParameter passwordFile("PasswordFile",
"Password file for VNC authentication", "");
+BoolParameter passwdInput("passwdInput", "Gets password from stdin", false);
AliasParameter passwd("passwd", "Alias for PasswordFile", &passwordFile);
BoolParameter useLocalCursor("UseLocalCursor",
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel