I
I
Ilya Andreevich2017-05-29 09:38:11
VPN
Ilya Andreevich, 2017-05-29 09:38:11

How to set up a normal Ubuntu desktop via VNC?

Hello. There is a virtual server on cloud.google.com Ubuntu 17.04 OS. Through the terminal I raise the VNC server and connect to it. These are the commands I run:

sudo apt-get update
sudo apt install ubuntu-desktop
sudo apt-get install vnc4server
vncserver
nc localhost 5901
vncserver -kill :1
vim .vnc/xstartup
:wq
nc 112.144.155.166 5901

The vnc/xstartup file contains the following content:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
 unset SESSION_MANAGER
 exec /etc/X11/xinit/xinitrc
[ -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 &

Everything goes fine, I connect via VNC-Viewer to the machine. But instead of a full Ubuntu Desktop, I see a blank screen. Here's an example:
c2db4c749822494495f76affc4baf682.png
How do I properly configure Ubuntu so that icons and programs are visible and not a blank screen?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question