This is a case where the original X11 client server model would make perfect sense.
How to run GUI applications directly in containers
21–30 of 40 posts
Re: How to run GUI applications directly in containers
#22Is this solution different from just executing this: docker run -it --rm -e DISPLAY --net=host -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix debian:12-slim And then run the GUI app in the container? For example for Firefox: apt update apt install firefox-esr firefox That is an approach I sometimes use to try GUI applications in a Docker container.
> When you start a container instance, all you need to do is map the host's Wayland socket and PipeWire socket files into the container, and then set the appropriate environment variables within the container to enable running GUI applications.
Re: How to run GUI applications directly in containers
#23Re: How to run GUI applications directly in containers
#24Re: How to run GUI applications directly in containers
#25Is this solution different from just executing this: docker run -it --rm -e DISPLAY --net=host -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix debian:12-slim And then run the GUI app in the container? For example for Firefox: apt update apt install firefox-esr firefox That is an approach I sometimes use to try GUI applications in a Docker container.
Isn't this working just for X11?
Re: How to run GUI applications directly in containers
#26Using x11 :) the concept is nice, and could help isolate much more elegant than qubes for example. But the protocol sucks I’ve heard
Re: How to run GUI applications directly in containers
#27The container packages a VNC server, and you can access the container using a webVNC.
This seems like a great solution for non-GPU-intensive GUI apps.
Re: How to run GUI applications directly in containers
#28It's also occasionally convenient if I need to run a GUI app written in (say) Java that requires a zillion megabytes of JVM dependencies - just spin up an ephemeral container that makes everything disappear on CTRL-D.
Re: How to run GUI applications directly in containers
#29I don't want to be negative but Flatpak is a container runtime specifically designed for GUI apps and Docker isn't.
But doesn't flatpack offer much deeper system Integration by default? Like being able to access the home directory by default and being able to talk to dbus? To me flatpack looks like a way achieve application compatibility not security
Re: How to run GUI applications directly in containers
#30The linuxserver.io packaged a couple popular GUI apps in container, e.g. Calibre. The container packages a VNC server, and you can access the container using a webVNC. This seems like a great solution for non-GPU-intensive GUI apps.
Haven’t stuck around so I don’t know if VNC is still common to use locally on Android when you want to run other Linux distros with graphical environments on your device.
It worked but having to rely on VNC for something that is local on the same machine never felt great to me. Same when I VNC into a VM on the same host. It just feels a bit wrong to me to have to use VNC. It works and I do it sometimes for VMs on my computer, but I don’t like it.
The cool people do things like PCI passthrough. But I don’t have an extra graphics card and I haven’t looked much at the details of PCI passthrough anyways. Seems like a lot of effort also.
I do like X11 forwarding. I don’t know what to do for Wayland when it’s a VM.