Running Qucs in Debian 11 via podman

Qucs is a nice "Quite Universal Circuit Simulator" along the lines of LTspice but it runs on Linux!

Unfortunately, Qucs requires Qt4, which has been deprecated. Debian completely removed Qt4 support from Debian 11 ("bullseye").

Fortunately, podman can be used to run a containerized version of qucs without issue. The Dockerfile below starts from a Debian 10 base image, installs the necessary dependencies for Qucs, downloads the version 0.0.20 source code, and compiles it.

FROM debian:buster
RUN apt update && apt install -y build-essential libqt4-dev libqt4-qt3support automake libtool gperf flex bison texlive-font-utils wget pkg-config libxml-libxml-perl && mkdir -p /opt/qucs && cd /opt/qucs
RUN wget -c https://github.com/Qucs/ADMS/releases/download/release-2.3.7/adms-2.3.7.tar.gz -O - | tar -xz && cd adms-2.3.7 && ./configure --prefix=/usr && make install
RUN wget -c https://sourceforge.net/projects/qucs/files/qucs/0.0.20/qucs-0.0.20-rc2.tar.gz/download -O - | tar -xz
RUN cd qucs-0.0.20 && ./bootstrap && ./configure --disable-doc && make -j 8 && make install
Dockerfile for running Qucs on Debian 11

The container can be ran from the command line:

podman run -it \\
           -v .:/data \\
           -e DISPLAY=:0 \\
           -v /tmp/.X11-unix:/tmp/.X11-unix \\
           -v /home/user/.Xauthority:/tmp/.XAuthority \\
           --env=QT_X11_NO_MITSHM=1 \\
           6fa55ff299d \\
           qucs

The launch command is fairly straightforward with some nuances for using an X11 application in the container.

-e DISPLAY=:0 sets the current X11 server within the docker container. The volume mounts of .X11-unix and .Xauthority map the X11 server sockets and authentication into the container. --env=QT_X11_NO_MITSHM=1 prevents Qt from using MIT-SHM extensions which require access to /dev/shm.

This method should extend to any program that requires Qt4, at least as long as Debian continues to provide apt support for buster.


Was this an interesting read? Say thanks and help keep this site ad & analytic free by using my Amazon Affilliate URL. I'll receive a small portion of any purchases made within 24 hours.