Slides
Slides
Raspberry Pi
Connecting to a Remote GUI Desktop with VNC
What is Virtual Network Computing?
Keyboard, Mouse
Screen
5
VNC Server and Client
VNC VNC
Client Server
6
Enabling the VNC Server
Step 1
▪ SSH to your Raspberry Pi
▪ Use the IP address as we determined it in Module 1
▪ Don’t forget to specify the user “pi” (if using default username)
Step 2
▪ Run raspi-config
▪ raspi-config needs “sudo” because it requires root privileges
7
Enabling the VNC Server
Step 3
▪ Select item #3 “Interface Options”
(as we did for enabling SSH in Module 1)
8
Enabling the VNC Server
Step 4
▪ Select item P3 “VNC”
9
Enabling the VNC Server
Step 5
▪ Confirm that you would like to enable the VNC Server
10
Enabling the VNC Server
Step 6
▪ The VNC Server is enabled, immediately and for future reboots.
11
VNC Client
VNC VNC
Client Server
12
Many VNC Clients Available
TightVNC
▪ Free and open-source ▪ Free and open-source
▪ Available via Flatpack and Snap ▪ Cross-platform
▪ Claims good Windows support
TigerVNC
▪ RealVNC’s “VNC Connect” product
▪ Free and open-source
▪ Raspberry Pi OS ships with
▪ Split from TightVNC project RealVNC server
▪ Accelerated encoding when used with ▪ RealVNC Viewer has the best
TightVNC server compatibility with RealVNC server
13
Downloading RealVNC Viewer
https://www.realvnc.com/download/viewer/
14
Starting RealVNC Viewer
▪ Example below is on Ubuntu Linux (similar on Windows)
▪ Download the file
▪ Allow “execute” permissions (see Module 1 bonus lessons if you’re unfamiliar)
▪ Run it by specifying the fully-qualified path in the form ./[filename]
15
Using RealVNC Viewer
▪ Must specify which GUI desktop
▪ Format is [ip]:[display number]
▪ Default display number is “1”
▪ However, currently this will fail
No GUI is currently running
(GUI automatically starts when
monitor is connected)
We must manually start GUI
16
Manually starting GUI
▪ “headless” mode (no monitor attached) means GUI
doesn’t automatically start
▪ We must manually start GUI as a “virtual desktop”
▪ SSH to Raspberry Pi
▪ issue command: vncserver
(Raspberry Pi Foundation)
17
Manually starting GUI
▪ Note IP and display number at the bottom as [IP]:[display number]
18
Connecting with RealVNC Viewer
▪ Now display #1 is running
▪ Connect string is [IP]:[display]
19
Authenticating with RealVNC Viewer
▪ Authenticate using normal
username and password
20
Accessing the GUI with RealVNC Viewer
▪ This is the Raspberry Pi OS
graphical desktop
▪ This is the same desktop that you
would see with a directly connected
monitor, keyboard, mouse
▪ You can access this from any
device on your local network
▪ RealVNC offers a cloud service
which allows worldwide internet
access to your Raspberry Pi
21
Summary
VNC VNC
Client Server
22
© The Johns Hopkins University 2021, All Rights Reserved.