Ubuntu – how to make Chromium-browser start on vnc display

chromiumlubuntuvnc

I have started TightVNC Server on Lubuntu 12.04 via the command:

tightvncserver -geometry 800x600 -depth 16 :2

The VNC server successfully started and I got this message:

New 'X' desktop is gateway:2

Starting applications specified in /home/dolv/.vnc/xstartup
Log file is /home/dolv/.vnc/gateway:2.log

Then I've successfully logged in from remote PC using RealVNC Client.

I tried to start Chromium from the menu but it didn't work. So I tried to start it from the terminal with the command /usr/bim/chromium-browser & and got the following message:

Xlib: extention "RANDR" missing on desktop :2

I have also discovered that after my two attempts that the chromium-browser had created 2 new windows on the host on which was session running on display :0.

How to make the browser start on that display from which it was called (in my case from the VNC session display)?

Best Answer

The xrandr messages I do not believe are related.

What's happening is that you have two X servers running, one of which is for your VNC server. Chrome doesn't know which to display on -- and it can't display on both like other X apps can. That's a documented bug in the Chromium Open Source project. (See also this duplicate bug report which mirrors your situation.)

What's happening is that Chrome is displaying on your local X server instead of a remote one. Unfortunately, the bug is open in the official Chrome project, which means there isn't an immediate solution that's elegant, but some users on the bug report have managed to get it working by basically making two config directories for Chrome, one for each X server, and running them totally separately. (Search for "--user-data-dir" for a discussion of that on the first bug report.)