Skip to content

Saturday, 11 January 2025

The Skrooge Team announces the release 25.1.0 version of its popular Personal Finances Manager based on KDE Frameworks.

This is the first version for Kf6/Qt6.

Changelog

  • Correction bug 494197: Shortcut for Setting Status to Checked
  • Correction bug 494159: Wrong decimal separator in CSV import
  • Correction bug 494516: Categories "closed" are not displayed
  • Correction bug 494023: Downloading values from yahoo fails HTTP Error 401: Unauthorized
  • Correction bug 494077: document History panel and better document viewing transactions modified by an action
  • Correction bug 498157: Inconsistent icons in the Pages sidebar
  • Correction: Replace yahoo source (not working) by boursorama source
  • Correction: More robust copy of tables
  • Migration: Support build on qt6/kf6
  • Correction: Fix performances issue on qt6 due to QDateTime::fromString

Friday, 10 January 2025

A while ago a colleague of mine asked about our crash infrastructure in Plasma and whether I could give some overview on it. This seems very useful to others as well, I thought. Here I am, telling you all about it!

Our crash infrastructure is comprised of a number of different components.

  • KCrash: a KDE Framework performing crash interception and prepartion for handover to…
  • coredumpd: a systemd component performing process core collection and handover to…
  • DrKonqi: a GUI for crashes sending data to…
  • Sentry: a web service and UI for tracing and presenting crashes for developers

We already looked at KCrash, coredumpd, and DrKonqi. This week it’s time to look at the final piece of the puzzle — Sentry.

Sentry

Sentry is the service we have on the developer side of a crash to manage incoming reports.

As we’ve learned in the DrKonqi post, a Sentry-specific trace created by the preamble is eventually sent off to our Sentry server. In Sentry, yet more processing happens!

Symbolication

If the user hasn’t explicitly opted into it, there usually aren’t debug symbols available on the user system. This would ordinarily render backtraces useless since they are just a bunch of memory addresses without names or references to our source code. One of the reasons we adopted Sentry is because it can fill in the gaps through a process called symbolication. For symbolication it essentially needs to know all the loaded libraries and can then fetch the relevant debug symbols via the various debuginfod instances out there. Once it has the debug symbols it can resolve that the address 0x2343244 is really the function int main(int argc, char **argv)

Fingerprinting

When a trace has been symbolicated it’s ready for fingerprinting. This tries to merge together the same crash appearing in different submission into one single sentry event. Generally speaking if two submissions have the same trace frames, they are considered the same crash and merged into one event (in practice the rules are a bit more complicated).

Result

Eventually the crash event appears for us to fix.

In a future blog post, I’ll also give a more detailed guide on how to use Sentry to its full potential.

Sentry

Thursday, 9 January 2025

Plasma Wayland Protocols 1.16.0 is now available for packaging. It is needed for the forthcoming Plasma 6.3.

URL: https://download.kde.org/stable/plasma-wayland-protocols/
SHA256: da3fbbe3fa5603f9dc9aabe948a6fc8c3b451edd1958138628e96c83649c1f16 Signed by: E0A3EB202F8E57528E13E72FD7574483BB57B18D Jonathan Riddell jr@jriddell.org

Full changelog:

  • external-brightness: Allow the client to specify observed brightness
  • output management: add a failure reason event
  • output device,-management: add a dimming multiplier
  • output device/management: add power/performance vs. color accuracy preference

Tuesday, 7 January 2025

The advantages of Python are well known and it is a language that still remains hyped — but let’s look at some of its other sides.

Line Count

One positive side of many solutions is by stressing how few lines something requires. That’s especially the case with Python, but it doesn’t take into account the whole Software Development Life Cycle (SDLC).

One does not only want to churn out some idiomatic example code. Instead one has a large, complex software project that needs to be robust and withheld quality assurance during a long product lifetime. Hence one looks after other qualities other than whether the very initial effort requires little code.

Contracts Matter

Python’s typing system is so-called duck typing: ”If it walks like a duck and it quacks like a duck, then it must be a duck”. First of all, it means that if a caller doesn’t live up to the contract of the API, it will result in an obscure crash somewhere far down in the called code. The caller have to figure out what went wrong. This is a problem because in QA there’s the mantra that exhaustive testing is impossible, which is one reason to why we have to rely on code robustness.

I also think types is natural documentation. “What does this function do? What does it expect?” Types document that. Hence I argue conceptually for abstract base types such as Swift’s protocols, Java’s interfaces and so forth.

Versus MatLab

