
This post comes from my private notes, so it could be some data is missing. Please, let me know and I will add it to the post.
It all started because MounRiver Studio 2, based on vscode (Visual Studio Code), stopped working after upgrading from Fedora 41 to 42. I find the procedure described above has several advantagesn:
- Allows running MounRiver Studio 2 in any Linux distro
- Prevents pollution of you system by encapsulating all packages needed within a container.
Everything works, including the USB debugger. My notes start below, let me know if this was useful!
Epic adventure to make “Mounriver Studio 2 V210” (MRS2) based on vscode work on #Fedora 42.
Background: After updating to Fedora 42 from Fedora 41, MRS stopped working because of some incompatibility. I tested that running Fedora 41 in a VM machine, MRS2 ran without problems.
The first workaround was to work using the Windows version of MRS2 in wine, but it was a bit slow. This would have been the easiest solution.
podman (or docker!) can be used to run the application within a container locally, emulating Fedora 41, which it was kwnon to work before the update. This has the advantage of being much faster and efficient than running the windows version in Wine or a full virtual box emulation with Gnome Boxes.
Steps taken to make it work:
Downloaded “MounRiverStudio_Linux_X64_V210.tar.xz” and extracted it in ~/home/Downloads/MRS2
such that the folders beforeinstall and MRS-linux-x64
are in the MRS2 folder
Created a Dockerfile inside MRS2
that pulls a Fedora 41 image, and installs gtk3, xorg and other dependencies needed by MRS2. It also includes some lines for stability and for permission and user management. It also runs the start.sh
file within the folder beforeinstall
automatically, as part of the MRS2 installation procedure:
FROM fedora:41
# Install all dependencies
RUN dnf install -y gtk3 libXtst xorg-x11-server-Xorg xorg-x11-xauth \
mesa-libGL libusbx util-linux-user dbus-x11 libxkbcommon-x11 \
libXdamage libXfixes libXcomposite libXrandr libXcursor libXi \
libXext libXrender libXt libXxf86vm libxcb libX11 libXau libXdmcp \
mesa-dri-drivers mesa-vulkan-drivers
# Set environment variables for stability
ENV QT_AUTO_SCREEN_SCALE_FACTOR=0
ENV QT_SCALE_FACTOR=1
ENV GDK_SCALE=1
ENV GDK_DPI_SCALE=1
ENV CLUTTER_DISABLE_LEGACY_FULLSCREEN=1
ENV DISABLE_WAYLAND=1
# Create user and set up environment
RUN useradd -m mrsuser && \
echo "export XDG_RUNTIME_DIR=/tmp/runtime-mrsuser" >> /home/mrsuser/.bashrc && \
echo "export QT_QPA_PLATFORM=xcb" >> /home/mrsuser/.bashrc && \
echo "export QT_X11_NO_MITSHM=1" >> /home/mrsuser/.bashrc && \
mkdir -p /tmp/runtime-mrsuser && \
chown mrsuser:mrsuser /tmp/runtime-mrsuser
# Copy beforeinstall directory
COPY beforeinstall /beforeinstall
COPY MRS-linux-x64 /MRS-linux-x64
# Run the setup script
RUN cd /beforeinstall && chmod +x start.sh && ./start.sh
Run podman build -t mrs2-image -f Dockerfile .
to create the docker/podman image mrs2-image
in our system
Enable X11 forwarding in console: xhost +local:
Run the image with the following command:
podman run -it --replace --name mrs2 \
-v ~/Downloads/MRS2/mrs2_home:/home/mrsuser:Z \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /run/user/$(id -u):/run/user/$(id -u) \
--device /dev/dri \
--device /dev/usb \
--device /dev/bus/usb \
--security-opt label=disable \
--userns=keep-id \
--memory=4g \
--cpus=4 \
--shm-size=256m \
-e DISPLAY=$DISPLAY \
-e XDG_RUNTIME_DIR=/tmp/runtime-mrsuser \
-e QT_QPA_PLATFORM=xcb \
-e QT_X11_NO_MITSHM=1 \
-e QT_AUTO_SCREEN_SCALE_FACTOR=0 \
-e GDK_BACKEND=x11 \
mrs2-image /bin/bash -c "/MRS-linux-x64/mounriver-studio\ 2"
After this, it is possible to add a the command above + the xhost +local:
command in to a single batch file (.sh) and create a desktop icon so that such a batch file is called.
