Remote desktop on ubuntu 18.04

Building

1
2
3
4
5
6
7
8
wget http://http.debian.net/debian/pool/main/v/vino/vino_3.14.0-2.dsc
wget http://http.debian.net/debian/pool/main/v/vino/vino_3.14.0.orig.tar.xz
wget http://http.debian.net/debian/pool/main/v/vino/vino_3.14.0-2.debian.tar.xz
apt-get install cdbs libtelepathy-glib-dev network-manager-dev

apt-get install libsoup2.4-dev libappindicator3-dev

gsettings get org.gnome.Vino require-encryption

From server distribution to desktop distribution

1
2
3
tasksel --list-tasks
tasksel install ubuntu-desktop
tasksel install xubuntu-desktop

VNC

vino

  • set the encryption

    1
    2
    
    gsettings get org.gnome.Vino require-encryption
    gsettings set org.gnome.Vino require-encryption false
    
  • make sure your network is managed by NetworkManager

    • /etc/netplan/01-netcfg.yaml

      1
      2
      3
      
      network:
        version: 2
        renderer: NetworkManager
      

x11vnc & x0vncserver

  • both of them can redirect the DISPLAY:0

vnc4server

  • fix libxcb

    1
    
    sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
    
  • root/.vnc/xstartup

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    
    #!/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 &
    startxfce4 &
    
  • start vnc4server vnc4server -geometry 1920x1080

  • Reduce the VNC security vncconfig -display :1 -set BlacklistTimeout=0 -set BlacklistThreshold=1000000

comments powered by Disqus