I managed to run KasmVNC inside a container!

Hello,

I just used “BoxBuddy” to create a container with Fedora 39 and successfully installed the MATE Desktop and KasmVNC on it. This means I can remotely access this container and work inside it via a UI!

Here is the image I created

❯ distrobox ls
ID           | NAME                 | STATUS             | IMAGE                         
ed8a31b510bd | f39                  | Up 4 hours         | quay.io/fedora/fedora:39

KasmVNC has a Fedora 39 package which I successfully installed with sudo yum install kasmvncserver_fedora_thirtynine_1.3.1_x86_64.rpm

I then added my user to the certificate group sudo usermod -a -G kasmvnc-cert $USER in order to have access to the file /etc/pki/tls/private/kasmvnc.pem. though I noticed that I had to re-run su for the container-only group membership to be picked up, like this:

📦[myuser@f39 ~]$ sha256sum /etc/pki/tls/private/kasmvnc.pem
sha256sum: /etc/pki/tls/private/kasmvnc.pem: Permission denied
📦[myuser@f39 ~]$ su - myuser
📦[myuser@f39 ~]$ sha256sum /etc/pki/tls/private/kasmvnc.pem
edf182985e46d40b18bd9f8f87b5148727a7eea9b5f23cffbe953597c159c113  /etc/pki/tls/private/kasmvnc.pem

I then installed the MATE desktop with (note that you may need to disable the disk space check):

$ grep diskspacecheck /etc/dnf/dnf.conf 
diskspacecheck=False

$ sudo yum group install "MATE Desktop" --skip-broken

So at this point I created a user with vncpasswd and then ran vncserver -select-de mate as per the instructions which also included the above steps:

$ vncserver -select-de mate

Warning: f39.myhost:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server f39.myhost:1

New 'f39.myhost:2 (myhostuser)' desktop is f39.myhost:2

Users configured:
myvncuser (can use keyboard and mouse)
myhostuser (can use keyboard and mouse)

Log file is /home/myhostuser/.vnc/f39.myhost:2.log

Starting applications specified in /home/myhostuser/.vnc/xstartup

Paste this url in your browser:
https://fe80::ffcf:e465:d3cc:a2b0%wlp0s20f3:8445
https://fe80::64ba:4736:8fc0:833e%tailscale0:8445
https://192.168.9.133:8445

Well, surprisingly it worked! I am now in front of this screen, with a GUI running inside that container! I am playing a youtube video inside the container with a firefox running inside the container!

Headless remote desktop for everyone!

Of course I’ve only been using this for a minute. Remains to be seen how stable it is. Also curious to see how well it performs if I really log in remotely (this is currently a “same physical box” network connection).

Only problem so far: there is no sound on the YT video. I’ve no idea what this funny-looking guy might be talking about… :wink:

4 Likes

Why the yum command? dnf is ht epackage manager on Fedora.

I seem to have followed the instructions for CentOS. I guess you are right though: dnf is the proper way for a Fedora container.