Ubuntu – VNC connection results in grey or black screen

18.0419.04remote desktopvinovnc

I want to install a vnc-server on a Ubuntu 18.04 desktop (clean install). I've tried vino, tigervnc, tightvnc. For vino, I don't get the screensharing option in the settings. For tigervnc and tightvnc the installation proceeds, I create the configuration, but when I try to connect I get a grey screen with a cross cursor.

I've tried a VM (clean installation) with Ubuntu 19.04 desktop and vino-server, turned screen sharing on. When I tried to connect with Remmina from the host, I get a black screen, no cursor.

I'm lost here, have spent hours to get this working, thought this should be a straightforward thing to do.

How can I get screensharing via VNC to work?

SSH is running, UFW disabled.

Best Answer

if you change default ubuntu-desktop to gnome-flashback or lxde, it will work:

it is known bug, it related to ubuntu major desktop like gnome3 or unity(?).

method 1: it works for me (https://ubuntuforums.org/showthread.php?t=2399979)

#!/bin/sh

export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"
export XDG_MENU_PREFIX="gnome-flashback-"

gnome-session --session=gnome-flashback-metacity --disable-acceleration-check &

method 2:

https://mate-desktop.org/ (gnome-2 de)