I replace MatLab with Python for quantitative finance, but what I miss in commercially backed projects such as first-mentioned, is good documentation. For instance NumPy and Pandas lack a consumer/user/customer-centric perspective, as opposed to what perhaps (we) programmers enjoy to do. For some reason open-source perhaps doesn’t attract for writing documentation. While it could make use of systematic addressing of this problem, it is low hanging fruit for Google Summer of Code, for instance.

Python is slow and I see the solution in the computation area as a hack: the code path jumps into C/C++ land using NumPy and Pandas. This is fine, but the code becomes convoluted and I associate to Perl’s “write once, understand never.” It feels like Python attempts to be taken to an area which results in an ill design.

Conclusion

What is Python useful for? I believe light, small tasks, such as doing something computationally advanced that isn’t a complex software project. The lack of typing means you cannot (or perhaps shouldn’t) write large applications, and perhaps performance is relevant.

However, for the more short computation and script tasks it is excellent, and it is indeed in that area it receives publicity. 

Most operating systems nowadays provide a feature like night light: Colors are adjusted over the course of the day to remove blue light in the evening, to potentially help you sleep1 and make your eyes more comfortable.

Linux is no different; there’s Redshift to apply this on X11 desktops, and since many years ago desktop environments also ship it built in. However, there’s always been a rather annoying problem with these implementations: None of them were color managed!

What does it actually do

On a low level, these implementations set the video cards gamma curves to multiply the red, green and blue channels of the image that’s sent to the screen.

The actual intention behind the feature though is to change the white point of the image. The white point is, as the name implies, the color that we consider to be “white”. With displays, this usually means that red, green and blue are all at full intensity. By reducing the intensity of green and blue we can change that white point to some other color.

What’s wrong then?

The scenario I described only concerns itself with white, but there are more colors on the screen… If you multiply the color channels with some factors, then they get changed as well. To show how much and why it matters, I measured how this naive implementation behaves on my laptop.

These plots are using the ICtCp color space - the white point they’re relative to is in the center of the other points, the distance to it describes saturation, and the direction compared to the center the color.

Without night light, relative to 6504KPlasma 6.2 at 2000K, relative to 6504K
without night lightwith night light on 6.2

These are both relative to 6504K, but to see the result better, let’s look at it relative to their respective white points:

Without night light, relative to 6504KPlasma 6.2 at 2000K, relative to 2000K
without night lightwith night light on 6.2

To put it into words, relative to white, red looks less intense (as white has become more red). Similarly, green becomes less intensely green… but it also moves a lot towards blue! Blue meanwhile is nearly in the same spot as before. In practice, this is visible as blue staying nearly as intense as it was, and green colors on the screen get a blue tint, which is the opposite of what night light is supposed to achieve.

How to fix it

To correct this issue, we have to adapt colors to the new whitepoint during compositing. You can read up on the math here if you want, but the gist is that it estimates what color we need to show with the new whitepoint for human eyes to perceive it as similar to the original color with the original whitepoint.

If your compositor isn’t color managed, then applying this may be quite the challenge, but as KWin is already fully color managed, this didn’t take a lot of effort - we just change the colorspace of the output to use the new white point, and the renderer takes care of the rest. Let’s take a look at the results.

Without night light, relative to 6504KPlasma 6.2 at 2000K, relative to 6504KPlasma 6.3 at 2000K, relative to 6504K
without night lightwith night light on 6.2with night light on 6.3
Without night light, relative to 6504KPlasma 6.2 at 2000K, relative to 2000KPlasma 6.3 at 2000K, relative to 2000K
without night lightwith night light on 6.2with night light on 6.3

Relative to the white point, red, green and blue are now less saturated but not changed as much in color, and everything looks more like expected. To put the result in direct comparison with the naive implementation, I connected desktop PC and laptop to my monitor at the same time. On the left is Plasma 6.2, on the right Plasma 6.3:

wallpaper comparison 6.2 vs. 6.3

more specific comparison 6.2 vs. 6.3

This means that in Plasma 6.3 you can use night light without colors being wrongly shifted around, and even without sacrificing too much color accuracy2.

Caveats

Well, there’s only one caveat really: Unless your display’s native white point is 6504K, the color temperature you configure in the night light setting is a lie, even if you have an ICC profile that perfectly describes your display. This is because instead of actually moving the white point to the configured color temperature, KWin currently offsets the whole calculation by the whitepoint of the display - so that “6500K” in the settings means “no change”, independent of the display.

