Skip to content

Instantly share code, notes, and snippets.

@patrickmmartin
Created May 15, 2017 23:39
Show Gist options
  • Save patrickmmartin/db611a98f0a3397e9316f0d6fd9fbf8b to your computer and use it in GitHub Desktop.
Save patrickmmartin/db611a98f0a3397e9316f0d6fd9fbf8b to your computer and use it in GitHub Desktop.
vncserver setup on Ubuntu 16

when Vino-server just does not work (yet again)

Previously, so get access to the file-server desktop, used something like the instructions in the referenced pages to cobble together the start script below (which does not work 100% BTW).

sudo apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

then

sudo apt-get install vnc4server
$ vncpasswd
Password:
Verify:
patrick@COMPAQ-UBUNTU:~$ vncserver :1

New 'COMPAQ-UBUNTU:1 (patrick)' desktop is COMPAQ-UBUNTU:1

Creating default startup script /home/patrick/.vnc/xstartup
Starting applications specified in /home/patrick/.vnc/xstartup
Log file is /home/patrick/.vnc/COMPAQ-UBUNTU:1.log
vncserver :1 -geometry 800x600 -depth 24
export DISPLAY=:1

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &


~/.vnc/xstartup


#!/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 &

# addition as per https://www.server-world.info/en/note?os=Ubuntu_16.04&p=desktop&f=7

# exec xfce4-session &

# as per https://www.linode.com/docs/applications/remote-desktop/install-vnc-on-ubuntu-16-04

sleep 5

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment