Main Menu

search

You are here

VNC & VPN

[last updated: 2025-09-19]
Disclaimers
...some future link...
----------

      Still in edit...




      On This Page:
  • Introduction
  • Install Client and Server software
  • Operation:
    • Open/launch tiger
    • Run multiple VNC sessions at the same time
    • use script files to initiate a VNC session
      (still just very rough notes...)
    • Links
    • addendum, un-sorted notes
      from trying different options on different rpi's...


---------------------------------------------------------

    Introduction:
  • VNC and VPN are software tools that are used to allow two computers to talk to each other.
  • A VNC - "Virtual Network Connection" allows you to connect to another (remote) computer with your own (local) computer,
    and your keyboard will operate the remote computer, and your monitor screen will show the output of the remote computer.
    It's as if you're sitting in front of the remote computer, even though in fact you're in front of your own local computer.
      Both the local and remote computers must be on the same network.

  • A VPN - "Virtual Private Network" allows you to connect to some other network via the internet, so that you can access files etc located on that network.
    (It may be, not sure that...) If you want to talk to a computer that is on a different network, then you will first need a VPN, but then you'll also need a VNC if you want to actually control/exercise the remote computer.
    -----

      This page so far only considers VNC's.

    ----------

  • I want to operate a raspberry pi (or Inovato hamclock) from my PC/desktop computer,
    because I do zoom calls on my PC, and I want to share my rPi or hamclock screen on the zoom call.
      There may be several ways to do this, but the two I know about are:

    • Use "Raspberry Pi Connect"
    • (see link below). I have not investigated this and have no info on it at this time.
      Initial investigation suggests that Raspberry Pi Connect uses the RealVNC software.
        I don't want to use RealVNC, because I don't want to use their "cloud" for connection.
        So I won't be using this option.
    • Install "client" and "server" software.

    ---------------------------------------------------------

    Install client and server software:

  • Install "client" software on your local/host/client PC:
    I'll be using TigerVNC.
    • Linux menu --> software manager --> Tigervnc-viewer (1.13.1) --> install

    ----------

  • Install/enable "server" software on the remote/rPi:
    • This is my tentative understanding of how this works...

    • my rPi's with bookworm seem to have both wayvnc server and RealVNC server installed.
      Somehow, RealVNC has priority.

    • To use VNC, you must first "enable" some server.
      You can do this two ways:
      • GUI:
        rPi menu --> Preferences --> rPi configuration --> Interfaces
        click VNC slider at far right of the VNC line
        click OK, reboot.
      • CLI:
        $ sudo raspi config
        select Interface Options
        select VNC - Yes
        enter --> escape

      As I said, RealVNC seems to somehow have priority over wayvnc,
      so when you enable VNC in either of these ways,
      RealVNC is the server that gets enabled.


      So given that I want to use wayvnc instead, I must first completely uninstall RealVNC.

      --------------------------------

    • After you have enabled the VNC server on your rPi,
      you must find the IP address of your rPi
      (though using the rPi's hostname will supposedly work as well, but I haven't tried it...)
        On bootup, in the box that shows in the upper right corner announcing your wifi connection,
        your IP address will be listed. After bootup, hovering the mouse over the wifi icon in the task bar/panel will show it again.
          On my rPi-05 it is: 192.168.1.105
          Inovato: IPv4 = 192.168.1.70

      ===========================================================

        Once enabled, you can access your WayVNC configuration at: /etc/wayvnc/.

    ..........

  • Install server on the Inovato:
    The Inovato (at least my version) came with server software installed and running with hamclock.
    No further setup or config was necessary.
    The setup screens, or right-click on wifi logo upper right corner --> connection information
    will list the IP address of the Inovato. Record this.
      IPv4 = 192.168.1.70

---------------------------------------------------------

  • Operation:
    • Open/launch tigervnc viewer on your host/client:
      On your host/client PC,
        from terminal: $ vncviewer
        or perhaps: $ xtigervncviewer
        or: linux menu --> TigerNVC viewer

      box opens, enter IP address,

    • It may then offer a warning dialogue box related to unregistered certificates. Click Yes to proceed.
      It will then require you to enter a username and password for the remote computer.
    • A new browser window will open that contains the screen of your remote computer. Your mouse and keyboard will then operate that remote computer.
      On my system, both the Inovato and rPi came up immediately. Very easy.

    • Running multiple VNC sessions at the same time:
      • On my MinisForum mini with Linux Mint 22.2, the process was transparent and just worked
        by just going to Linux menu --> tigerVNC viewer --> entering the additional IP address etc.
      • If you're using the CLI,
          $ vncviewer

        Open a new terminal and repeat for each remote you want to talk to.

    • Script files:
      • These are executable files on your host PC, that open a vnc connection to a chosen remote computer
        For convenience they are often placed on your desktop.
        They are plain text files, with a .sh extension.
        You must make them executable either in file manager --> properties --> permissions
        or in terminal: $ chmod [filename] o: +x (or something similar - check this syntax...)
      • Basic script:
          #!/bin/bash
          # Define VNC server details
          VNC_HOST="192.168.1.105"
          VNC_DISPLAY=":0" # Or other display number, e.g., ":0"
          # Open the VNC session
          vncviewer "${VNC_HOST}${VNC_DISPLAY}"


          You can also use the remote host name:

            VNC_HOST="raspberrypi"

          This all works, but requires you to enter username and password for the remote computer.

      • Passing username and password in script file:
        • Install a VNC password management tool:
          I'm using tigerVNC-viewer, so I installed TigerVNC-tools (from software manager).
          this tool set contains the vncpasswd utility needed.
        • When you execute $ vncpasswd,
          you're prompted to enter a password.
          This is the password for the remote computer that you are going to pass to create the VNC connection.
          Don't be fooled by the entry field: no characters will appear.
          It will then ask if you want a "view-only" password. Didn't know what this was, said no.
          A new file will be created, named "passwd" with no extension, in your home/.vnc directory.
          I renamed it for convenience.
        • ...
        • tried: $ vncviewer, manually entered username and password, works
        • tried: $vncviewer -passwd ~/.vnc/passwd_rPiHam_jay (after having created that passwd file...)
          worked, but still had to enter username and password, as well as connect prompt and certificate error prompt...

    ---------------------------------------------------------

  • Links:
    https://www.raspberrypi.com/documentation/computers/remote-access.html
    https://picockpit.com/raspberry-pi/tigervnc-and-realvnc-on-raspberry-pi-...
    ---------------------------------------------------------
    ---------------------------------------------------------

      ADDENDUM:

    • Trials:
      • Getting VNC working on several rPi's:
      • After some messing around, I intend to have the following configuration:
          RealVNC (server) removed from the rPi (I don't want to use their cloud)
          rPi built-in wayvnc server enabled
          TigerVNC viewer installed on host/client
          Screen resolution set (wherever) so that when the VNC window opens on the host, it's full-screen

      • rPi-07 (Pi 3 B+):
        SD-25 w/ bookworm 12.7 installed
        IP: 192.168.1.160
        hostname:
        username:
        pw:
        RealVNC installed

      • rPi-05 (Pi 4)
        SD-08 w/ bookworm...
        IP: 192.168.1.105
        hostname:
        username:
        pw:

      • rPi-04 (Pi 3 B+)
        SD-13 ...
        IP: 192.168.1.170
        hostname:
        username:
        pw:

    ---------------------------------------------------------


    eof