I've installed a Dell Precision M4700 with Ubuntu 18.04.2 Desktop in a minimal installation. I want to now set this up so I can remote login via vnc, using the same desktop environment that comes with the default installation.

I will be VNC'ing from a Windows machine using UltraVNC. It is on the same network as the Ubuntu machine, and I do not need to ssh into the Ubuntu machine - however still want to have remote login via VNC.

What I have tried so far is:

Installing vnc4server, and using the default setup for "xstartup" - This results in my Windows machine connecting however I just get the grey screen with options for vnc configuration ("Accept clipboard from viewers", etc.). Looking at the remote log, I can see that multiple errors occur due to a folder missing - /etc/x11/xserver. I've not been able to determine if this is a warning I can ignore. I've attempted to modify the "xstartup" file as per the link below, but it doesn't change the result - How to change to other desktop environment on VNC sessions?

Have also tried switching to xrdp/vino - so now connecting via Windows Remote Desktop - this gives me a login window, but when logging in nothing happens (as in the login GUI disappears, and I have a blank screen).


Can you try something like this:

$ mkdir $HOME/.vnc
$ echo '#!/bin/bash
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
gnome-session &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
# or nautilus-desktop &
## if you need a terminal window: gnome-terminal &
' > $HOME/.vnc/xstartup
$ chmod 755 $HOME/.vnc/xstartup

before starting the vncserver.

Feel free to change the last lines of xstartup file as needed.

I will also recommend doing

$ sudo apt install  gnome-panel gnome 

to install any missing gnome related packages.

| improve this answer | |
  • 1
    Could you explain what this update to the xstartup is doing? As I have tried: {#!/bin/bash [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & } – mipidisaster May 12 '19 at 19:31
  • That's what I am using in a Debian (not Ubuntu) system. Please, try one by one line to change your xstartup file to match the given sample file. Each time you should first do vncserver -kill before restarting vncserver. – FedonKadifeli May 12 '19 at 19:36
  • Alright, so status > The first few lines didn't really much of a change, however, got an error for "gnome-settings-daemon" saying that it's not found. Attempted to install this, but already had the latest installed (3.28.1-0ubuntu1.2) - so have commented it out for now. metacity - changes the vnc'd cursor from "X" to a cursor. nautilus - gives me an explorer window! However nothing else Changing this entry to nautilus-desktop, the window disappears and nothing really changes. gnome-terminal - just opens a terminal on the Linux machine; doesn't appear within the vnc session. – mipidisaster May 14 '19 at 18:16
  • Looking over the log, I can see there are a few warnings for "gnome-panel" and "metacity" - ** (gnome-panel:26024): WARNING **: 19:17:43.641: Failed to request name: the name already has an own er metacity-Message: 19:17:43.661: could not find XKB extension. (metacity:26025): metacity-WARNING **: 19:17:43.664: Failed to create MetaCompositorXRender: Missing composite extension required for compositing – mipidisaster May 14 '19 at 18:19
  • Each configuration (installed programs and their versions) is unique. I am sorry that I cannot help you further. – FedonKadifeli May 15 '19 at 15:10

Right, so focusing a bit on using xrdp instead temporarily, I've now got it working - albeit no longer via vnc...

So used the following websites to guide me on this: http://c-nergy.be/blog/?p=13390 - Got xrdp working, whilst allowing the use of local machines keyboard.

https://c-nergy.be/blog/?p=12073 http://c-nergy.be/blog/?p=12043 These two fixed a problem where authentication was required on every remote login.

https://c-nergy.be/blog/?p=12155 Finally, this link helped with keeping the themes the same.

Even though it's no longer through VNC, I'm still happy now that I can remote login to my Linux machine. I've marked this as the answer, hope this helps anyone who is attempting to remote login for 18.04.2.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.