Karton for VMs on KDE Plasma

Karton, a project by student Derek Lin, who participated in and won an award at the Google Summer of Code, will replace tools like virt-manager and GNOME Boxes as the go-to choice for KDE Plasma users.

A few weeks after the official development period began, Lin, the lead developer on the project, posted an update showing how the app is progressing as it nears a stable release.

See more articles from iGuRu.gr when you search for news on Google.

The first thing you need to know is that the virtual machine installer does not depend on virt-install. Karton will use libosinfo to identify the operating system from an ISO or VHD image and generate the necessary configuration as libvirt XML on its own.

Lin also updated QML modules, which are KDE's building blocks for creating user interfaces. These are now used for a more formal way of managing application components.

However, most of the recent work has focused on building a SPICE client from scratch. SPICE, if you don't know, is a remote desktop protocol that handles the guest's display, audio, and input. Lin said he spent a lot of time just getting the virtual machine's screen to display properly inside a native KDE window.

After trying different ways to handle the image data, he discovered that the root cause was a timing issue: his code was trying to read the display data at the same time that SPICE was trying to write it, causing chaos. The solution was pretty simple: he just made a quick copy of the data before displaying it, and it ended up looking much better:

So after rendering the screen, it prepares user actions, such as mouse clicks and keyboard strokes, so that they now work smoothly in the virtual machine.

A small headache is that Qt key events use evdev scancodes, while SPICE expects the older PC XT format, forcing a manual mapping (for now).

So after months of hard work, he published a video of Karton running a Fedora virtual machine:

In the video, things are quite slow, but this will be addressed in a future update.

As for what's next, Lin acknowledges that the current rendering method is inefficient. He hopes to explore SPICE's gl-scanout property for better performance.

If you're interested in the project, you can check out its GitLab page and read Lin's announcement on the KDE blog.


Google preferences

Leave a Comment

Your email address will not be published. Required fields are marked *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).