# Why does FreeBSD VNC server behave differently?



## paulfxh (Mar 5, 2011)

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?


----------



## wblock@ (Mar 5, 2011)

Maybe using .xsession instead of .xinitrc, or vice versa.  If you want to connect to an existing X session, see net/x11vnc.


----------



## paulfxh (Mar 5, 2011)

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


```
/usr/local/bin/gnome-session
```

and then replacing the line


```
startkde &
```

in ~/.vnc/xstartup with


```
/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

```
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.


----------



## wblock@ (Mar 5, 2011)

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.


----------

