Skip to content

Welcome to Planet KDE

This is a feed aggregator that collects what the contributors to the KDE community are writing on their respective blogs, in different languages

Thursday, 25 April 2024

The Kubuntu Team is happy to announce that Kubuntu 24.04 has been released, featuring the ‘beautiful’ KDE Plasma 5.27 simple by default, powerful when needed.

Codenamed “Noble Numbat”, Kubuntu 24.04 continues our tradition of giving you Friendly Computing by integrating the latest and greatest open source technologies into a high-quality, easy-to-use Linux distribution.

Under the hood, there have been updates to many core packages, including a new 6.8-based kernel, KDE Frameworks 5.115, KDE Plasma 5.27 and KDE Gear 23.08.

Kubuntu 24.04 with Plasma 5.27.11

Kubuntu has seen many updates for other applications, both in our default install, and installable from the Ubuntu archive.

Haruna, Krita, Kdevelop, Yakuake, and many many more applications are updated.

Applications for core day-to-day usage are included and updated, such as Firefox, and LibreOffice.

For a list of other application updates, and known bugs be sure to read our release notes.

Download Kubuntu 24.04, or learn how to upgrade from 23.10 or 22.04 LTS.

Note: For upgrades from 23.10, there may a delay of a few hours to days between the official release announcements and the Ubuntu Release Team enabling upgrades.

In the two previous posts (Part 1 and Part 2), we looked at how to build bindings between C++ and Rust from scratch. However, while building a binding generator from scratch is fun, it’s not necessarily an efficient way to integrate Rust into your C++ project. Let’s look at some existing technologies for mixing C++ and Rust that you can easily deploy today.

bindgen

bindgen is an official tool of the Rust project that can create bindings around C headers. It can also wrap C++ headers, but there are limitations to its C++ support. For example, while you can wrap classes, they won’t have their constructors or destructors automatically called. You can read more about these limitations on the bindgen C++ support page. Another quirk of bindgen is that it only allows you to call C++ from Rust. If you want to go the other way around, you have to add cbindgen to generate C headers for your Rust code.

CXX

CXX is a more powerful framework for integrating C++ and Rust. It’s used in some well-known projects, such as Chromium. It does an excellent job at integrating C++ and Rust, but it is not an actual binding generator. Instead, all of your bindings have to be manually created. You can read the tutorial to learn more about how CXX works.

autocxx

Since CXX doesn’t generate bindings itself, if you want to use it in your project, you’ll need to find a generator that wraps C++ headers with CXX bindings. autocxx is a Google project that does just that, using bindgen to generate Rust bindings around C++ headers. However, it gets better—autocxx can also create C++ bindings for Rust functions.

CXX-Qt

While CXX is one of the best C++/Rust binding generators available, it fails to address Qt users. Since Qt depends so heavily on the moc to enable features like signals and slots, it’s almost impossible to use it with a general-purpose binding generator. That’s where CXX-Qt comes in. KDAB has created the CXX-Qt crate to allow you to integrate Rust into your C++/Qt application. It works by leveraging CXX to generate most of the bindings but then adds a Qt support layer. This allows you to easily use Rust on the backend of your Qt app, whether you’re using Qt Widgets or QML. CXX-Qt is available on Github and crates.io.

If you’re interested in integrating CXX-Qt into your C++ application, let us know. To learn more about CXX-Qt, you can check out this blog.

Other options

There are some other binding generators out there that aren’t necessarily going to work well for migrating your codebase, but you may want to read about them and keep an eye on them:

In addition, there are continuing efforts to improve C++/Rust interoperability. For example, Google recently announced that they are giving $1 million dollars to the Rust foundation to improve interoperability.

Conclusion

In the world of programming tools and frameworks, there is never a single solution that will work for everybody. However, CXX, CXX-Qt, and autocxx seem to be the best options for anyone who wants to port their C++ codebase to Rust. Even if you aren’t looking to completely remove C++ from your codebase, these binding generators may be a good option for you to promote memory safety in critical areas of your application.

Have you successfully integrated Rust in your C++ codebase with one of these tools? Have you used a different tool or perhaps a different programming language entirely? Leave a comment and let us know. Memory-safe programming languages like Rust are here to stay, and it’s always good to see programmers change with the times.

