I am running Ubuntu MATE 20.04 LTS. I have installed Docker to this system.
I need to run FreeMat 4.2 which is not available for Ubuntu 20.04 LTS anymore because of Qt4 deprecation.
I did the following:
sudo apt-get install docker.io
sudo usermod -a -G docker $USER
# reboot
mkdir ~/docker-freemat
cat > ~/docker-freemat/Dockerfile << EOF
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y freemat
CMD freemat
EOF
docker build -t ubuntu:freemat ~/docker-freemat
To run FreeMat from container I'm using the following command:
docker run -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --user="$(id --user):$(id --group)" ubuntu:freemat
But the FreeMat window is non-functional, instead it looks like:
and terminal output is the following
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x14e
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x3200014
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3200015
...
How to get rid of this error and get application window shown normally and fully-functional?
Some notes:
- Changing
18.04
to16.04
or even14.04
in Dockerfile does not change anything - Installing Docker from docker.com does not change anything
--ipc="host"
make it work!!!