I intend to fix this in future Plasma versions though, so that you can also set an absolute white point for all connected displays with a convenient setting.





  1. Despite the common claims about it, scientific evidence for night light improving sleep is still lacking afaik 

  2. Adapting colors to a different white point always loses some accuracy though; for best color management results you should still configure the whitepoint on your display instead of doing it in software 

If you want to keep up with the latest Kwave updates, you can now try out the nightly flatpak. It gets published each time code is pushed to the master branch, so it may sometimes have bugs, but also new features. To try it out, add the repository by running flatpak remote-add kwave-nightly https://cdn.kde.org/flatpak/kwave-nightly/kwave-nightly.flatpakrepo and install Kwave with flatpak install kwave-nightly org.kde.kwave. If you use Discover, go to Settings, click Add Source and paste https://cdn.kde.org/flatpak/kwave-nightly/kwave-nightly.flatpakrepo in to add the repo, and then search for Kwave.

The process for publishing stable versions to Flathub has also started. The current plan is to wait for the next stable version (25.04) to publish Kwave on Flathub.

Monday, 6 January 2025

This is an extremely important update to our recently released KF6/Qt6 port of KPhotoAlbum!

There’s a bug in version 6.0.0 which, under some circumstances, can lead to data loss! The problem is that, during porting, the algorithm we use to escape category names to be able to use them as XML attributes broke. And we didn’t notice. This can lead to data loss when opening a database and saving it using version 6.0.0, provided the following conditions are met:

  • The “compressed” or “fast” XML format is used (“Choose speed over readability for the XML database file” is checked in the “Database Backend” settings)
  • At least one category exists whose name contains characters other than “a-z”, “A-Z”, “0-9”, “:” or “_”

In this case, all tag associations for tags from the affected category can’t be mapped correctly and are discarded when reading the datase – and lost when saving it.

I personally found this after having tagged about 400 photos using my actual photo database and later on having wondered where my “Schlagwörter” tags for the other 15,000 have gone. Happily, we have that XML format. So, with an older backup (of course, I saved the database so often that the automated backups already exceeded the maximum number and the last unaffected database backup was already gone …) and some copying and pasting in KWrite, I could recover the old tags.

Anyway, This is actually the worst case. It can’t be recovered automatically. Big sorry to everybody affected! This should not have happened. And we sincerely hope such a bug doesn’t ever slip through our fingers ever again.

However, the 6.0.1 release fixes this. So: please update right now if you already used version 6.0.0! If not, skip 6.0.0 and go directly to 6.0.1! Dear distributors:

Please remove version 6.0.0 and replace it with 6.0.1!

Other fixes