About KDAB

If you like this article and want to read similar material, consider subscribing via our RSS feed.

Subscribe to KDAB TV for similar informative short video content.

KDAB provides market leading software consulting and development services and training in Qt, C++ and 3D/OpenGL. Contact us.

The post Mixing C++ and Rust for Fun and Profit: Part 3 appeared first on KDAB.

For the past 8 days I’ve been in Berlin for what is technically four sprints: first a two-day KDE e.V. Board of Directors sprint, and then right afterwards, the KDE Goals mega-sprint for the Eco, Accessibility, and Automation/Systematization Goals! Both were hosted in the offices of KDE Patron MBition, a great partner to KDE which uses our software both internally and in some Mercedes cars. Thanks a lot, MBition! It’s been quite a week, but a productive one. So I thought I’d share what we did.

If you’re a KDE e.V. member, you’ve already received an email recap about the Board sprint’s discussion topics and decisions. Overall the organization is healthy and in great shape. Something substantive I can share publicly is that we posed for this wicked sick picture:

Moving onto the combined Goals sprint: this was in fact the first sprint for any of the KDE Goals, and having all three represented in one room attracted a unique cross-section of people from the KDE Eco crowd, usability-interested folks, and deeply technical core KDE developers.

Officially I’m the Goal Champion of the Automation & Systematization Goal, and a number of folks attended to work on those topics, ranging from adding and fixing tests to creating a code quality dashboards. Expect more blog posts from other participants regarding what they worked on!

Speaking personally, I changed the bug janitor bot to direct Debian users on old Plasma versions to Debian’s own Bug tracker—as in fact the Debian folks advise their own users to do. I added an autotest to validate the change, but regrettably it caused a regression anyway, which I corrected quickly. Further investigation into the reason why this went uncaught revealed that all the autotests for the version-based bug janitor actions are faulty. I worked on fixing them but unfortunately have not met with success yet. Further efforts are needed.

In the process of doing this work, I also found that the bug janitor operates on a hardcoded list of Plasma components, which has of course drifted out of sync with reality since it was originally authored. This causes the bot to miss many bugs at the moment.

Fellow sprint participant Tracey volunteered to address this, so I helped get her set up with a development environment for the bug janitor bot so she can auto-generate the list from GitLab and sysadmin repo metadata. This is in progress and proceeding nicely.

I also proposed a merge request template for the plasma-workspace git repo, modeled on the one we currently use in Elisa. The idea is to encourage people to write better merge request descriptions, and also nudge people in the direction of adding autotests for their merge requests, or at least mentioning reviewers can test the changes. If this ends up successful, I have high hopes about rolling it out more broadly.

But I was also there for the other goals too! Joseph delivered a wonderful presentation about KDE Eco topics, which introduced my new favorite cartoon, and it got me thinking about efficiency and performance. For a while I’d been experiencing high CPU usage in KDE’s NeoChat app, and with all the NeoChat developers there in the room, I took the opportunity to prod them with my pointy stick. This isn’t the first time I’d mentioned the performance issue to them, but in the past no one could reproduce it and we had to drop the investigation. Well, this time I think everyone else was also thinking eco thoughts, and they really moved heaven and earth to try to reproduce it. Eventually James was able to, and it wasn’t long before the issue was put six feet under. The result: NeoChat’s background CPU usage is now 0% for people using Intel GPUs, down from 30%. A big win for eco and laptop battery life, which I’m already appreciating as I write this blog post in an airport disconnected from AC power.

To verify the CPU usage, just for laughs I added the Catwalk widget to my panel. It’s so adorable that I haven’t had the heart to remove it, and now I notice things using CPU time when they should be idle much more than I did before. More visibility for performance issues should over time add up to more fixes for them!

  • Sleeping cat showing 0.5% CPU usage
  • Running cat showing 22.5% CPU usage

Another interesting thing happens when you get a bunch of talented KDE contributors in a room: people can’t help but initiate discussions about pressing topics. The result was many conversations about release schedules, dependency policy, visual design vision, and product branding. One discussion very relevant to the sprint was the lack of systematicity in how we use units for spacing in the QtQuick-based UIs we build. This resulted in a proposal that’s already generating some spirited feedback.

All in all it was a happy and productive week, and after doing one of these I always feel super privileged to be able to work with as impressively talented and friendly a group of colleagues as this is:

Full disclosure: KDE e.V. paid for my travel and lodging expenses, but not my döner kebab expenses!

Tuesday, 23 April 2024

Hi, I'm Jakob and this is my new KDE blog. Let's see how this goes as I haven't blogged for literally decades. I started working on Plasma code sometime last year and hope to play a tiny part in setting the stage for world domination improving user experiences like so many other awesome and dedicated contributors do every week.

Monday, 22 April 2024

When thinking about how to contribute to KDE, many people probably still think that you have to write actual code. While it’s true that C++ and QML is at the heart of our applications, it’s just one puzzle piece of many that make up a successful product. Besides donating money to KDE or developers like me individually, there’s much more you can do to support us: promo work, drawing icons, brainstorming ideas, writing documentation, triaging bug reports or writing new ones, or in this case sending the relevant piece of hardware to a developer. Every single contribution counts!

Dolphin Places sidebar listing various drives, among them a "CD-ROM" in the "Removable Devices" section
It’s been at least ten years since I last used an optical drive

A key ingredient to KDE’s cross-platform story is Solid, our device integration framework. It lets applications enumerate devices, such as hard drive partitions, USB thumb drives, but also batteries and peripherals, in a platform-independent way. When it comes to hardware, sometimes emulating its behavior is tough and even a virtual machine might not behave exactly the same as the real thing. Here’s the story of how the donation of a portable DVD drive let me unlock a massive performance boost.

On Linux, to enumerate storage devices it talks to UDisks2 on DBus. You can actually view all the information yourself by using qdbusviewer or d-feet and navigate to the org.freedesktop.UDisks2 service on the System Bus. The Places panel found in applications like Dolphin but also the Device Notifier applet in System Tray query Solid for interesting storage devices to display to the user.

On a typical system, there’s plenty of mount points (particularly Snap is notorious for creating lots of loop devices) which we don’t want to show. Nevertheless, we have to fetch them all to decide whether they’re interesting to us. For example, usually only storage devices explicitly listed in fstab, mounted from /media (your typical USB stick drive), or originating in the user’s home directory (an ISO image in your Downloads folder) are displayed.

Currently, owing to Solid’s modular nature and the fact that a lot of its original code was written in KDE 4 times where many API conveniences in DBus and UDisks didn’t exist yet, Solid uses the DBus Introspectable interface to enumerate all devices. This gives us an XML description of the available interfaces and object paths on the service. As you can imagine, receiving and processing that data string can be quite expensive. Furthermore, for every device that was enumerated, a Solid Device instance is created which then fetches all properties from all interfaces on the relevant object, which again can be slow. The DBus interfaces an object implements in UDisks gives us a good idea of what type of storage we’re dealing with, for example org.freedesktop.UDisks.Loop contains properties regarding loop devices, such as the original path of the image file that has been mounted, which in turn is also a org.freedesktop.UDisks.Block device, and so on.

qdbusviewer viewing the org.freedesktop.UDisks2 service on the System Bus with block_device/nvme0n1p1/ expanded and property "MountPoints" displayed as raw value. Reads 47, 98, 111, 111, 116, 47, 101, 102, 105 (/boot/efi)
Retrieving a mount point via DBus, eventually you realize that “47” is forward slash.

There must be a better way to do this, right? There is! It’s called org.freedesktop.DBus.ObjectManager. It lets you fetch all objects and their properties in a single call. This would allow Solid to query everything at once on startup and then only fetch individual properties when they get invalidated or a new device is plugged in at runtime.

Both encrypted drives and optical media are somewhat special in that they’re a drive (or container) containing the actual media or partition. While a USB stick just disappears entirely as you unplug it, a DVD drive will only have its media ejected. It means we need to monitor the drive and check its media availability and then announce the disc inside of it. However, when I asked fellow KDE developers to test my changes, the patch-set worked fine with the CD-ROM drive emulated in a virtual machine but failed miserably with a legit drive. The situation with Audio CDs was even worse since they don’t have a regular file system associated with. And guess what: there’s also CDs that contian both audio and data.

