Why does FreeBSD VNC server behave differently?

I have an iPad (I suppose I have to say "old" iPad now) on which I use the iTeleport app as a VNC client. Using this I can very easily connect to VNC servers in a variety of OSes (such as Ubuntu, Windows XP, OS X and Haiku) on other computers on my LAN. In each case, I can immediately see the exact Desktop on my iPad and manipulate it just as if I was working on the computer with the server. However, FreeBSD behaves very differently.

I installed TightVNC in FreeBSD 8.2-Release from ports and was able to connect fairly easily to the client on my iPad (other than the fact that I had to select port 5901 rather than the usual VNC port of 5900 for reasons I don't understand). However, instead of seeing the FreeBSD Desktop on my iPad, what I saw was just an xterm terminal window.

Indeed, this is exactly what is described in this very old blog post. Also, as described in the blog post, I can launch KDE as WM in the VNC connection on my iPad. Nevertheless, all attempts to get Gnome to start on the iPad failed even though Gnome is what I use in my FreeBSD install.

Is there any reason that the VNC server in FreeBSD behaves so very differently to that in all other OSes that I have tried? How can I get Gnome to launch in the VNC connection?
 
Thanks for your comprehensive reply which totally solved this issue for me.
First, I didn't have either a .xinitrc or a .xsessions file but, after creating a new file ~/.xinitrc with this content

Code:
/usr/local/bin/gnome-session

and then replacing the line

Code:
startkde &

in ~/.vnc/xstartup with

Code:
/usr/home/paul/.xinitrc &

I got a gnome WM when I opened my VNC client on the iPad. When first opened, though, I got an error message
Code:
Could not acquire name on session bus

On closing this down, the gnome Desktop worked fine. However, it wasn't the Desktop that I actually have on my FreeBSD computer but a very limited version thereof. There were no icons, no dock and no panel. Luckily I had installed the dropdown terminal yakuake and I could use that in the client to launch, for example, a browser or whatever else I wanted. OK, it worked but wasn't very satisfactory.

However, substituting the Tightvnc server with x11vnc as server completely solved this issue in that it fully provided the exact FreeBSD Desktop on my iPad. This is what I had been expecting from the start and what I'm used to getting in every other OS that I've tried.
 
Right. x11vnc is for a single session with one or more users accessing it, like remote control or students watching a teacher's session. The other way is so each user gets their own session, like several people sharing a machine.

Windows VNC is typically the share-the-session type. Don't know about Linux or OSX, but they might just install x11vnc by default.
 
Back
Top