
This document is a continuation of RPI4 Trifecta: VARA, Packet & ARDOP â One Audio Interface, BPQ32 Rig Control â VOX and/or CAT PTT, RPI4: VARA & Syslog
Application as a Service
Running VARA/ARDOP/QtSoundModem as independent system services is ideal as it can help towards automation. For instance, if a TNC crashes or you need to shut down quickly it helps to have these prepared and ready to take over the repetitive and annoying tasks.
Let systemd take care of it. My systemd script forks a âscreenâ process to capture the console output for debug analysis at any time, and it forks via a script so that minor adjustments can be made without having to âsystemctl daemon-reloadâ all the time.
There are references to another system unit file âvvnc-modems.serviceâ, this is another systemd service that launches a virtual VNC desktop, to which VARA and the other modems with GUIs are thrown to.
This makes monitoring the modems a breeze because I donât have to keep them open on the main desktop all the time or if I do I can scale the window down with all of them in so that they are up in the top corner while I do other things.
Dependencies
Screen
sudo apt install screen
VNC Server and Viewer
Depending on your Linux distribution, you may have to tinker with different packages, for Raspbian Linux, RealVNC is provided for free. For other distributions, TightVNC or TigerVNC may be an option. Your mileage may vary but they should be compatible with this setup nonetheless.
sudo apt install realvnc-vnc-server sudo apt install realvnc-vnc-viewer
Below, all of the systemd unit files and start scripts are fully illustrated, if you want to download them ready-to-go, hereâs the ZIP archive, includes bonus wsjtx.service that will autostop all modems when manually started.
VARA Systemd Unit File
/lib/systemd/system/vara.service
[Unit] Description=VARA Start Script by PE1RRR After=vvnc-modems.service Wants=vvnc-modems.service [Service] Type=forking WorkingDirectory=/home/pi/bin Restart=always RestartSec=15 StartLimitInterval=60 StartLimitBurst=3 User=pi Group=pi ExecStart=/usr/bin/screen -S VARA-Console -d -m /home/pi/bin/startvara ExecStop=/usr/local/bin/wineserver -k SyslogIdentifier=VARA-Debug [Install] WantedBy=multi-user.target
VARA Start Script
/home/pi/bin/startvara
#!/bin/bash
cd /home/pi/bin
DISPLAY=:2
export DISPLAY
/usr/local/bin/wine /home/pi/.wine/drive_c/VARA/VARA.exe
ďťż
Virtual VNC Systemd Unit File
/lib/systemd/system/vvnc-modems.service
[Unit] Description=Shack Desktop Start Script by PE1RRR After=network.target [Service] Type=forking WorkingDirectory=/home/pi/bin Restart=always RestartSec=20 StartLimitInterval=60 StartLimitBurst=3 User=pi Group=pi ExecStart=/home/pi/bin/vvnc-modems SyslogIdentifier=Shack-VNC [Install] WantedBy=multi-user.target
Virtual VNC (re)Start Script
/home/pi/bin/vvnc-modems
#!/bin/bash vncserver -kill :2 vncserver :2 -geometry 1080x764
Initiating Systemd scripts
sudo systemctl enable qtsm sudo systemctl enable vvnc-modems sudo systemctl enable ardop sudo systemctl enable ardop-gui sudo systemctl enable vara sudo service vara start (any of the modems will start the vvnc-modems virtual desktop service automatically)
I do this for all of the modems, so each one is a service and can be stopped independently, or by calling a script that just goes through the motions:
/home/pi/bin/modems-off:
sudo service vara stop
sudo service qtsm stop
sudo service ardop stop
sudo service ardop-gui stop
/home/pi/bin/modems-on:
sudo service vara start
sudo service qtsm start
sudo service ardop start
sudo service ardop-gui start
If you find the articles, or content in general posted here useful, enjoyable or maybe even something else, please consider making a small contribution towards my hosting fund so that I may continue to provide my services for free to as many people as possible.