I asked around on KDE’s Matrix channels whether someone might have a spare USB CD-ROM drive and is willing to help. The other day MartinR approached me in the KDE neon channel and said he had a spare one he could mail somewhere. When it arrived a week later, I immediately tried it out (it’s been some time since I’ve seen a device with a USB Y cable) and it indeed let me iron out a bunch of remaining issues with the original patch-set. There’s other examples, too, where having the actual hardware is key. For instance, in order to properly develop HDR support in KWin, the developers need to have an actual screen capable of displaying it.

An AMOLED screen running Plasma 6 in HDR mode with the then-current Plasma 5.27 wallpaper (a pale blue painted mountain scenery) and a panel on the left side
KWin Wayland running in HDR mode on a portable OLED screen, courtesy of Xaver (the picture of course doesn’t do it justice)

The change isn’t actually merged yet as I am in the process of writing a fake UDisks2 service for Solid. This would let us run a bunch of automated tests, particularly for the weird cases, and ensure that my refactor doesn’t cause any regressions. Solid has unit tests for its general working but not specifically to the way it interacts with UDisks2. A bug in Solid that renders your data inaccessible (sorry about that encrypted drives bug the other week) or causes the shell or some KDE background service to crash upon plugging in a device would be a disaster.

Having said all of that, let me thank you again very much, without your generous donation I would not have been able to realize this project. On my laptop, the time it took to initialize a KFilePlacesModel went down from 55–60 ms to just under 20 ms. The number of DBus calls it places to the UDisks2 service went down from around 60 “get all properties”, 45 “introspect”, and 15 “get this particular property” calls to a single “get all managed objects” call, and one “introspect” call I have yet to hunt down. I’m sure our users will very much appreciate a faster starting Dolphin and snappier file dialog! Also many thanks to Fabian Vogt and notably Jan R. for continued advice and testing.

If you have a KDE development setup (and if you don’t, go set one up), please test this Solid patch, and let me know if it causes any trouble for you!

Sunday, 21 April 2024

Make sure you commit anything you want to end up in the KDE Gear 24.05
releases to them

Next Dates
  • April 25 2024: 24.05 Freeze and Beta (24.04.80) tag & release
  • May 9, 2024: 24.05 RC (24.04.90) Tagging and Release
  • May 16, 2024: 24.05 Tagging
  • May 23, 2024: 24.05 Release

https://community.kde.org/Schedules/KDE_Gear_24.05_Schedule

Friday, 19 April 2024

This week I’m attending two sprints: a KDE e.V. Board sprint which is already done, and a KDE Goals mega-sprint, which begins today! My “Automate and systematize internal processes” goal is represented there and I’m hoping we have a great time brainstorming and fixing stuff. And also that we eat lots of Döner kebabs. So many Döner kebabs. All the Döner kebabs.

New Features

Spectacle regains its “blur factor” feature, so now if you want your blurred areas to be even blurrier, you can do that without having to draw a blur over the same area multiple times (Noah Davis, Spectacle 24.05. Link)

You can now copy the text of a column in System Monitor (Joshua Goins, Plasma 6.1. Link)

UI Improvements

The Plasma Digital Clock’s Islamic calendar feature now respects the locale-specific numbering system, which means for example that people living in Arabic-speaking countries that use western-style Arabic numerals will now see those rather than eastern-style Arabic numerals (Fushan Wen, Plasma 6.0.5. Link)

Removed the “Clear all” button on the fingerprint authorization enrollment UI, because it was a big obvious footgun you could use to destroy all your work to enroll fingerprints (Arthur Zamarin, Plasma 6.1. Link)

Normally I don’t mention changes to Welcome center, but this is a fairly large one: the “Simple by default” page is no longer a big dumb picture of System Settings, but rather shows you a nice mock desktop where you can hover or click on elements to learn what they are and what they do. System Settings is now mentioned on the “Powerful When Needed” page (me: Nate Graham and Oliver Beard, Plasma 6.1. Link):

On System Settings’ Night Light page, the time input fields for manual time mode are no longer a nightmare, because they’ve been replaced with a set of spinboxes (Natalie Clarius, Plasma 6.1. Link):

Yes, ideally these would use a dedicated time picker UI component, but one thing at a time

Information about Night Light transition times is now shown in the tooltip for the Brightness and Color widget (Natalie Clarius, Plasma 6.1. Link):

