Menu

VNC Guide

VNC is a "remote desktop" system that allows one computer (the client) to control another computer (the server) using a graphical interface. This is handy if you want to monitor some GUIs like rviz without connecting a monitor to the NUC. Here's how to use it.

One time setup (on your NUC):

  1. Install a VNC server
    sudo apt install vnc4server
  2. Install the xcfe4 desktop environment (for some reason the default in Ubuntu 18.04 doesn't work):
    sudo apt install xfce4 xfce4-goodies
  3. Create a file ~/.vnc/xstartup with the following contents:
    #!/bin/sh
    unset SESSION_MANAGER
    unset DBUS_SESSION_BUS_ADDRESS
    exec /usr/bin/startxfce4
  4. Make this file executable: chmod +x ~/.vnc/xstartup

One time setup (on your own computer):

  1. Download a VNC client on your own computer (we recommend using the free VNC viewer software).

Each time you want to use VNC:

  1. Start the VNC server on the NUC with the command
    vncserver

    It should return something like

    New 'teamX:1 (teamX)' desktop is teamX:1
    Starting applications specified in /home/maslab/.vnc/xstartup
    Log file is /home/teamX/.vnc/teamX:1.log

    which means the VNC server is running on the background under display number 1 (the :1 part). You will be prompted to enter a password the first time you run this, ideally pick something secure so no one else can access your desktop.

  2. Open the VNC client on your computer, and connect to your VNC server by entering the NUC's IP addresses followed by the colon and display number:
    <IP address>:<display number>

    You should have to enter your password. You may get a warning about an unencrypted connection but this shouldn't really be a concern unless you somehow have really sensitive info on your NUC.

  3. When you're done with vnc, kill the server with
    vncserver -kill :1

    or whatever display number is still running.

Note: the desktop environment will look a little different than what you're used to, since we've had trouble getting the default Ubuntu 18.04 desktop to work with this VNC server.

If the colors look really screwed up, click on the gear icon in the dropdown bar on top of the VNC window, and then increase the "Picture Quality" setting.