How to test KDE in a container

I haven’t used containers before, but i’d like to test out KDE in a container on Workstation. I was wondering which steps i should take for this. I found this information about Distrobox:

but i’m not sure if Distrobox is the recommended approach for this, or if Toolbx would suffice?

The page above is based around a full Rawhide installation in a container and that is more than i’m looking to achieve. I would only like to have a minimal container with the KDE groupinstall, and add that to the DE selection on login.

Thanks for any tips!

That is highly experimental

You get easier just spin VM to be honest

Yep. I did once manage to get KDE running in an Arch distrobox, but it’s a pain. Also I don’t think I managed to make it run on login, I had to use plasmashell --replace or something to replace the currently running desktop.

If you still want to try, its probably a good idea to use the --home option when creating a new distrobox to make the container use a different folder as /home, preventing plasma in the container from messing up your config files.

Apart from installing systemd, I don’t see anything “full” about the guide’s approach. It should still be quite minimal. And feel free to use F40 (41 doesnt seem to be available yet) or anything else if you want rather than Rawhide.

So something like

distrobox create --name fedora-kde --init --additional-packages "systemd" --image registry.fedoraproject.org/fedora-toolbox:40 --home ~/boxhome/fedora-kde/

to create the container.

Now where’s the fun in that? :wink:

Yes i meant that it includes a Fedora Rawhide installation and i don’t really need that. But if F41 isn’t available then maybe Rawhide would still be the best option.

Thanks guys.

1 Like

I just tried this again and KDE works alright (in a window, I couldn’t be bothered to make it run from the login screen).

Obviously youll need distrobox:

sudo dnf install distrobox

I forgot about including systemd, but looks like it works fine anyway. Maybe needed for running at login. This should install F41, but otherwise feel free to use fedora-toolbox:rawhide or another distro:

distrobox create fedora-kde --home ~/boxhome/fedora-kde/ -i fedora-toolbox

Enter the container:

distrobox enter fedora-kde

It may take a little while the first time. Once you’re in the container, install KDE Plasma:

sudo dnf install plasma-workspace

Now you could try Plasma with startplasma but I couldn’t change the size of Plasma’s window on GNOME, and it bugged out with Wayfire and labwc.
But good old Openbox worked. Exit the container with exit or Ctrl-D, and run

sudo dnf install openbox

Log out and log in to openbox. Right click anywhere to open a menu. Open a terminal and distrobox enter fedora-kde and startplasma again, and you should have a nice resizable window with your new favourite desktop running inside. I don’t know how to make it appear fullscreen, but Openbox’s window borders are quite thin so when maximised its almost fullscreen, though hot corners wont really work.

I suspect that if you leave out the distro parameter it will use F41 instead, have you tried that?

It appears that you are right. I thought it would be rawhide, since when I type distrobox create -i in bash and then press tab, I dont see fedora 41 in the list.