System Settings’ Screen Locking page has also now adopted the “buttons in the header” paradigm, this time for its “Configure Appearance” button (Jakob Petsovits, Plasma 6.1. Link):

Bug Fixes

Fixed a number of issues in various pieces of KDE software caused by changes in Qt 6.7 (Felix Ernst, Noah Davis, and Fushan Wen, Dolphin & Spectacle 24.05 and Plasma 6.0.4. Link 1, link 2, and link 3)

Spectacle no longer badly misbehaves when asked to take a screenshot of a screen with a scale factor of less than 100% (Noah Davis, Spectacle 24.05. Link)

Fixed an issue whereby Spectacle’s feature to save screenshots with an increasing number sequence would number the screenshots incorrectly in certain circumstances (Noah Davis, Spectacle 24.05. Link)

Closing your laptop’s lid with the keyboard backlight illuminated now correctly restores its brightness level when you open the lid again (Anthony Vital, Plasma 6.0.4. Link)

Fixed multiple issues whereby parts of Plasma would fail to save changed settings if Plasma quickly crashed, exited unexpectedly, or was terminated in an unclean way (David Edmundson, Plasma 6.0.5. Link)

Plasma no longer crashes when removing standalone launcher widgets for apps with no “Open With” context menu action (Fushan Wen, Plasma 6.0.5. Link)

Fixed multiple issues with keyboard focus and selection with search results in Plasma’s Application Dashboard widget—which you may notice is visibly on life support, but this constitutes some of that support 🙂 (Marco Martin, Plasma 6.0.5. Link)

Plasma’s screen chooser OSD once again works as expected on X11 (Fushan Wen and David Redondo, Plasma 6.0.5. Link 1 and link 2)

The Grid layout for System Monitor sensors once again looks good in constrained spaces, such as a thick Plasma panel (Akseli Lahtinen, Plasma 6.0.5. Link)

Fixed a major regression that prevented LUKS-encrypted disks from being decrypted by KDE software using the Solid framework (Kai Uwe Broulik, Frameworks 6.2, but distros should be backporting it to their 6.1 packages too. Link)

Those increasingly ubiquitous contextual help buttons that open explanatory tooltips when clicked no longer have a weird empty space on the right side of their tooltips (Shubham Arora, Frameworks 6.2. Link):

Fixed a Breeze icon that was not changing its color properly when using non-default color schemes (Evgeniy Harchenko, Frameworks 6.2. Link)

Other bug information of note:

Performance & Technical

On Wayland, implemented support for the remote desktop portal’s ConnectToEIS method. This enables applications like Synergy and Barrier that have Wayland support for sending emulated input events to do so in a more convenient way than using the existing methods. Full support for input-leap is pending, but in progress (David Redondo, Plasma 6.1. Link)

System Settings’ Keyboard page has been ported to QML, retaining most of its prior styling but with a modern and extensible codebase (Evgeny Chesnokov, Plasma 6.1. Link)

…And Everything Else

This blog only covers the tip of the iceberg! If you’re hungry for more, check out https://planet.kde.org, where you can find more news from other KDE contributors.

How You Can Help

The KDE organization has become important in the world, and your time and labor have helped to bring it there! But as we grow, it’s going to be equally important that this stream of labor be made sustainable, which primarily means paying for it. Right now the vast majority of KDE runs on labor not paid for by KDE e.V. (the nonprofit foundation behind KDE, of which I am a board member), and that’s a problem. We’ve taken steps to change this with paid technical contractors—but those steps are small due to growing but still limited financial resources. If you’d like to help change that, consider donating today!

Otherwise, visit https://community.kde.org/Get_Involved to discover other ways to be part of a project that really matters. Each contributor makes a huge difference in KDE; you are not a number or a cog in a machine! You don’t have to already be a programmer, either. I wasn’t when I got started. Try it, you’ll like it! We don’t bite!

Let’s go for my web review for the week 2024-16.


The invisible seafaring industry that keeps the internet afloat

Tags: tech, internet, infrastructure

Very fascinating piece. This shows the underappreciated job of maintaining the subsea cables needed for the Internet to function and how extreme the conditions can be. Definitely a peculiar life for the folks in that trade… also shows the repairs are clearly underfunded and that not enough people are embracing this career. And now, add geopolitics to the mix, it should make you wonder how all of this work at all and for how long it’ll keep working.

