You may want to edit the /root/.vnc/xstartup file so it reads (in your case, the x-terminal-emulator line is your important part to add),
xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
Ubuntu 18.04 switched from LightDM to GDM3.
Connecting to the login screen with VNC while using GDM3 is currently not possible.
The easiest way to get this VNC functionality back is to simply switch back from GDM3 to LightDM.
LightDM is still being actively developed and used by many Linux distributions including some other flavors of Ubuntu. So no worries there.
Install LightDM
apt install lightdm
Should you for some reason come to regret switching to LightDM:
dpkg-reconfigure gdm3
Once you have LightDM installed and configured as your default greeter..
Install x11vnc from packages
apt install x11vnc
Create the file /etc/systemd/system/x11vnc.service
# Description: Custom Service Unit file
# File: /etc/systemd/system/x11vnc.service
[Unit]
Description="x11vnc"
Requires=display-manager.service
After=display-manager.service
[Service]
ExecStart=/usr/bin/x11vnc -loop -nopw -xkb -repeat -noxrecord -noxfixes -noxdamage -forever -rfbport 5900 -display :0 -auth guess
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target
Enable the x11vnc service
systemctl enable x11vnc.service
This assumes screen :0 represents your monitor and binds x11vnc to that monitor instead of a session.
If you do not have a monitor (headless) you can install the xserver-xorg-video-dummy package and use the dummy driver to configure a virtual :0 screen for you.
Side notes
- Incase you are using virt-manager (which also enables VNC on 127.0.0.1:5900) you may want to bind x11vnc to your LAN IP (-listen 10.0.0.1)
- The parameters used to start x11vnc tell it not to ask for an additional password (-nopw)
Best Answer
Since no-one gave me the apparently simple answer, I had to find out myself. Gnome support in Ubuntu 13 has changed such that gnome-classic has to be called as gnome-session-fallback. Hurray. Why are they making it so difficult to use the super easy and handy VNC access?
So, in ./vnc/xstartup, replace
by
And that's it to continue using your iPad on Ubuntu.
for the complete xstartup search for vnc grey screen boot 12.04