I've never used VNC before, although I used X11 about 25 years ago. I'm trying to set up a VNC connection between my Windows laptop and a box I ssh to from an external gateway.

From my Win7 laptop, I ssh to an Ubuntu gateway box, call it "gateway", and then I ssh to a blade with an IP that is private to the gateway. We'll call that "blade".

I also set up a local port forward from port 5901 on my Win7 laptop to blade:5901.

I installed "tightvncserver" on "blade" with apt-get and ran it with default options.

I then ran "tightvncviewer" on my Win7 laptop and connected to the server. It gave me a VNC screen with the following error dialog contents (slightly elided):

Xsession: unable to start X session --- no "/home/.../.xsession" file, no 
"/home/.../.Xsession" file, no session managers, no window managers, and no 
terminal emulators found; aborting.

From my ssh shell on "blade", I catted out a .xsession-errors file that said basically the same thing.

That tells me my port forwarding is working fine, but that I need to do some additional configuration on "blade".

So, what's the proper way to resolve this?


When I start the vnc server on the ubuntu box and then attempt the connection from the client, some information is written into "~/.vnc/:1.log". When I first saw this output, I saw it failing to find "~/.Xresources". I doubt this is an "error" per se, as there should be no requirement that I make X resource customization, but nevertheless I did "touch ~/.Xresources" and started again, and the log didn't have that error/warning anymore.

In any case, the log, which I'm showing the full contents of here, seems to just say things are going ok:

10/07/15 18:47:28 Xvnc version TightVNC-1.3.9
10/07/15 18:47:28 Copyright (C) 2000-2007 TightVNC Group
10/07/15 18:47:28 Copyright (C) 1999 AT&T Laboratories Cambridge
10/07/15 18:47:28 All Rights Reserved.
10/07/15 18:47:28 See http://www.tightvnc.com/ for information on TightVNC
10/07/15 18:47:28 Desktop name 'X' (bl12-kvm-nest:1)
10/07/15 18:47:28 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
10/07/15 18:47:28 Listening for VNC connections on TCP port 5901
Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring

10/07/15 18:49:18 Got connection from client
10/07/15 18:49:18 Using protocol version 3.8
10/07/15 18:49:19 Enabling TightVNC protocol extensions
10/07/15 18:49:21 Full-control authentication passed by
10/07/15 18:49:22 Using tight encoding for client
10/07/15 18:49:22 rfbProcessClientNormalMessage: ignoring unknown encoding 16
10/07/15 18:49:22 Using image quality level 6 for client
10/07/15 18:49:22 rfbProcessClientNormalMessage: ignoring unknown encoding -223
10/07/15 18:49:22 Enabling LastRect protocol extension for client
10/07/15 18:49:22 Enabling cursor position updates for client
10/07/15 18:49:22 Enabling full-color cursor updates for client
  • Are there additional logs in the blade's ~/.vnc directory? They may be more informative. What exactly is a 'blade' anyhow? if it is headless (no physical display) then there may be additional packages that you need to install to get minimal X session functionality. – steeldriver Jul 10 '15 at 22:40
  • I updated with the contents of the log. In addition to the log file, there's a "passwd" file with an apparently encoded value, and a "xstartup" script that runs "/etc/X11/Xsession" at the last step. Concerning whether I need additional packages, I suppose I can't say, but the vnc server isn't complaining about anything, it's just the client that is failing. I see X-related apps in /usr/bin, so it would seem like all of the non-headless stuff is there. – David M. Karr Jul 10 '15 at 22:58

I was able to resolve this. The key was focusing on my ~/.vnc/xstartup file. Instead of running Xsession, I now have it run fvwm and it's working well enough now.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.