Planet KDE
Web Review, Week 2024-20
Let’s go for my web review for the week 2024-20.
Password cracking: past, present, futureTags: tech, security
Ever wondered about the state of the art in password cracking? This is not an easy read but a good reference.
https://www.openwall.com/presentations/OffensiveCon2024-Password-Cracking/
Tags: tech, cryptography
There are other cryptography schemes out there with interesting properties. Too bad they’re not very much used.
https://blog.cryptographyengineering.com/2017/07/02/beyond-public-key-encryption/
Tags: tech, system, hardware, failure
Strange things do happen when the hardware fails… indeed the systemd open question at the end is mysterious.
https://rachelbythebay.com/w/2024/05/15/ro/
Tags: tech, debian, packaging
Interesting work. This is nice to see improvements and experiments in dependency solvers for package managers.
https://blog.jak-linux.org/2024/05/14/solver3/
Tags: tech, tools, make
Looks like nice extensions to use GNU Make to run simple tasks.
https://github.com/mitjafelicijan/makext
Tags: tech, system, filesystem
You expect joining file paths to be a simple operation? Think again, it’s definitely error prone and can change between stacks.
https://lukas-prokop.at/articles/2024-05-03-filepath-join-behavior
Tags: tech, processes, system, linux
Definitely a recent and lesser known to interact with other processes. Could be useful in some cases.
https://www.corsix.org/content/what-is-a-pidfd
Tags: tech, c++, performance, memory
Interesting quick comparison, this shows the design tradeoffs quite well.
https://devblogs.microsoft.com/oldnewthing/20240510-00/?p=109742
Tags: tech, gpu, hardware, ai, machine-learning, neural-networks, performance
Interesting how much extra performance you can shave off the GPU by going back to how the hardware works.
https://hazyresearch.stanford.edu/blog/2024-05-12-tk
Tags: tech, graphics, mathematics, funny
Funny experiment playing with the frequency domain and the spatial domain of an image. This gives unintuitive results for sure.
https://lcamtuf.substack.com/p/sir-theres-a-cat-in-your-mirror-dimension
Tags: tech, tests, snapshots
This is a technique which is definitely underestimated. There are plenty of libraries out there allowing to use them.
https://tigerbeetle.com/blog/2024-05-14-snapshot-testing-for-the-masses
Tags: tech, programming, software, craftsmanship, engineering
Good food for thought. Explains quite well the factors which impact software development.
https://tratt.net/laurie/blog/2024/what_factors_explain_the_nature_of_software.html
Bye for now!
KDE e.V. is looking for a graphic designer for environmental sustainability project
KDE e.V., the non-profit organisation supporting the KDE community, is looking for a graphic designer to implement materials (print design, logo design, infographics, etc.) for a new environmental sustainability campaign within KDE Eco. Please see the job ad for more details about this employment opportunity.
We are looking forward to your application.
Introducing the Formatting plugin
So this is not quite an introduction since the plugin has been around for almost a year now, having been released in the 23.04 release but since I never got around to writing a blog about it, here I am.
In simple words, the formatting plugin allows one to format code easily and quickly. Well the "quickness" depends on the underlying code formatter but we try to be as quick as possible. So far if you wanted to do code formatting from within Kate, the only way to do that was to configure a tool in the External Tools plugin and then invoke it whenever you wanted to format the code. While this works it wasn't great for a few reasons. Firstly, you would loose undo history. Secondly, the buffer would jump and you would most likely loose your current position in the document. Thirdly, for every language you get a different tool and you need to remember the right tool to invoke on the right document type.
To simplify this, I decided to write a plugin that would expose a minimal UI but still provide a lot of features.
There are basically two ways to use this plugin:
- Manually using the "Format Document" action.
- Automatically on save
The correct formatter is invoked based on the document type in all cases. Additionally the plugin will preserve the document's undo history and user's cursor position when formatting the code so that the formatting of code doesn't disrupt user's workflow. This is especially important for automatic formatting on save.
Supported languages:The current list of supported languages and formatters are as follows:
- C/C++/ObjectiveC/ObjectiveC++/Protobuf
- clang-format
- Javascript/Typescript/JSX/TSX
- Prettier
- Json
- clang-format
- Prettier
- jq
- Dart
- dartfmt
- Rust
- rustfmt
- XML
- xmllint
- Go
- gofmt
- Zig
- zigfmt
- CMake
- cmake-format
- Pythong
- autopep8
- ruff
The plugin can be configured in two ways:
- Globally, from the Configure dialog
- On a per project basis using the .kateproject file
When reading the config, the plugin will first try to read the config from .kateproject file and then read the global config.
Example:
{ "formatOnSave": true, "formatterForJson": "jq", "cmake-format": { "formatOnSave": false }, "autopep8": { "formatOnSave": false } }The above
- enables "format on save" globally
- specifies "jq" as the formatter for JSON
- disables "format on save" for cmake-format and autopep8
To configure formatting for a project, first create a .kateproject file and then add a "formatting" object to it. In the "formatting" object you can specify your settings as shown in the previous example. Example:
{ "name": "My Cool Project", "files": [ { "git": 1 } ], "formatting": { "formatterForJson": "clang-format", "autopep8": { "formatOnSave": false } } }KDE Goals April 2024 sprint
A few weeks ago I attended the KDE Goals April 2024 sprint
I was there as part of the Automation & Systematization sprint given my involvement in the release process, the "not very automatized" weekly emails about the status of CI about KDE Gear and KDE Frameworks, etc. but I think that maybe I was there more as "person that has been around a long time, ask me if you have questions about things that are documented through oral tradition"
I didn't end up doing lots of work on sprint topics themselves (though I participated in various discussions, did a bit of pair-programming with Aleix on QML accessibility issues, inspired DavidR to do the QML-text-missing-i18n check that he describes in his blog); instead I cheated a bit and used the sprint to focus on some of the KDE stuff I had a bit on my backlog, creating the KDE Gear release/24.05 branches and lots of MR reviewing and more!
Thanks KDE e.V. for sponsoring the trip, if you would like such events to continue please we need your continued donations
And remember Akademy talk submission period ends in 10 days, send your talk now!
digiKam Recipes 2024-05-13 released
Introducing the Enhanced KubuQA: Revolutionising ISO Testing Across Ubuntu Flavors
The Kubuntu Team are thrilled to announce significant updates to KubuQA, our streamlined ISO testing tool that has now expanded its capabilities beyond Kubuntu to support Ubuntu and all its other flavors. With these enhancements, KubuQA becomes a versatile resource that ensures a smoother, more intuitive testing process for upcoming releases, including the 24.04 Noble Numbat and the 24.10 Oracular Oriole.
What is KubuQA?KubuQA is a specialized tool developed by the Kubuntu Team to simplify the process of ISO testing. Utilizing the power of Kdialog for user-friendly graphical interfaces and VirtualBox for creating and managing virtual environments, KubuQA allows testers to efficiently evaluate ISO images. Its design focuses on accessibility, making it easy for testers of all skill levels to participate in the development process by providing clear, guided steps for testing ISOs.
New Features and ExtensionsThe latest update to KubuQA marks a significant expansion in its utility:
- Broader Coverage: Initially tailored for Kubuntu, KubuQA now supports testing ISO images for Ubuntu and all other Ubuntu flavors. This broadened coverage ensures that any Ubuntu-based community can benefit from the robust testing framework that KubuQA offers.
- Support for Latest Releases: KubuQA has been updated to include support for the newest Ubuntu release cycles, including the 24.04 Noble Numbat and the upcoming 24.10 Oracular Oriole. This ensures that communities can start testing early and often, leading to more stable and polished releases.
- Enhanced User Experience: With improvements to the Kdialog interactions, testers will find the interface more intuitive and responsive, which enhances the overall testing experience.
The Kubuntu Team is keen to collaborate closely with leaders and testers from all Ubuntu flavors to adopt and adapt KubuQA for their testing needs. We believe that by sharing this tool, we can foster a stronger, more cohesive testing community across the Ubuntu ecosystem.
We encourage flavor leads to try out KubuQA, integrate it into their testing processes, and share feedback with us. This collaboration will not only improve the tool but also ensure that all Ubuntu flavors can achieve higher quality and stability in their releases.
Getting InvolvedFor those interested in getting involved with ISO testing using KubuQA:
- Download the Tool: You can find KubuQA on the Kubuntu Team Github.
- Join the Community: Engage with the Kubuntu community for support and to connect with other testers. Your contributions and feedback are invaluable to the continuous improvement of KubuQA.
The enhancements to KubuQA signify our commitment to improving the quality and reliability of Ubuntu and its derivatives. By extending its coverage and simplifying the testing process, we aim to empower more contributors to participate in the development cycle. Whether you’re a seasoned tester or new to the community, your efforts are crucial to the success of Ubuntu.
We look forward to seeing how different communities will utilise KubuQA to enhance their testing practices. And by the way, have you thought about becoming a member of the Kubuntu Community? Join us today to make a difference in the world of open-source software!
KDE Applications & Icons
In this rather lengthy post I talk a bit about the current issues with icons for the KDE applications I work on or use.
Let’s start with looking at what I mean with KDE applications and what the current state is, up to KDE Frameworks 6.2 and current KDE Gear 24.02. Then let’s see what will be improved in future releases.
What do I mean with ‘KDE Applications’ #If I speak about ‘KDE Applications’ here I talk about applications like Kate, Dolphin, Okular and others like that.
This means applications developed with Qt and KDE Frameworks that integrate well with the KDE Plasma desktop but are not restricted to it.
Many of this applications not just aim to work well on Linux & BSD or other open source operating systems but are ported and working well on the rather different Windows and macOS desktop. Some even are successful since years in the official Windows Store.
The above applications are part of the KDE Gear releases, but the described issues and solutions naturally are not restricted to stuff released with that.
What most of these applications have in common is that they rely on rather large parts of our Frameworks. With that they depend at least indirectly on an icon set that covers large parts of what our default icon set Breeze provides. Even if you use no icons from that icon set yourself in your application, just using the standard actions or many widgets/dialogs from Frameworks will rely on some subset of Breeze.
Current State of Icons per Desktop or Platform #When talking about the current situation of icons that depends largely on the desktop or platform you are running the KDE application on.
Let’s take a look at some (I for sure miss some that are common or loved, that doesn’t mean I disregard them, I just want to limit the scope).
KDE Plasma on Linux/BSD with Wayland/X11 #If you just aim to run on the KDE Plasma desktop with your Qt and KDE Frameworks based application, all is fine with icons, there is no problem.
The KDE project did their job, at least for Kate I never did have any issues with icons on Plasma.
Below a screenshot of Kate 24.02 running on Plasma 6. All icons are there, they are properly re-colored for the dark theme, too, including not just the used Breeze icons but for example the small Git icons in the left sidebar that Kate has bundled.
This is the vanilla state each user will get if Kate is installed on Plasma (and the dark theme is used). There are no patches done during building to achieve that nor is there any extra user configuration necessary.
Microsoft Windows #If you run Kate on Windows, the icon situation is good, too, if you use our Windows Store variant or get at build done via Craft.
See below what the current nightly of Kate looks like in some Windows 11 VM (I just started it from the unpacked ZIP, no setup needed).
In the Craft build descriptions we do some patches to ensure the Breeze icons are bundled as library and the application links with that. In addition we ensure with some more patching that our own icon engine is used to allow for the proper recoloring.
If you don’t do that patching you will end up with close to no icons or for dark theme black on black icons.
Apple’s macOS #The situation on macOS is the same as on Windows.
If you go with a Craft build of Kate, you will end up with something like below.
All icons are there and even application provided icons like our Git one are properly recolored.
Without the Craft patches Kate has more or less no icons like on Windows.
Haiku #After covering Plasma and the two large closed-source desktop operating systems, as a small excursion, look how Kate (the KF5 based version) looks if installed on Haiku with the package they provide.
Kate looks ok, system icons intermixed with Breeze as fallback icons.
GNOME #For testing this, I installed the latest Fedora Workstation in a VM. I have done no user configuration beside what the installer and initial setup wizard asked and then just installed the Kate package. The shell was even helpful to ask to do that after you just tried to start the not installed Kate.
Most icons not there, not that nice. For details about that read this post, we don’t need to re-iterate this again.
If you think: that is just Kate, let us just try Okular.
One thing that can be at least solved easily is that the icons are gone, we just install the Breeze icon set as package.
Looks ok, system icons intermixed with Breeze as fallback icons just like on Haiku. Not stylish but usable.
I was unable to trigger Kate or Okular to adjust to the dark mode GNOME provides, therefore I can not test if we end up with black on black icons there, but it is likely, as the fallback is just Breeze.
MATE #Kate and Dolphin 24.02 on MATE with dark mode on NixOS, normal system packages, Breeze icons is installed.
System icons intermixed with Breeze as fallback icons, looks not that nice. Breeze icons not readable, as recoloring is not working.
Xfce #Kate and Dolphin 24.02 on Xfce with dark mode on NixOS, normal system packages, Breeze icons is installed.
Same mix and unreadable state as on MATE.
Enlightenment #Kate 24.02 on Enlightenment with dark mode on NixOS, normal system packages, Breeze icons is installed.
Just unreadable icons, beside out own Git icon and the few colored ones.
Summary: What’s up with Icons today #The icons in KDE applications do look perfect on KDE Plasma. That should be no real surprise as many people working on these applications will test them there and KDE Frameworks and Qt are well tested on Plasma, too.
The icons look fine on Windows and macOS, too, at least for applications that got properly ported, but only thanks to patches we do in Craft. If you just grab e.g. Kate’s and the needed frameworks sources from our normal repositories, you don’t get that.
If the maintainers of the port for some OS do care, like the Haiku people, KDE applications can look fine there.
On other desktop environments it doesn’t look that great out of the box.
Unlike for the other operating systems, there the same packages without extra patches are running.
Whereas that works perfect on Plasma, we rely too much that the desktop environment running provides an icon set that has a similar coverage and naming as Breeze. As we don’t hard depend on the Breeze icons for our applications, it can even happen that just no fitting icons are there per default.
Even if that can be solved with some better package dependencies, you still end up with a patchwork look and without a Qt platform theme plugin that handles the needed recoloring to make dark mode feasible.
Getting it fixed #Fortunately, just because the status quo is not that nice, it must not stay that way.
We have more or less all needed parts to fix the situation, we did already fix it during the porting to Windows and macOS.
We just never pushed to get this stuff done on Linux and Co.
How did we solve it there?
- We have the Breeze icon set as Qt resource inside a library and link with that. That makes them a hard build and runtime dependency and easy to deploy.
- We ensure the icon engine we have in our KIconThemes framework is there and used.
- We enforce the Breeze Qt style. (this is not really icon related, but ensures an usable look’n’feel, too)
The first and the last thing are easy to do on Linux and Co., too, even with still allowing the user to override the icon set and style, but still defaulting to Breeze.
The second point is harder, as that requires at the moment a few hacks and is not 100% as good as going the Qt platform theme plugin route we use inside Plasma.
For KDE Frameworks 6.3 we worked to get that done.
See our meta issue on our GitLab instance covering that topic.
All is not perfect, we will need to get some Qt API to fully do that, but the current state is already usable.
Here a comparison with the state as we have it now in our released software compared to with the state in the current master branch on an Cinnamon desktop.
The left side is the current Kate 24.02, the right side the current master build of Kate with master Frameworks.
The hard dependency to the Breeze icon library is done in KIconThemes, if you link to that, you are guaranteed that you have Breeze icons. You can naturally just link to only the Breeze icon library on your own.
The ensuring that the proper icon engine is done with some new API in KIconThemes that application developers must opt-in for. The same for the Qt style setup, there we have API in KConfigWidgets.
For Kate the concrete changes can be found here. They are minimal and even remove some platform specific code for the style setup.
Including fallback code for pre 6.3 Frameworks compatibility of the style setting, the basic idea is:
#include <KIconTheme> #define HAVE_STYLE_MANAGER __has_include(<KStyleManager>) #if HAVE_STYLE_MANAGER #include <KStyleManager> #endif int main(...) { /** * trigger initialisation of proper icon theme */ #if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 3, 0) KIconTheme::initTheme(); #endif QApplication yourAppInstance(...); #if HAVE_STYLE_MANAGER /** * trigger initialisation of proper application style */ KStyleManager::initStyle(); #else /** * For Windows and macOS: use Breeze if available * Of all tested styles that works the best for us */ #if defined(Q_OS_MACOS) || defined(Q_OS_WIN) QApplication::setStyle(QStringLiteral("breeze")); #endif #endif ... }In the long run, once 6.3 is the minimal version the application depends on, this is just:
#include <KIconTheme> #include <KStyleManager> int main(...) { /** * trigger initialisation of proper icon theme */ KIconTheme::initTheme(); QApplication yourAppInstance(...); /** * trigger initialisation of proper application style */ KStyleManager::initStyle(); ... }At the moment KIconTheme::initTheme() is still a bit hacky until we have proper Qt API, but that is not visible for the API user.
If we get this properly done in our applications, that will not just solve the current issue for running them in other desktop environments.
With that API in use and the now already upstreamed patches, one can build vanilla Frameworks and Kate on Windows and macOS and the icons will just work in the resulting application bundles and you get an usable style out of the box if Breeze is there.
Help Wanted! #We have now some API to help our applications to be more usable on non-Plasma installations and Windows and macOS.
We still need to make use of it and we need to improve the implementation and upstream to Qt the needed extra API to make it a real 100% replacement to what we do with the Plasma integration plugin.
If you have time to help us, show up on our meta issue.
Not just coding is needed, we for example have still a few icons that don’t recolor well, help to fix that is wanted, too.
Feedback #You can provide feedback on the matching KDE Social, reddit or Hacker News post.