VNC server does not work with Mac Screen Sharing

Bug #925405 reported by Rui Carmo
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

When connecting to a QEMU instance from a Mac using any VNC settings on the QEMU CLI and any target arch (ARM, Intel, etc.), the connection is attempted but the negotiation never finishes.

I've verified this when building QEMU from source (1.0 and HEAD) on Ubuntu, Fedora and Debian or when using Ubuntu (Oneiric) and Debian (Lenny) packages.

It does not matter whether I specify authentication (or anything else) on QEMU's side, the behavior is always the same - I see the connection being established using netstat and tcpdump, but QEMU does not seem to send back any pixmap data after the connection setup.

Best guess as to why this happens is that the VNC negotiation on QEMU does not like the protocol version and VNC encoding sent by the Mac's built-in VNC client, or that its negotiation logic is subtly broken. I appreciate that it's not meant to be a full VNC server, but it prevents me from using it remotely until a stable Mac build is feasible.

Background info:

Mac OS X includes a VNC client called Screen Sharing that you can invoke in two different ways:

* At a terminal, by typing "open vnc://hostname:tcp_port"
* From any URI-enabled field (such as the Safari URI field), where you can just type the URI as vnc://hostname:tcp_port

Please do not confuse the enhanced VNC protocol Apple Remote Desktop uses with Screen Sharing - they are not mutually exclusive, but they are not incompatible either, since what Apple does is to negotiate extra pixmap encoding and authentication options - I use Screen Sharing to access many VNC servers such as vnc4server, tightvncserver, vino, etc. without any issues whatsoever, so the issue I'm reporting is not an issue with Apple's implementation.

Changed in ubuntu:
status: New → Invalid
Revision history for this message
Hendrik (78luphr0rnk2nuqimstywepozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl21a5rlwfnr8jn6ln0m3jxne2k9x1ohg85w3jabxlrqbgszpjpwcmvkbcvq9spp6z3w5j1m33k06tlsfszeuscyt-0d4ws2xj9-a811i2i3ytqlsztthjth0svbccw8inm65tmkqp9sarr553jq53in4xm1m8wn3o4rlwaer06ogwvqwv9mrqoku2x334n7di44o65qze67n1wneepmidnuwnde1rqcbpgdf70gtqq2x9thj5tl) wrote :

affects me as well.
versions:
qemu-system-common 2.0.0+dfsg-2ubuntu1.2 (current as of 14.04)
Mac OS X: 10.9.4, xnu-2422.110.17, Screen Sharing 1.4 (481.1)

Revision history for this message
Dave Eckhardt (de0u) wrote :

FWIW, this affects me too.

Ubuntu 14.04
QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.30), Copyright (c) 2003-2008 Fabrice Bellard
OS X 10.9.5.

The observed behavior is that when I hit "Connect" a spinning circle appears nearby but nothing else ever happens.

There are reports online: https://www.reddit.com/r/homelab/comments/4jr893/qemu_with_vnc_to_osx_screen_sharing/

Revision history for this message
Thomas Huth (th-huth) wrote :

QEMU 2.0 is not maintained by the QEMU project anymore. Can you please try again with the latest release of QEMU (v2.8)? ... otherwise you should report this to the bug tracker of your distro instead.

Changed in qemu:
status: New → Incomplete
Revision history for this message
Rui Carmo (rcarmo+launchpad) wrote :

Hey there. Will git tip from September do? At that time I built QEMU on Ubuntu 16.04.1, pointed my Mac (10.10) at it again and had the same experience (had to use a third-party client)

Considering I opened this four years ago, I'm kind of surprised it's still a talking topic. Was kind of expecting more people to report it, but then again Launchpad is a bit off the beaten path these days and most people just sigh and fetch a third party client.

It's just that it seems like a trivial thing to fix overall, so I thought it worthwhile to chime in - Happy New Year!

Revision history for this message
mmu_man (revol) wrote : Re: [Qemu-devel] [Bug 925405] Re: VNC server does not work with Mac Screen Sharing

On 01/01/2017 17:55, Rui Carmo wrote:
> Hey there. Will git tip from September do? At that time I built QEMU on
> Ubuntu 16.04.1, pointed my Mac (10.10) at it again and had the same
> experience (had to use a third-party client)
>
> Considering I opened this four years ago, I'm kind of surprised it's
> still a talking topic. Was kind of expecting more people to report it,
> but then again Launchpad is a bit off the beaten path these days and
> most people just sigh and fetch a third party client.
>
> It's just that it seems like a trivial thing to fix overall, so I
> thought it worthwhile to chime in - Happy New Year!
>

For what it's worth, it's a bug in Apple's client which despite them
claiming to "use the industry standard VNC" (whatever that means)
clearly violates the VNC specs by replying with a boggus protocol
version number.

I told them 5 years ago but it's not like they care about respecting
standards...

François.

Revision history for this message
Rui Carmo (rcarmo+launchpad) wrote :

Well, I understand that since they do their own encoding (hence the need for a different protocol number for their stuff to talk to each other), but I don't think that's the whole thing, since I don't get any updates from the server, and the VNC spec (IIRC) allowed for negotiating a common version and encodings.

Regardless, would it be feasible to fix this from a user perspective?

(and Happy New Year!)

Revision history for this message
mmu_man (revol) wrote :

There is no need to change the protocol version itself to use new
encoding, there are provisions for that in the existing one.

IIRC the problem was also that each party was waiting for the other one
to send data after the protocol version exchange, but that was 5y ago.

Yes it should be possible to work around this, but I don't have a Mac now.

François.

Thomas Huth (th-huth)
Changed in qemu:
status: Incomplete → Confirmed
Revision history for this message
Thomas Huth (th-huth) wrote : Moved bug report

This is an automated cleanup. This bug report has been moved to QEMU's
new bug tracker on gitlab.com and thus gets marked as 'expired' now.
Please continue with the discussion here:

 https://gitlab.com/qemu-project/qemu/-/issues/88

Changed in qemu:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.