Re: VNC client on FreeBSD for Mac OS X server?

Hi folks,

Hi Bob!

I'd like to use a VNC client on FreeBSD to access a remote desktop
server running on an OSX Mac. Vncviewer compiles from the ports and
runs, but apparently is not compatible with the OSX server, failing
with "unknown message type".

If anybody can provide guidance, either to configuring vncviewer or
suggesting an alternative, I'd be most grateful. The only client config
information I've found so far is for a Windows client.

Here's the deal I know so far (mostly from experience, so it is pretty
solid). There are 3 things you need to remember:
1., The VNC-viewing capability Apple built into OSX's ARD daemon is a bit
oversimplified. It supports only one encoding type, namely HexTile, which
is what your vnc client must use when you want to connect to OSX. Normaly,
your VNC client knows many more encoding types and it will try to
automatically select the most appropriate one, but it doesn't seem to work
with MacOSX. Therefore you will need to tell your vnc client not to try any
encodings, but use the one you specify instead. Depending on your vnc
client, you do this with either
-encodings hextile
OR something obviously similar. Your manpage or running your client
with "-h" will reveal the trick. From a FreeBSD host, having TightVNC or
RealVNC built, you will need one of these accordingly.
vncviewer -encodings hextile
vncviewer -PreferredEncoding="hextile"
Of course, you may want to pass other arguments too, so feel free to add
them as required.

2., Regarding vnc clients you can use on FreeBSD, forget RealVNC version 4!
Experience shows that it doesn't work with the default VNC listener
built-into OSX's ARD. As far as I can remember, RealVNC 3.x viewer used to
work with OSX when the -PreferredEncoding="hextile" argument was passed to
it, but with version 4.x it doesn't work any more. Even with the hextile
encoding forced, RealVNC 4 always fails to connect to OSX with the "unknown
message type" error. Therefore, I learnt not to build ports/net/vnc (this
is the port of RealVNC 4.x to FreeBSD) if I want to connect to OSX[1].
Solution 2.A - On the OSX machine, don't use ARD's built-in VNC listener,
instead build and use the full-featured OSX VNC Server aqua/osxvnc from
macports. To this one, you will be able to connect with any vnc client.
Solution 2.B - On the FreeBSD host, build and use ports/net/ssvnc,
ports/net/tightvnc or try to download the RealVNC 3.x client source and
build that one. The nice thing about ssvnc is that it doesn't even need me
to forcibly specify the hextile encoding in the command line, it usually
connects to OSX with its defaults. I just tried "ssvnc"
and it worked fine. With TightVNC, I believe I had to use the
"vncviewer -encodings hextile" form of the command,
but that was working fine too.
[1] Mind you, that connecting to some Win32 VNC Servers like UltraVNC or
RealVNC4, ports/net/vnc MIGHT be the only one working properly while all
others can fail. So you may need to build and use the net/vnc port in some

3., Apparently, there is a significant difference between the built-in VNC
listener implementations in OSX and OSX-Server. While with the above tricks
connecting to the ARD's built-in VNC of an OSX desktop system worked fine
for me, I never managed to achieve the same with an OSX-Server (here I mean
that the Apple machine was running the Server edition of OSX). I installed
OSX-Server (10.4) on my Mac mini for a couple of weeks to study it, and the
only way I could connect to it via VNC clients was by installing
aqua/osxvnc and running that instead of the system's built-in one. When
this same machine runs a regular MacOS X 10.4 (not the Server edition),
connecting to the built-in VNC server works fine as described above.
I have no VNC experience with any form of 10.5 Leopard though. Yet! :-)

I hope this helps!
Let me know if you figure out something I didn't mention! I may need that in
the future.

Best Regards,

if you need to reply directly: