The Raspberry Pi 5 is a powerhouse. This makes it possible to install Wine and use programs like Vara.
Before you dive into this blog post, I recommend reading the following blog post first: https://dl1gkk.com/raspberry-pi-ham-radio-best-practice-2026
⚠️ IMPORTANT: Read Before You Build!
Before blindly following the steps in this guide, please read the entire post to the end. This is especially crucial if you plan to operate your Raspberry Pi “headless” (without an external monitor) via VNC. Pay close attention to OPTIONAL-2 at the bottom of this article, as you will need to apply certain Wine settings while you are still connected to a physical monitor. Save yourself the headache and plan ahead!
“After days of intense testing, I’ve found that for a reliable Ham Radio station on the Raspberry Pi 5, Raspberry Pi OS Bookworm (32-bit) is the superior choice. While 64-bit systems and ‘Trixie’ are cutting-edge, they introduce significant compatibility issues with legacy radio software. By choosing the stable 32-bit Bookworm release, we ensure native support for 32-bit binaries and a proven 4k page size environment, making the installation of VARA HF, Pat, and Hamlib rock-solid and reproducible.”
Part 1: The Foundation – Wine (32-bit) on Raspberry Pi 5
The Raspberry Pi 5 is a beast, but its native 64-bit architecture and 16k memory page size are completely incompatible with legacy 32-bit Windows programs like VARA. To fix this, we force the Pi into a stable 32-bit/4k environment and build our own engine (Box86) and gearbox (Wine 8.0) from scratch. No flakey automated scripts here—just a hand-picked, rock-solid setup.
1: Pouring the Foundation (Kernel & Memory)
After the reboot, we force the architecture to 32-bit/4k pages and expand the swap space for the build process.
Force 4k Pages & 32-bit:
sudo sed -i 's/$/ arm_64bit=0/' /boot/firmware/cmdline.txt
echo "kernel=kernel8.img" | sudo tee -a /boot/firmware/config.txt
Increase Swap Space (to 2GB):
sudo dphys-swapfile swapoff
sudo sed -i 's/CONF_SWAPSIZE=100/CONF_SWAPSIZE=2048/g' /etc/dphys-swapfile
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
Install Build Tools:
sudo apt install -y cmake build-essential git
Reboot & Quality Check:
sudo reboot
IMPORTANT: After booting, type getconf PAGESIZE in the terminal. If it returns 4096, your foundation is perfectly level.
2: Building the Engine (Box86 Emulator)
We compile our own 32-bit translator, tailored specifically for this system.
cd ~
git clone https://github.com/ptitSeb/box86.git
cd box86
mkdir build; cd build
cmake .. -DRPI4=OFF -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j2
sudo make install
sudo systemctl restart systemd-binfmt
(Note: We use -j2 to limit CPU cores, ensuring we don’t run out of RAM during the build).
Engine Test: Type box86 -v. If you see a version number and date, the engine is running smoothly.
3: Installing the Gearbox (Wine 8.0 Portable)
We avoid newer Wine 9.x versions as they currently crash on the Pi 5. We use the stable 8.0 “Portable” version installed directly in our home directory.
Load Required Libraries:
sudo apt install -y libx11-6 libfreetype6 libasound2 libgl1-mesa-glx
Download & Unpack Wine 8.0 (32-bit):
cd ~
wget https://github.com/Kron4ek/Wine-Builds/releases/download/8.0/wine-8.0-x86.tar.xz
tar -xf wine-8.0-x86.tar.xz
rm wine-8.0-x86.tar.xz
Turn the Key (Initialization):
WINEARCH=win32 ~/wine-8.0-x86/bin/winecfg
- Note: If Wine asks to download Mono or Gecko, click Install.
- In the configuration window, set the Windows Version to Windows 10 (bottom right) and click OK. Ignore any “fixme” errors in the terminal.
Part 2: Interior Construction – Installing VARA HF on the Pi 5
With our foundation set, the Box86 engine humming, and our Wine 8.0 (32-bit) gearbox ready, it’s time to install the actual modem: VARA HF. Since VARA was written in Visual Basic 6 and has a small bug regarding CPU queries on ARM processors, we need to prep our workbench before running the installer.
1. Gathering Materials and Special Tools
First, we fetch the installer and the necessary tools to unpack legacy Windows packages under Linux.
Download VARA: Open Chromium on your Pi, download the latest VARA HF ZIP file (e.g., from EA5HVK), and save it to /home/pi/Downloads.
Unzip the Files:
cd ~/Downloads
unzip VARA*.zip
Install the Unpacking Tool (cabextract):
sudo apt install -y cabextract
2. Applying the Primer (Visual Basic 6 Runtime)
Without this “primer,” VARA lacks the components to draw its interface, causing the setup to fail silently. We use winetricks to add the missing pieces.
Get Winetricks ready:
cd ~
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
Install the VB6 Runtime:
(This command downloads the official Microsoft package. Simply click through any confirmation windows that appear).
env WINE=~/wine-8.0-x86/bin/wine WINEARCH=win32 ./winetricks vb6run
3. Installing VARA HF
Now the site is prepped, and we can launch the actual setup.
Check the exact filename:
cd ~/Downloads
ls
(Note the exact name, e.g., VARA_HF_setup.exe).
Run the Installer: (Replace the placeholder with your filename):
WINEARCH=win32 ~/wine-8.0-x86/bin/wine YOUR_FILENAME_HERE.exe
Follow the Setup:
- Click through the Windows setup as usual.
- The Golden Rule: In the very last window, UNCHECK the box “Launch VARA” before clicking “Finish”! We must disable a specific sensor first.
4. Preventing the Crash (Disabling pdh.dll)
VARA has a minor CPU usage display. This specific query is incompatible with the Pi 5’s ARM architecture and will crash the program immediately. We simply “disconnect” this sensor in the registry.
Disable the Sensor:
WINEARCH=win32 ~/wine-8.0-x86/bin/wine reg add "HKCU\Software\Wine\DllOverrides" /v pdh /t REG_SZ /d "" /f
(The terminal should confirm with “The operation completed successfully”).
5. Final Inspection (First Start)
The system is ready. Let’s turn the key.
cd ~
WINEARCH=win32 ~/wine-8.0-x86/bin/wine ~/.wine/drive_c/VARA/VARA.exe
The VARA interface should now open cleanly and without errors on your screen!
Part 3: The Radio Interface – Hamlib, Pat & PTT Control
VARA HF is now running. Now we close the loop: Radio <-> Hamlib <-> Pat <-> VARA HF. Since VARA cannot control your radio directly under Linux, we use Hamlib as the translation office and Pat as our command center.
1. Setting up the Translation Office (Hamlib)
We install the control library so the Pi learns how to communicate with amateur radio transceivers.
Install Hamlib:
sudo apt install -y libhamlib-utils
Check Model Number and Port:
Search the list for your device (e.g., Elecraft):
rigctl -l
(The Elecraft KX2 uses model number 2044).
Check which port your interface (e.g., LiNK500) is assigned to:
ls -l /dev/serial/by-id
(Note the port, usually /dev/ttyUSB1 for CAT control).
Start the Hamlib Server (rigctld):
IMPORTANT for KX2/LiNK500: To prevent the radio from immediately keying the PTT upon startup, we must disable RTS and DTR:
rigctld -m 2044 -r /dev/ttyUSB1 -s 38400 --set-conf=dtr_state=OFF,rts_state=OFF &
Function Test (Query Frequency):
Ask for the current frequency to confirm the connection:
rigctl -m 2 f
2. Building the Command Center (Pat)
Pat is the application that manages your Winlink emails and controls both the VARA modem and the PTT.
Download and Install Pat:
cd ~/Downloads
wget https://github.com/la5nta/pat/releases/download/v0.16.0/pat_0.16.0_linux_armhf.deb
sudo dpkg -i pat_0.16.0_linux_armhf.deb
3. Configuration (The Heart of the System)
The first time you run pat configure, it creates a config file and opens the editor. Enter your data and hardware links here.
Open Config File:
pat configure
Adjust Entries:
Find the corresponding lines and fill them in exactly as shown (pay attention to the commas at the end of the lines!):
A) Your Basic Data:
"mycall": "YOURCALL",
"secure_login_password": "YOURWINLINKPASSWORD",
"locator": "YOURLOCATOR",
B) Radio Connection (hamlib_rigs):
We name the connection “KX2” and point it to the Hamlib server:
"hamlib_rigs": {
"KX2": {
"address": "localhost:4532",
"network": "tcp"
}
},
C) VARA Modem Control (varahf):
Link Pat to VARA and tell it that the rig “KX2” should handle the PTT:
"varahf": {
"addr": "localhost:8300",
"bandwidth": 2300,
"rig": "KX2",
"ptt_ctrl": true
},
Save with Ctrl+O (Enter) and exit with Ctrl+X.
4. The “Powerday” Test Run
For your first successful connection, strictly follow this startup sequence:
- 1. Hamlib Server:
rigctld -m 2044 -r /dev/ttyUSB1 -s 38400 --set-conf=dtr_state=OFF,rts_state=OFF & - 2. VARA HF:
WINEARCH=win32 ~/wine-8.0-x86/bin/wine ~/.wine/drive_c/VARA/VARA.exe - 3. Pat Interface:
pat http
Connect: Open your browser (http://localhost:8080), select VARA HF, enter a target station (e.g., HB9ZF), and click Connect.
Part 4: One-Click Mission Control – Automation with Menu Shortcuts
Once the technical setup is rock-solid, the next logical step for any efficient operator is automation. You don’t want to type multiple commands into the terminal every time you want to get on the air. We are going to build professional “Main Switches” directly in your Raspberry Pi application menu for a clean Start and a safe Shutdown.
1. The “Start Switches” (Modular Control)
Instead of one giant script, we use dedicated menu entries. This allows you to choose between VARA HF or ARDOP depending on the situation, while keeping the background services (Rig Control) separate.
Step 1: Create the Rig Control Starter (Rigctld)
This initializes the Hamlib server for your KX2/KX3.
nano ~/.local/share/applications/winlink-rig.desktop
Paste the following (adjust your -m model and -r port if necessary):
[Desktop Entry]
Name=Start Rig Control (KX2)
Exec=rigctld -m 2044 -r /dev/ttyUSB1 -s 38400 --set-conf=dtr_state=OFF,rts_state=OFF
Icon=network-transmit
Terminal=true
Type=Application
Categories=HamRadio;
Step 2: Create the VARA HF Starter
nano ~/.local/share/applications/winlink-vara.desktop
[Desktop Entry]
Name=Start VARA HF
Exec=bash -c "WINEARCH=win32 ~/wine-8.0-x86/bin/wine ~/.wine/drive_c/VARA/VARA.exe"
Icon=utilities-terminal
Terminal=false
Type=Application
Categories=HamRadio;
Step 3: Create the Pat Winlink Starter
This starts the Pat engine and automatically opens your dashboard in Chromium.
nano ~/.local/share/applications/winlink-pat.desktop
[Desktop Entry]
Name=Start Pat Dashboard
Exec=bash -c "pat http & sleep 3 & chromium-browser http://localhost:8080"
Icon=applications-internet
Terminal=false
Type=Application
Categories=HamRadio;
2. The “Stop Switch” (Emergency Shutdown)
When you are done, you want to leave your “workshop” clean. This command kills all running processes simultaneously, ensuring no “zombie” processes keep blocking your serial ports or audio devices.
Create the Global Stop Entry:
nano ~/.local/share/applications/winlink-stop.desktop
Paste the following “Master Switch” content:
[Desktop Entry]
Name=STOP ALL Winlink
Exec=bash -c "pkill pat; pkill rigctld; pkill VARA.exe; pkill ardopc; sudo pkill kissattach; wineserver -k"
Icon=process-stop
Terminal=true
Type=Application
Categories=HamRadio;
Step 4: Finalize the Starters
Make all new menu entries executable with one command:
chmod +x ~/.local/share/applications/winlink-*.desktop
Pro-Tip: You will now find all these tools in your Raspberry Pi menu under the “HamRadio” category. For the smoothest workflow, start them in order: Rig Control -> Modem (VARA or ARDOP) -> Pat Dashboard. When finished, one click on STOP ALL cleans the entire station.
OPTIONAL-1: The Ultimate Backup – ARDOP & Robust Packet
A true professional never goes to a job site without backup tools. If the VARA network is out of reach, an ARDOP gateway or a Robust Packet Radio (RPR) connection via your LiNK500 TNC is your life insurance. Here is how we add these two native Linux tools for maximum redundancy.
1. Adding the ARDOP Modem
Unlike VARA, ARDOP runs natively on Linux—no Wine or emulator required. It’s a lightweight and robust alternative for HF Winlink.
Step 1: Download and Install
cd ~/Downloads
wget https://www.cantab.net/users/john.wiseman/Downloads/Beta/piardopc
chmod +x piardopc
sudo mv piardopc /usr/local/bin/ardopc
Step 2: Identify Your Soundcard
ARDOP needs the hardware ID of your LiNK500 audio interface. Run aplay -l and look for “USB PnP Sound Device”. If it’s card 2, device 0, your ID is 2,0.
Step 3: Configure Pat for ARDOP
pat configure
Update the "ardop" section (ensure "rig" matches your radio name, e.g., "KX2"):
"ardop": {
"addr": "localhost:8515",
"arq_bandwidth": {
"Forced": false,
"Max": 500
},
"rig": "KX2",
"ptt_ctrl": true,
"beacon_interval": 0,
"cwid_enabled": true
},
2. Adding the LiNK500 TNC (AX.25 Packet Radio)
For VHF/UHF Packet or Robust Packet on HF, we use the LiNK500’s hardware TNC. AX.25 is built directly into the Linux kernel; we just need to “attach” it.
Step 1: Install AX.25 Tools
sudo apt install -y ax25-tools ax25-apps
Step 2: Configure the Port (axports)
sudo nano /etc/ax25/axports
Add this line at the bottom (replace DL1GKK-10 with your callsign and SSID):
link500 YOURCALL-10 9600 255 2 LiNK500 RPR KISS
Step 3: Configure Pat for AX.25
In pat configure, update the "ax25" section:
"ax25": {
"port": "link500",
"beacon": {
"every": 0,
"message": "",
"destination": "IDENT"
}
},
3. Updating the Automation & Menu
To keep it “Handwerk-style” (simple and fast), we update our start/stop scripts and the menu entries.
Create the ARDOP Menu Shortcut:
nano ~/.local/share/applications/ardop-modem.desktop
Paste this (adjust plughw:2,0 to your ID):
[Desktop Entry]
Name=Start ARDOP Modem
Exec=bash -c "/usr/local/bin/ardopc 8515 plughw:2,0 plughw:2,0"
Icon=utilities-terminal
Terminal=true
Type=Application
Categories=HamRadio;
Update your Global Stop Switch:
Open your stop script or desktop file and ensure it kills both new processes:
nano ~/.local/share/applications/winlink-stop.desktop
Update the Exec line:
Exec=bash -c "pkill pat; pkill rigctld; pkill VARA.exe; pkill ardopc; sudo pkill kissattach; wineserver -k"
Pro-Tip: To use Packet Radio, you must “attach” the TNC once per session via terminal:
sudo kissattach /dev/ttyACM0 link500 10.1.1.1. After that, Pat can talk to your LiNK500 directly via the AX.25 stack.
OPTIONAL-2: Wine and VARA headless in a virtual desktop
Operating a Raspberry Pi 5 “headless” (without a monitor) via VNC presents a challenge for Wine-based applications like VARA HF. By default, the Pi 5’s graphics stack doesn’t initialize fully without a physical display detection. This leads to two common issues: the resolution dropping to a tiny 1024×768, and VARA HF failing to render its interface (resulting in a frozen blue window).
To solve this, we spoof a monitor on the system level and force Wine into a “Virtual Desktop” mode. This ensures that VARA always has a defined canvas to draw on, regardless of whether a screen is plugged in or not.
Pro Tip: Perform the following Wine settings while your Pi is still connected to an external monitor. It makes the initial setup much easier!
- Open the Wine configuration:
env WINEARCH=win32 ~/wine-8.0-x86/bin/wine winecfg- Go to the Graphics tab and check “Emulate a virtual desktop”. Set the resolution to 800×600.
- Go to the Audio tab and explicitly select your sound card (e.g., CM108 or USB Audio Device) for both Input and Output. Do not leave it on “Default”.
1. Spoofing the Monitor (Kernel Level)
We need to tell the Pi to keep the HDMI port active even if no cable is detected.
sudo nano /boot/firmware/cmdline.txt
Add the following parameter at the end of the existing line (do not create a new line!):
video=HDMI-A-1:1920x1080@60D
2. Fixing the X11 Resolution
To prevent the resolution from snapping back to 1024×768 under X11, create a fixed monitor configuration:
sudo mkdir -p /etc/X11/xorg.conf.d/
sudo nano /etc/X11/xorg.conf.d/10-monitor.conf
Paste the following block:
Section "Monitor"
Identifier "HDMI-1"
Option "PreferredMode" "1920x1080"
Option "Primary" "true"
EndSection
Section "Screen"
Identifier "Screen0"
Monitor "HDMI-1"
DefaultDepth 24
SubSection "Display"
Modes "1920x1080"
EndSubSection
EndSection
3. Clean Start & Reboot
VARA saves its window position in its .ini file. If you previously used a large monitor, it might try to open outside the new 800×600 virtual desktop. Let’s reset it:
rm ~/.wine/drive_c/VARA/VARA.ini
sudo reboot
4. Creating Desktop Menu Entries
Typing long commands in the terminal during field operations is inefficient. Let’s create proper desktop shortcuts so you can launch Wine Config and VARA HF directly from the Raspberry Pi Application Menu.
For Wine Config: Open the terminal and create a new desktop entry:
nano ~/.local/share/applications/winecfg.desktop
Paste the following configuration:
[Desktop Entry]
Name=Wine Config
Exec=bash -c "env DISPLAY=:0 WINEARCH=win32 ~/wine-8.0-x86/bin/wine winecfg"
Icon=preferences-system
Terminal=false
Type=Application
Categories=HamRadio;Settings;
For VARA HF: Create the launcher file:
nano ~/.local/share/applications/varahf.desktop
Paste the following configuration (notice the LIBGL_ALWAYS_SOFTWARE=1 flag, which bypasses the sleeping graphics chip in headless mode):
[Desktop Entry]
Name=VARA HF
Exec=bash -c "cd ~/.wine/drive_c/VARA/ && env DISPLAY=:0 LIBGL_ALWAYS_SOFTWARE=1 WINEDEBUG=-all ~/wine-8.0-x86/bin/wine VARA.exe"
Icon=utilities-terminal
Terminal=false
Type=Application
Categories=HamRadio;
Finally, make both shortcuts executable:
chmod +x ~/.local/share/applications/*.desktop
You can now find them in your main Raspberry Menu under HamRadio or Settings.
OPTIONAL-3: FLRig for Visual CAT Control
While connecting rigctld directly to your transceiver’s USB port is the standard method, utilizing FLRig as a “middleman” offers significant advantages—especially in a graphical desktop environment.
The primary benefit is visual feedback. FLRig provides a dashboard showing your radio’s frequency, mode, and PTT status, making it instantly obvious if CAT control is working. FLRig exclusively manages the hardware connection (the USB port), preventing frustrating port conflicts, and Pat/VARA simply talk to FLRig.
1. How the “Adapter” Works
FLRig has a built-in server (XML-RPC) that is always running in the background on port 12345. You don’t even need to enable it in FLRig’s menus! However, Pat and VARA only understand the rigctld protocol.
Therefore, we still run the rigctld daemon, but we instruct it to act purely as a translator between Pat and FLRig. In the Hamlib library, FLRig is assigned the Model ID 4.
2. Updating your Startup Script
Instead of connecting rigctld to your hardware USB port, you connect it to FLRig’s local network port. Update your Winlink_Start.sh (from Part 4) to launch rigctld like this:
# 1. Start Hamlib Server as a translator for FLRig (Model 4)
rigctld -m 4 -r localhost:12345 -t 4532 &
(Make sure you start FLRig manually from your desktop before running this script, or simply add flrig & above the rigctld command in your script).
3. Updating the Pat Configuration
Open Pat’s configuration file:
nano ~/.config/pat/config.json
Since rigctld is still running on its default port (4532) and acting as the translator, your Pat configuration basically stays the same, but we rename the connection to “flrig” for clarity:
"hamlib_rigs": {
"flrig": {
"address": "localhost:4532",
"network": "tcp"
}
},
Finally, scroll down to the "varahf" section and update the "rig" property to match the new name:
"varahf": {
"addr": "localhost:8300",
"bandwidth": 2300,
"rig": "flrig",
"ptt_ctrl": true
}
Save (Ctrl+O) and exit (Ctrl+X). FLRig now handles all the heavy lifting with the radio hardware, while Pat and VARA comfortably send their commands through the translator.
Disclaimer: This setup was developed in collaboration with Gemini AI.
While we’ve worked hard to make this guide as “bulletproof” as possible, tech is always evolving—errors may occur, or specific functions might need a bit of extra tweaking.
The solution? Don’t hesitate to ask Gemini yourself if you get stuck. Good luck with your build!
