How To: Running OpenTAP's Community Edition editor (GUI) on Ubuntu 20.04

Recently I wanted to run the Community Edition of OpenTAP editor on Ubuntu 20.04. I did some digging and got it to work using WINE 7, which is a Windows emulation system that runs on Linux.

The following script will install the necessary bits on a clean Ubuntu 20.04 VM:


# enable 32-bit 
sudo dpkg --add-architecture i386 

# add key for wine packages 
sudo wget -nc -O /usr/share/keyrings/winehq-archive.key 
# add wine packages to get wine 7 
sudo wget -nc -P /etc/apt/sources.list.d/ 
sudo apt update 

# install wine 
sudo apt install winehq-stable winetricks winbind -y  

# initiliaze the default wine environment (default prefix)
WINEDLLOVERRIDES=mscoree=d wineboot --init 

# download updated winetricks version 20220411 (includes Consolas font)
chmod +x winetricks

# install .NET 4.8 
./winetricks -q dotnet48 

# disable .NET CLR Optimization service, as it hangs occasionally
wine reg ADD "HKLM\\System\\CurrentControlSet\\Services\\clr_optimization_v4.0.30319_32" /v Start /t REG_DWORD /d 4 /f
wine reg ADD "HKLM\\System\\CurrentControlSet\\Services\\clr_optimization_v4.0.30319_64" /v Start /t REG_DWORD /d 4 /f

# install .NET 6 Desktop x86/x64
wine ./windowsdesktop-runtime-6.0.8-win-x64.exe /install /quiet /norestart
wine ./windowsdesktop-runtime-6.0.8-win-x86.exe /install /quiet /norestart

# install fonts and directx
./winetricks -q corefonts dxvk155 d3dcompiler_47 consolas

# set the windows version to Windows 10 
winecfg /v win10 

# disable HW acceleration if running in a VM (PackageManager has issues) 
wine reg add "HKCU\\SOFTWARE\\Microsoft\\Avalon.Graphics" /v DisableHWAcceleration /t REG_DWORD /d 1 /f 

# download Windows OpenTAP 9.18.4 installer 

# install OpenTAP 
touch ./log.txt
wine ./OpenTAP.9.18.4.exe --quiet --bitness x64 &

# wait for OpenTAP install to finish
tail -f ./log.txt | sed '/Installation completed/ q'
kill $(pidof OpenTAP.9.18.4.exe)

# accept the OpenTAP Editor Community Edition EULA programmatically
wine reg add "HKCU\\SOFTWARE\\Keysight\\Test Automation" /v "EULA Accept" /t REG_SZ /d "Alan Copeland<>" -f

# install Editor CE
wine ~/.wine/drive_c/Program\ Files/OpenTAP/tap.exe package install -y 'Editor CE'

# add aliases to make running OpenTAP easy outside of the script
echo alias tap=\'wine ~/.wine/drive_c/Program\\ Files/OpenTAP/tap.exe\' | tee -a ~/.bashrc
echo alias tapeditor=\'wine ~/.wine/drive_c/Program\\ Files/OpenTAP/editor.exe\' | tee -a ~/.bashrc

In order to make it simple to install, I also made a gist on github here:

To install the script, you can run the following commands:

wget -O
chmod +x
# enter your sudo password

Then get some coffee, as it takes quite a while to install all the bits. Once its done, you can run the following commands:

# source your .bashrc to get these aliases:
source ~/.bashrc

# run the cli

# run the Community Edition editor

And it runs .tapplan’s!

Under the hood, the Windows bits are installed in ~/.wine/drive_c/Program Files/OpenTAP/

Let me know if you have questions or think of tests I should run!


Crazy cool! Way to push the limits @alan_copeland. And then go beyond!


Sweet! Could you follow a similar process to get some of the instrument IO working? Or maybe using PyVISA-py?

Good ideas, I’ll try!

1 Like

The Windows version of the IO Libraries Suite installer is “complex” and fails on kernel driver installs, so it seems like its blocked at this point.

Python 3.7.9 can be installed with:

wine ./python-3.7.9-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 
wine python --version

The OpenTAP plugin - Python 3.0.0-beta.34 seems to work ok.

Set your Python Settings to:

  • Python Library Path: C:\Program Fiels\Python37\libs
  • Python Path: C:\Program Files\Python37


You’ve blown my mind once again! :exploding_head: :exploding_head: :exploding_head: