I would like to create a VNC server that runs gnome-shell environment, the same as the default UI in the console, separate from the console session (so that the console cannot see anything).
I tried vnc4server
and tightvncserver
, neither worked. No matter how I configured xstartup
, gnome-session
just won't run. I did manage to run Xfdm
and gnome-panel
in the same way. When I try to connect to the VNC server I get only grey screen. However I can confirm that the vnc server worked because I can run programs in it by setting DISPLAY
and XAUTHORITY
.
Is there a way to get ubuntu-desktop
running in a new X session, separate from the console session? Preferably on a VNC server?
Steps I created the vnc server:
- Install a completely new Ubuntu 18.04 LTS Desktop.
- Install
tightvncserver
. - Run
vncserver
to configure and kill it. -
Change
~/.vnc/xstartup
and append:export STARTUP="/usr/bin/gnome-session –session=ubuntu –disable-acceleration-check"
$STARTUP -
Run
vncserver
. - Connect to the VNC server with any VNC client. Only grey screen is shown.
- Configure
DISPLAY
andXAUTHORITY
and rungedit
. The VNC session sees an incompletegedit
window.
Best Answer
Finally I found the solution.
The Gnome session doesn't seem to work on VNC X servers, but an Xvfb will work. The idea is to create an Xvfb for the session and use x11vnc for VNC:
Then spawn GNOME environment:
Finally use
x11vnc
to create an VNC server for Xvfb: