Bug 274091

Summary: KRDC does not connect to Apple VNC servers (unsupported auth type - GetCredential)
Product: [Applications] krdc Reporter: quickfished <sduchesne>
Component: VNCAssignee: Urs Wolfer <uwolfer>
Status: RESOLVED FIXED    
Severity: normal CC: eljefedelito, pfeiffer, w01dnick
Priority: HI    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 4.10
Attachments: Here is output with KDE 4.9.4 from openSUSE binaries. (192.168.0.108 — Mac IP)

Description quickfished 2011-05-25 11:21:20 UTC
Version:           unspecified (using KDE 4.6.3) 
OS:                Linux

After putting in the correct IP address or domain name and clicking on connect, I am not prompted to enter a login or password.  I get an empty screen with a blue background.  The statusbar indicates krdc is connecting to the entered address but it never connect of stops.  It keeps on turning endlessly.
I have checked whether the server is up; it is.  I have successfully connected to it using other VNC clients. 


Reproducible: Always

Steps to Reproduce:
Start krdc.  Enter IP address or domain name of VNC server in the Connect to textbox.  Click on Goto Address button.

Actual Results:  
I get an empty screen with a blue background.  The statusbar indicates krdc is connecting to the entered address but it never connect of stops.  It keeps on turning endlessly.

Expected Results:  
Prompted for login and password; start VNC session.

OS: Linux (x86_64) release 2.6.38-ARCH
Compiler: gcc
Comment 1 Urs Wolfer 2011-08-05 19:45:47 UTC
Can you please try to run KRDC from command line and post the output? Thank you.
Comment 2 Mykola Krachkovsky 2012-01-13 09:33:21 UTC
I have similar behavoir with standard AppleVNCServer. There is no output in konsole, but I've used Wireshark to determine what is wrong. After server & client described their versions, server sent security types list:
05 1e 1f 20 02 23
So 5 types, 30, 31, 32, 2, 35. I know only 2 - standard VNC security connection type. And vncviewer selects 2 and all is OK. But KRDC selects 30 (0x1e) and nothing happens.
Comment 3 Mykola Krachkovsky 2012-01-13 09:35:50 UTC
PS
I'm using 4.8 RC2 (4.7.97)
Comment 4 Urs Wolfer 2012-01-13 09:37:35 UTC
Please make sure that you are using a recent version of libvncserver (0.9.8 or newer). This version fixes issues with OSx.
Comment 5 Mykola Krachkovsky 2012-01-13 17:28:50 UTC
According to my package manager LibVNCServer version is 0.9.8_git201104301110. By the way vncviewer works fine. It uses the same library, doesn't it?
Comment 6 Jeffrey 2012-12-12 19:37:53 UTC
I have this issue as well, Krdc 4.8.4 using libvncserver0 0.9.9+dfsg-1 on Debian Sid (2012.12.12).  Blue screen on connection attempt and that's all I get.
Comment 7 Urs Wolfer 2012-12-23 16:55:40 UTC
I need more information for this issue.

Please do the following: run kdebugdialog, enable all krdc items (use the filter).

Run KRDC from Konsole, try to connect to this server. Post all relevant output here.

Thank you for your help.
Comment 8 Mykola Krachkovsky 2012-12-24 13:22:21 UTC
Created attachment 75995 [details]
Here is output with KDE 4.9.4 from openSUSE binaries. (192.168.0.108 — Mac IP)
Comment 9 Urs Wolfer 2012-12-25 08:42:25 UTC
"GCrypt support is not compiled in"

Looks like a packageing issue of your distribution. Can you please check if libvncserver depends on libgcrypt and report it back here.
Comment 10 Urs Wolfer 2012-12-27 13:22:41 UTC
Some new results after an analysis:
* The log of Nickolay Krachkovsky shows a package issue (as stated above).

* If libvncserver is linked against gcrypt, I get this output:
krdc(4662)/krdc (VNC backend) VncClientThread::outputHandler: "VNC server supports protocol version 3.889 (viewer 3.8)"
krdc(4662)/krdc (VNC backend) VncClientThread::checkOutputErrorMessage: "INTERNAL:APPLE_VNC_COMPATIBILTY"
krdc(4662)/krdc (VNC backend) VncView::outputErrorMessage: "INTERNAL:APPLE_VNC_COMPATIBILTY"
krdc(4662)/krdc (VNC backend) VncClientThread::outputHandler: "We have 2 security types to read"
krdc(4662)/krdc (VNC backend) VncClientThread::outputHandler: "0) Received security type 30"
krdc(4662)/krdc (VNC backend) VncClientThread::outputHandler: "1) Received security type 35"
krdc(4662)/krdc (VNC backend) VncClientThread::outputHandler: "Unknown authentication scheme from VNC server: 30, 35"

* The issue above is because Apple VNC requires authentication with username AND password (unlike "normal" VNC which only requires a password).


So two things needs to be fixed in KRDC:
* Show a proper message if authentication is not possible (because the auth type is unsupported).
* Implement GetCredentialProc in the VNC plugin of KRDC.
Comment 11 Urs Wolfer 2013-01-01 18:30:22 UTC
*** Bug 286138 has been marked as a duplicate of this bug. ***
Comment 12 Mykola Krachkovsky 2013-01-04 15:33:36 UTC
vncviewer uses mode 2 (only password is needed) and successfully connects to AppleVNCServer. Is it able to add to KRDC similar functionality? If some modes aren't supported, try next modes?
Comment 13 Mykola Krachkovsky 2013-01-04 16:35:00 UTC
Almost forgot. openSUSE's libvncserver doesn't depend on libgcrypt.
Comment 14 Carsten Pfeiffer 2013-01-04 21:19:45 UTC
FWIW, since libvncserver 0.9.8.x I can successfully connect to my AppleVNCServer with krdc. However ARD authentication would certainly be preferred, because the credentials are then transferred encrypted, instead of in plain text.
Comment 15 Urs Wolfer 2013-01-04 22:35:22 UTC
FYI, I have worked on the ARD authentication stuff and it's working fine for me. I will commit it soon.

Nickolay: please report this packaging issue to your distribution.
Comment 16 Urs Wolfer 2013-01-06 10:34:13 UTC
SVN commit 1330943 by uwolfer:

add support for ARD (Apple Remote Desktop) authentication

- it does not fail silently while authenticate (blue background forever))
- minor fixes for VNC plugin qt-only version


 M  +30 -3     vncclientthread.cpp  
 M  +10 -2     vncclientthread.h  
 M  +31 -12    vncview.cpp  
 M  +2 -2      vncview.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1330943
Comment 17 Urs Wolfer 2013-01-06 10:42:48 UTC
SVN commit 1330945 by uwolfer:

Manual Backport:
- replace new message with an existing one
- I consider this as a bugfix because it could fail silently without this change

SVN commit 1330943 by uwolfer:

add support for ARD (Apple Remote Desktop) authentication

- it does not fail silently while authenticate
- minor fixes for VNC plugin qt-only version

FIXED-IN: 4.10

 M  +30 -3     vncclientthread.cpp  
 M  +10 -2     vncclientthread.h  
 M  +31 -12    vncview.cpp  
 M  +2 -2      vncview.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1330945