Skip to main content
Chemistry LibreTexts

6: Headless Mode - VNC Viewer

  • Page ID
    431696
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Now that you have your Pi up and running you want to remotely access it (in Headless mode) through VNC viewer, which you installed on your laptop or desktop (see VNC Installation Instructions).   

    Activate VNC on Raspberry Pi

    The easiest way is to click the Raspberry icon on the taskbar, choose preferenes/Raspberry Pi Configuration/Interfaces and toggle VNC to on (figure \(\PageIndex{1}\)

    clipboard_e2f7fd86d7ed3e5300d4d7a324cb31cfe.pngFigure \(\PageIndex{1}\): Screenshoot of procedures for activating VNC Viewer on Raspberry Pi. (Belford cc 0.0)

     

    Obtain Pi IP address 

    Your desktop VNC viewer connects to the Pi over the internet through the Raspberry Pi's IP (Internet Protocol) address.  This is a string of digits containing 4 sets of numbers separated by decimal points xxx.xx.xx.xx, and is like the web address for the Pi. These are assigned by your Internet Service Provider and may be static or dynamic. If it is static, it will never change, and you only have to do this once.  If it is dynamic you will have to get the IP address every time it changes.  Do deal with this we will set up a program that emails your IP address upon bootup.

    clipboard_e869d301b1e53c17ab52f32b17c2e010c.pngFigure \(\PageIndex{2}\): two ways to get Raspberry Pi IP address. (Copyright; author via source)

     

    Note

    If you are at UALR you need to connect your Raspberry Pi to the IOT WiFi network, and this requires you to register it with IT Services (see instructions here).  You can get your IP address by going to IT services and looking up your device

    Set up Desktop VNC Connection

    You can actually run multiple VNC connections at the same time.  First you need to set up a connection, which you can do by right-clicking in a blank area of the viewer and choosing "new connection", or choosing file/new connection.  This opens the panel if figure \(\PageIndex{3}\), you type in your IP address and give your connection a name

    clipboard_e84f3bbe0756994f86596f2c2aac5655b.pngFigure \(\PageIndex{3}\): Right click a blank area of VNC Viewer and create a new connection.  After you give it an IP address and click OK, it will try and connect, and the first time will give you the sever not recognized screen.  Continure, then put in your username and password to the Raspberry Pi, and you are good to go.  If you click "Remember password", it will take you directly to the Pi desktop the next time. (Belford cc 0.0)

     

    Note

    If you have an existing VNC connection and it does not work because the Raspberry Pi IP address changed, you can right click on it, and choose properties. That will open the panel in the left image of figure 3, and allow you to update the IP address.

    You may wish to change your screen resolution (see section

     

    File Transfer

    One of the nice features of VNC is the ease with which you can transfer files between the pi and your PC or laptop.  It is very important that you structure your directories (folders) on both your PC and the Pi so that you can keep your work organized.  Therefore you should choose the destination folder with some fore thoughtl.

    PC2Pi

    To transfer from your personal computer (PC) to the the Pi you can use the collapsible menu at the top center of the Raspberry Pi desktop.   You will need to navigate to the folder containing the file you want to upload to the Pi, and you can then place it on the Pi's desktop.

    clipboard_e218f3d794013220762c0bd74057271ce.pngFigure \(\PageIndex{4}\): Copy and Paste Caption here. (Copyright; author via source)

     

    1. Go to the collapsible menu and choose the "Transfer Files" options
    2. Choose Send "files.."
    3. Navigate to the folder on your PC having the file you want to upload and click on it
    4. Choose "Open"

    The file will now be uploaded to your Raspberry Pi desktop.

     

    Pi2PC

    THe following steps allow you to transfer a file from your Raspberry Pi to your personal compter or laptop.  You should set up a destination folder in your PC before you start sending files.

     

    clipboard_e17524bf715efe258fe0f61adc3d61bf2.pngFigure \(\PageIndex{1}\): Copy and Paste Caption here. (Copyright; author via source)
    1. Right Click on VNC icon
    2. Choose the "File Transfer" option
    3. Choose "Send Files"
    4. Navigate to the directory of the file you want to send
    5. Click OK
    6. Choose the destination directory on your PC
    7. Choose Send Files.

    VNC Issues

    Sometimes you lose the VNC Icon and can not transfer files. This is because you are running WayVNC server on the pi and not RealVNC Server. To fix this you must operate on Desktop mode as you will be disconnecting VNC. start by typing:

    sudo raspi-config

    this opens the configuration tool and choose:

    • 6 Advanced Options
    • A6 Wayland
    • W1 X11
    • finish and reboot
    clipboard_ec85961e37e7c4ff0466984aa38611220.pngFigure \(\PageIndex{1}\): Copy and Paste Caption here. (Copyright; author via source)

     

     Once you reboot you need to restart VNC Viewer, which you can do from the configuration tool or from preferences.  In the case of the configurationt tool choose

    • 3. Interface Options
    • I2 VNC
    • Yes
    • finish
    •  

    This page titled 6: Headless Mode - VNC Viewer is shared under a not declared license and was authored, remixed, and/or curated by Robert Belford.

    • Was this article helpful?