Knowledge base: Known Issues
Grey screen or VNC Viewer window closes when connecting to VNC Server in Virtual Mode
Platform(s): Linux/UNIX Product(s): VNC Version(s): 5.1

Issue

When connecting to VNC Server in Virtual Mode, you may see a grey screen, or the VNC Viewer window may open briefly and then close again. We believe the problem is the way we check the system before adding the relevant entries into the ~/.Xauthority file. When adding these entries, we need to perform a lookup of the hostname of the machine, which is used to identify VNC Server. We've noticed that if the hostname is set to contain the fully qualified domain name, and not just the host part, then the resulting entry does not work, and X clients cannot connect to VNC Server, and be remoted to VNC Viewers.

Status

Workaround available:

Check the output of the "hostname" command to see if the hostname is set to the fully qualified domain name. This command should report just the computer name without the domain extension. If this is not the case, try changing the hostname using the command "sudo hostname new_hostname" (where new_hostname is the non-FQDN name), and modifying /etc/hosts to make the change permanent (assuming it fixes the problem). This is how the hostname should be set, with the domain part being picked up from DNS or /etc/hosts (as reported by the "hostname --fqdn" command).