1

I updated one of our servers to Ubuntu 11.10. Previously We were using CentOS 6.1. When using CentOS I was able to connect to it using VNC Viewer from Windows 7 Machines. But after installing Ubuntu 11.10, when I connect, I can connect and view the Desktop, but there is nothing on the Desktop. No menus, or gadgets can be seen. If I try to invoke some GUI like gedit Its giving me an error

Xlib: extension "RANDR" missing on display ":0"

Keyboard inputs also does not work properly. When I pressed d key on keyboard it minimized the terminal window. I can't understand what is happening. Is there any solution for this?

2 Answers 2

1

I'm posting this because I spent a lot of time trying multiple things to get vnc4server up and going on the Ubuntu 11.10 system. Most people suggest using x11vnc, which does work out of the box but does not support multiple users.

vnc4server is great, and up and running finally!

Here are the steps:

  • Install vnc4server

    sudo apt-get install vnc4server
    
  • Install gdm

    sudo apt-get install gdm
    sudo apt-get install gnome-panel
    
  • When asked to choose the default session manager, choose lightdm

    When you launch vnc4server for the first time, you will be asked to set a password and a /home/<user>/.vnc/xstartup will be created for you. We need to change the contents of xstartup to get things working properly.

Contents should look like this:

#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#exec /etc/X11/xinit/xinitrc
#. /etc/X11/xinit/xinitrc
gnome-session  --session=gnome-classic &
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &

What’s changed and is important is this:

  • unset SESSION_MANAGER: Gets rid of any errors like "Could not acquire name on session bus"
  • /usr/share/gnome-session/sessions will have a bunch of .session files. You may use any of these in your xstartup file. For example:

    • gnome-session –session=gnome-classic & gives your classic gnome
    • gnome-session –session=ubuntu-2d & gives you Unity
    • gnome-session –session=ubuntu & does not work!
    • gnome-session & will not work because the default session is “ubuntu”
0

CentOS uses TigerVNC but Ubuntu uses TightVNC (I think - could be UltraVNC), you can try these contributed TigerVNC packages for Ubuntu. Important note: this will not provide the vnc.so module which allows you to shadow a real display, only Xvnc (you haven't specified how you setup VNC on the server). If you want vnc.so, do not install those packages.

As for the client, is it a Windows 7 machine? (the "windows7" tag on the question?) If so, try the official TigerVNC client as it is more likely to work properly with the TigerVNC server in CentOS.

The RANDR warning can safely be ignored.

You must log in to answer this question.