https://www.theverge.com/c/24070570/internet-cables-undersea-deep-repair-ships


Where The Wild Things Are: Brute-Force SSH Attacks In The Wild And How To Stop Them : Flux Research Group

Tags: tech, ssh, security

Interesting study on the brute force attacks against SSH. It gives plenty of insights and leads to a potential approach to detect most of them.

https://www.flux.utah.edu/paper/singh-nsdi24


Neverest CLI

Tags: tech, email, tools, command-line

Looks like a nice tool to backup and restore emails. Probably to check out next time you migrate your emails to another server.

https://pimalaya.org/neverest/cli/latest/


Mysterious Moving Pointers - blomqu.ist

Tags: tech, c++, memory

Interesting case… even though honestly we shouldn’t need to dig out this kind of details.

https://blomqu.ist/posts/2024/move/


Traces the shared-object dependencies of a binary, and graphs them

Tags: tech, library, dependencies

Neat little tool. Since I had to do this kind of work a few times, this is indeed a good idea to have a public and maintained script for it.

https://github.com/stolk/sotrace


Create graphs from your CommonJS, AMD or ES6 module dependencies

Tags: tech, dependencies, javascript, tools

Looks like a nice tool to explore dependencies in JS based projects.

https://github.com/pahen/madge


Setting up PostgreSQL for running integration tests

Tags: tech, tests, performance, databases, postgresql

Interesting use of database templates and memory disks to greatly speed up test executions.

https://gajus.com/blog/setting-up-postgre-sql-for-running-integration-tests


WebXR retro computer simulation | Dom Pajak

Tags: tech, web, 3d, xr

Funny side project. This shows well many of the challenges one should expect when working on mixed reality projects. It’s also nice to see how the ecosystem matured for such features in the browser.

https://www.dompajak.com/blog/webxr-beeb-virtual-beeb/index.html


Spectral Ray Tracing

Tags: tech, 3d, art, physics

Interesting approach to have a ray tracer which doesn’t quite follow physics for artistic purposes.

https://larswander.com/writing/spectral-ray-tracing/


What we talk about when we talk about ‘root cause’ · GitHub

Tags: tech, failure, project-management, product-management

This is definitely an ambiguous term. You need to know where stand the people employing it in order to figure out the exact meaning of “root cause”.

https://github.com/readme/guides/root-cause


Why you need a “WTF Notebook”

Tags: management, coaching, learning, organization

Definitely this. Listen and write down issues before you start to complain. There might be reasons why things are as they are. Take the time to understand them and refine to have a better feedback.

https://www.simplermachines.com/why-you-need-a-wtf-notebook/


Mental Health in Software Engineering

Tags: tech, work, life, management, burnout, health

A good reminder that mental health can be hard to keep in check in our profession. Pay attention to how you feel, anxiety is a sneaky foe. Lots can be done to improve if taken care of early enough.

https://vadimkravcenko.com/shorts/mental-health-in-software-engineering/


This is a teenager

Tags: sociology, politics, data-visualization

Excellent visualization which shows how adverse experiences during childhood shape our lives as adults.

https://pudding.cool/2024/03/teenagers/



Bye for now!

Thursday, 18 April 2024

Hey everyone! Here is a new video explanation of the changes we have done. This time we tackled Labplot, maps, and media icons! Can you believe it? We are now officially past the mid-way for the icons. So exciting!

Tuesday, 16 April 2024

Akademy 2024 will be a hybrid event held simultaneously in Würzburg, Germany, and Online.

Hundreds of participants from the global KDE community, the wider free and open source software community, local organisations and software companies will gather at this year's Akademy 2024 conference. The event will take place in Würzburg and Online from Saturday 7th September to Thursday 12th September.

KDE developers, artists, designers, translators, users, writers, sponsors and supporters from around the world will meet face-to-face to discuss key technology issues, explore new ideas and strengthen KDE's innovative and dynamic culture.

Register now and join us for engaging talks, workshops, BoFs and coding sessions. Collaborate with your fellow KDE contributors to fix bugs, pioneer new features and immerse yourself in the world of open source.

For more information about the conference, visit the Akademy 2024 website.