Some other bugs have also been fixed in this release:

  • Fix application icon on Wayland
  • Fix crash when video thumbnail cache contains empty files (fixes Bug #497831)
  • The "Configure KPhotoAlbum" menu entry is now shown again (not where it was before, but it’s there again – this alone would have justified a bugfix release ;-)
  • Clicking on a tag in the Viewer’s info box shows the respective tag in the browser again
  • When the main window is closed and the viewer is opened, it is also closed now automatically. This is what one would expect, and it also fixes crashing e.g. when the user clicks on an info box link with the main window already closed. Additionally, if the annotation dialog is open, we now also try to close it. If this doesn’t succeed (e.g. because there are pending changes and the user didn't agree to discard them) the close query is aborted.

Technically, this is not a pure bugfix release, because support for database file names other than index.xml has also been added (cf. Bug #418647). But this does not interfere with anything and does not change current behavior. So let’s also declare this as a bugfix, for “The XML database name is hard-coded and should not be” ;-)

Sorry again for all inconveniences version 6.0.0 may have caused. We sincerely hope that everybody affected by data loss can restore everything so that none of the hard work put into your photo databases is actually permanently lost.

— Tobias

Saturday, 4 January 2025

Learning experiences all around

Uh. Has it really been almost half a year already? Whoops.

Unfortunately even with this many months I didn't get quite as much done in KDE-land as I hoped, for two main reasons:

  • I've been bouncing back and forth between quite big tasks (for my current level of experience in the KDE stack), leading to a lot of time spent with few results. I've learned a lot, but there's not much to show for it yet.
  • A good amount of time was taken by preparations for the 2024 European Rocketry Challenge (EuRoC) in Portugal - this was my second time there with the TU Wien Space Team and while it was an absolute blast, prepping a student-build bi-liquid propelled rocket for launch is on the more time consuming side of things. Who'd have thought! Maybe I'll write a dedicated post for this some time in the future, we'll see.

Back to KDE though: It wasn't all just learning - my phone also broke! Well. Kind of. Probably a loose contact in the SIM reader leading to it dropping connection to my SIM card a bit more often than I'd like. However this did push me to put said SIM into my old OnePlus 6T which just so happened to be running postmarketOS edge making me an official Linux Mobile daily-driver.

And I'm happy to report it mostly just worked. Sure, there's a few apps I'd like to have that aren't available on Linux Mobile (yet?), but what's there works and it's enough for me to use it.

Though there are certainly a number of more-than-a-bit-annoying bugs to be ironed out - so iron them out I will. For now my SIM card is back in my spotty Android phone until I fix a bug which sometimes duplicates incoming calls making them continue ringing while you've already picked up (less than ideal), but after that I think I'll stay on my 6T with Plasma Mobile for a longer while.

Now before I write another novel, let's get to the stuff I did actually finish in the last few months.

Merged Changes

Mobile Taskswitcher

  • Fixed an issue with the animation opening the taskswitcher from homescreen
  • Fixed the icon list during task scrub mode sometimes being off center
  • Reintroduced maximizing the selected window when not in docked mode. Technically it shouldn't be necessary since our KWin configuration should force windows to be fullscreen already, but some apps managed to break out of that (mostly GTK based apps), so back in it goes.
  • Disable blue border on touch gestures in mobile environment - it's nice as an indicator for mouse based gestures, but unnecessary here.
  • Add double tap on navbar task switcher button to switch between the 2 most recent apps.

Misc

  • Disabled session restore on mobile (at least until a bug with dialer launching ontop of login screen soft-locking the phone is fixed)
  • This is not a change by me, but I wanted to mention it because it's great and I mentioned in my last post that I tried (and failed) working on that before: Micah Stanley did a marvelous job at new mobile friendly notifications!
  • I've also done my first MR reviews which was exciting and a lot more work than I anticipated. At this point I want to thank all the people who have spent time on my MRs already!

Unfinished

I still haven't managed to get back to my touch corner gesture MR for KWin due to all the stuff that came in between like:

  • Fixing that the navigation gestures are still active while the navbar is enabled. Unfortunately this requires a change in how our setting system works and... CMake broke me here. I got pretty close to fixing this but had to leave it be for now for my own sanity's sake. I hope to get back to this soon since this is quite annoying.
  • Improving plasma-dialer's lockscreen behavior. Right now with session restore it restores above the initial login screen on mobile essentially soft-locking the phone if it happened to be running when the phone was shut down. A similar thing happens when a call is received during the lockscreen - I'm currently figuring out how to best fix that.

Well, that's all from me now. Hopefully I manage to do the next post in a more timely manner, but we'll see for how long my current bigger ticket items will keep me occupied for

Friday, 3 January 2025

About

Home Automation is mostly, as the name implies, about automation.

The machine you're in front of all work-day has an awful lot of useful information that can be useful in your home management.

I have a script lower my blinds if I turn on the camera during the afternoon as otherwise there's an annoying glare. My office lights and monitor both have a redder hue at night, but disabling night-mode on my PC automatically disables the main light performing redshift too. I want my screen to turn off not 10 minutes after activity, which is simultaneously both annoyingly too long and too short, but the moment the motion sensor in my room says I've left.

Home Assistant, the best open source home automation tool out there supports all of this, but it needs some hooks for the PC to tell it about the current state and invoke actions on the PC.

None of the existing solutions worked well for what I wanted. I wrote something for personal use a few years ago that worked great for me, I ran it in the background and didn't plan to take it further.
During the KDE Goals sprint another user suggested creating something very similar (https://phabricator.kde.org/T17435). That goal may not have been chosen, but it did motivate me to tidy up and document what I had and turn it into a more fleshed out project.

The App

I made a small daemon, named Kiot (derived from "KDE Internet of Things") that exposes this information to your Home Automation software.

This is pre-alpha software, there's no GUI configuration it relies on manually setting up a configuration file to point to your Home Automation server. If there's enough traction I might make it more packagable, and create a UI config over the Christmas break.

There's a bunch of sensors and actions shipped, but it contains a faux plugin system to make extension easy along with hooks for user supplied scripts.

  • User activity
  • Locked state
  • Suspend/Power actions
  • Camera in use
  • Accent Colour
  • Arbitrary Scripts
  • Shortcuts
  • Nightmode Inhibition

Using this from Home Assistant is then as straightforward as possible.

Checking it out

The repository can be found at https://github.com/davidedmundson/kiot which has setup instructions along with developer documentation (https://github.com/davidedmundson/kiot/blob/master/DEVELOPMENT.md) if you want to make any additional plugins.

Reworking and porting my KRunner plugins

Writing KRunner plugins was my first real developer experience with KDE. I started out right after graduating from school in 2019. Since then, I continued to maintain my plugins and correct some of the code-crimes that have been committed. This continued adding some features, removing too obscure features, getting user feedback and also making sure the plugins are easy to install without too much developer knowlege being needed. By maintaining the KRunner framework, I also deprecated lots of API and provided cleaner alternatives as part of the efforts for KDE Frameworks 6. Those changes had to be applied to all the plugins. I also contributed to other developer’s plugins that I found useful.

In this post, I will give you an overview of the different plugins and show you, how they may be useful to your workflow.
All the below mentioned Plugins are compatible with Plasma5 and Plasma6, meaning even users of LTS distributions can utilize them. KRunner plugins also work in the normal application launchers - meaning you should really give those a look!

EmojiRunner

This is a utility to search and copy emojis. On X11, you may paste them using xdolib. To ensure you get the emojis you like the most quickly, it is possible to configure favorites in the dialog. Custom emoji, emoji+text entries and aliases can also be added in the config module.


https://github.com/alex1701c/EmojiRunner/

JetBrains plugin

While I love Kate and neovim for doing code editing, having JetBrains IDEs is amazing when working on bigger Java/JavaScript projects. To improve the integration into KDE Plasma, the KRunner plugin searches for the installed JetBrains IDEs and reads the recently opened projects of them. Those can be shown and filtered in KRunner. This allows one to directly launch the right project from KRunner!

Sometimes one may find oneself navigating projects in Dolphin. For this case, a context menu counterpart exists. In there, you find the options to open the folder in the installed JetBrains IDEs. In case the folder is known as a project, the options are presented at the top-level.


https://github.com/alex1701c/JetBrainsRunner
https://github.com/alex1701c/JetBrainsDolphinPlugin

VSCode/Codium workspaces integration plugin

Next to opening recent JetBrains projects, this plugin allows one to open workspaces configured in VSCode. It is pretty straightforward - just install the “Project Manager” plugin in VSCode or Codium, add a few projects and enjoy opening them directly from KRunner.


https://github.com/alex1701c/krunner-vscodeprojects/

Firefox plugin

Having multiple profiles in Firefox may be useful for separating the work one is doing, managing different extensions or different settings. However, switching between them is rather annoying. Manually adding actions to the desktop file may work, but is rather cumbersome and not as flexible.

This plugin allows you to integrate Firefox profiles automatically in KRunner. It also allows for sorting, opening private windows as actions and also adds them to the desktop file. Meaning, you can right-click on Firefox in the taskbar or the launcher and have the actions there available.


https://github.com/alex1701c/krunner-firefox

NordVPN plugin

This plugin allows you to easily connect to NordVPN servers, disconnect and view the status. A configurable status is available in KRunner or an extended one when clicking/pressing enter on the respective result. When connecting, a country, city or specific server may be entered.
It is no advertisement or recommendation! Just saying :D


https://github.com/alex1701c/NordVPNKrunner/

TmuxRunner

Tmux is a terminal multiplexer that allows you to have multiple terminals in the same window (split screen, or multiple “tabs”). You may also detach from it without killing the processes. This is one of the advantages of using it instead or in addition to for example Konsole’s tabs.

Keeping track of the sessions might be a bit hard though. To solve this issue, this plugin provides an overview of the currently active sessions and allows you to create new ones with optionally a specified name. The sessions will be opened in the configured terminal - by default Konsole.


https://github.com/alex1701c/TmuxRunner

QuickWebShortcuts

While I have given the official webshortcuts quite a bit of love over the years, there may be some things lacking. For example, there is always the separator character (colon or space) that separates your query from the provided search, like “dd:testme”. With this plugin, you only need to type one out. Additionally, it can provide search suggestions!


https://github.com/alex1701c/QuickWebShortcuts

VeracryptRunner

This plugin allows one to add and search mount configurations for Verarcrypt. This includes file/device paths, display name, mount path and keyfiles. Optionally, on X11, the password can be read and entered directly using the command line “pass” password manager.

Other mentions

I have the one or other, maybe less useful plugin. Like an integration for KWallet or a little timer utility.
For users of VirtualBox, https://github.com/alvanieto/vbox-runner can be very useful. I contributed a merge requests to allow the plugin to work with KF5 and KF6.