Planet KDE

Subscribe to Planet KDE feed Planet KDE
Planet KDE | English
Updated: 20 hours 38 min ago

KEcoLab in SoK24: Incorporating Energy-Consumption Measurements In The CI/CD Pipeline

Wed, 2024-03-27 20:00
KEcoLab

Sustainability has been one of three goals at KDE over the past 2 years. One aspect of this goal is to measure the energy consumption of KDE software. To do this, it is necessary to access the lab in KDAB, Berlin, which can now be done remotely using KEcoLab.

Figure : Testing and debugging Okular scripts on a Virtual Machine host (image from Aakarsh MJ published under a CC-BY-4.0 license).

KEcoLab (remote-eco-lab) is a KDE Eco project aimed at enabling remote energy consumption measurements for your software using Gitlab's CI/CD pipeline. By automating the measurement process and integrating with the OSCAR statistics tool, developers can make informed decisions about improving code efficiency and obtain software eco-certification with the Blue Angel. This project came to being as part of GSoC 2023 under the mentorship of Volker Krause, Benson Muite, Nicolas Fella and Joseph P. De Veaugh-Geiss. Karanjot Singh is its original developer.

One of the main aims of Season of KDE 2024 is to integrate KEcoLab into Okular's pipeline. Okular is KDE's popular multi-platform PDF reader and universal document viewer. In 2022, Okular was awarded the Blue Angel ecolabel, the first ever eco-certified computer program. You can learn more about KDE Eco here and the process of measuring energy consumption in the KDE Eco handbook.

Deliverables Of The SoK24 Project
  1. Integrate KEcoLab into Okular's pipeline.
  2. Integrate KEcoLab's pipeline with E2E tests or integration tests.
  3. Usage scenario scripts with KdeEcoTest.
  4. Bug squashing.

I have been working together with Sarthak Negi for this Season of KDE.

Integrating KEcoLab Into Okular's Pipeline

As mentioned, the main aim for this mentorship is to integrate KEcoLab into Okular's pipeline. Okular, being a Blue Angel certified project, will benefit from having its energy consumption measured either for every release automatically or for specific merge requests via a manual trigger. In this way it is possible to track Okular's energy consumption and make necessary changes to adhere to Blue Angel specifications.

I have had discussions with the Okular team regarding the integration of KEcoLab into their pipeline. This was necessary to make sure that the new addition won't change their existing workflow rules, i.e., there would be no manual work required on their end to trigger the pipeline on every release. At the same time, we wanted to make sure it is possible to manually trigger the measurement process on a case-by-case basis. I'll go into further details below. The email exchange can be accessed here.

I have been testing the pipeline on a test-repo for the past few weeks, which can be accessed here.

The pipeline was tested for the following contexts:

  1. Triggering KEcoLab's pipeline for energy measurement:

    a) using Web UI.

    b) pushing the tag through Git.

  2. Pipeline runs on triggering it manually through the Web UI.

  3. Pipeline does not run on merge request.

  4. Prevent pipeline from running on every commit push.

The above was achieved by making use of a combination of GitLab's workflow: rules and GitLab's predefined CI/CD variables. There were several difficulties I faced during this time, notably preventing the pipeline from running on every release and rather restricting it to only major releases. During one of the monthly meetings, however, Volker thought this would not be necessary since there is only one release per month, i.e, for the time being it is not important to cherry pick the release candidates. As it is now, the measurement process will therefore be triggered on every release of Okular. This may change at a later date, and so I will document here some thoughts I had on how to this.

I initially thought about making use of a global variable which would be updated in the .pre stage depending on a comparison between the last and second-to-last tag to determine whether it's a major or minor release. This would be achieved by making use of a regex rule to identify the difference. The way this would work is by adding a rule under every job to check for the value of the variable. However, since the value wasn't persistent, I took a different approach by making use of artefacts which would contain the value required to determine if it's a major or a minor release version. When a measurement should be triggered, and when not, looks something like this:

  • v1.8.3 -> v2.0.8 # Pipeline should run

  • v2.2.3 -> v2.6.8 # Pipeline should not run

The code looked something like this:

check-major-version: stage: .pre image: alpine tags: - EcoLabWorker before_script: - echo "Checking for major version" script: - export PREV_COMMIT_TAG=$(git tag --sort=-v:refname | grep -A1 '$COMMIT_TAG' | tail -n 1) - export MAJOR_VERSION_CURRENT=$(echo $COMMIT_TAG | sed 's/v\([0-9]*\).*/\1/') - export MAJOR_VERSION_PREVIOUS=$(echo $PREV_COMMIT_TAG | sed 's/v\([0-9]*\).*/\1/') - if [ "$MAJOR_VERSION_CURRENT" == "$MAJOR_VERSION_PREVIOUS" ]; then IS_MAJOR_RELEASE="false" > release_info.env; fi artifacts: reports: dotenv: release_info.env

Once I started testing it, I realised that the value of the updated global variable did not persist across jobs. Therefore, using the variable to determine whether the job should run or not was not viable. Additionally, I realized that this approach would still cause the pipeline to run and in any case it would result in a failed pipeline if all the jobs did not run. Since we decided the measurement process can run on every release, I abandoned trying to implement this.

Currently the pipeline is being tested on my fork of Okular here. It's almost ready, we just need to add the test scripts under 'remote-eco-lab/scripts/test-scripts/org.kde.okular' for which this patch has been made.

Figure : Testing Okular in KEcolab (image from Aakarsh MJ published under a CC-BY-4.0 license). Bug Squashing

This includes the following:

Updating The Test Script To Comply With The Latest Kate Version (Issue !23)

Kate was one of the first application that KEcoLab had test scripts for. Even though we made use of as many shortcuts as possible, we were still using tabs to navigate around the user interface. This caused a problem: the previous script was made on Kate v21, and with Kate v24 being released the script needed to be updated accordingly. Also, testing the script across different distros highlighted a shortcoming of a bash-script approach: on Ubuntu the file was not being saved as intended, whereas on Fedora the file was being saved. In other words, small differences had potentially significant impacts which could make the script fail. In fact, it is one of the more fragile aspects of this approach to usage scenario scripting, which a semantics-based tool like Selenium doesn't have.

Figure : Testing Kate scripts on a Virtual Machine host (image from Aakarsh MJ published under a CC-BY-4.0 license). Helping Debug A Test Script On The Remote Lab PC (Issue !29)

There is a usage scenario script that is failing on the System Under Test. Worse yet, we do not know why and currently have no way to visually monitor the issue. This is a real pain point, mainly because we are unsure what may be the underlying problem. The script simulating user behavior doesn't seem to exit after completion, resulting in the lab being stuck in an endless loop. It is only exited when the GitLab runner times out. Since we don't yet have visual output of what is happening on the System Under Test, we are setting up a VNC to monitor what is happening. If anyone is interested in helping debug this, take a look at the remote eco lab job here. Also, check out the discussion at this issue regarding the visual monitoring of what is happening on the remote lab PC.

Figure : Testing scripts running remotely on the System Under Test in the measurement lab at KDAB, Berlin (image from Aakarsh MJ published under a CC-BY-4.0 license). Test Out And Update The SUS Scripts For Okular In The FEEP Repository (Issue !52)

This mainly involved testing the script and cross-checking everything works. In this case, the shortcuts defined at the very top weren't consistent with the shortcuts used by the script.

Looking To The Future Of KEcoLab
  1. Usage scenario scripts with KdeEcoTest. Since KdeEcoTest now supports Wayland thanks to Athul Raj and runs on Windows thanks to Amartya Chakraborty, we can utilize this tool to further enhance the remote lab. The current bash scripts are based on xdotool, which only supports X11 and not Wayland and does not run on Windows. With Plasma 6 now supporting Wayland by default, and many KDE apps being available on Windows, including Okular, this seems to be the right next step for KEcoLab tooling.

  2. Setting up a VNC to monitor scripts visually. The problems faced by us have put further emphasis on the need to be able to monitor what is or is not happening on the remote System Under Test. This was also previously considered. From Joseph's notes, based on work done by Nicolas Fella during one of the lab setup sprints, the following approach can be utilized:

# VNC/remote desktop access ## Server Install - apt install tigervnc-standalone-server - echo "kwin_x11 &" >> .vnc/xstartup - echo "konsole" >> .vnc/xstartup ## Start Server - tigervncserver -geometry 1920x1080 ## Client create SSH tunnel: - ssh -N -L 5900:localhost:5901 kde@INSERT_IP_HERE In VNC client, e.g. KRDC: - connect to localhost:5900 It will start a single Konsole window. Use this to start other stuff

If this doesn't work, we may want to reference x11vnc. If anyone has successfully setup VNC before, feel free to reach out as we would appreciate your help!

Interested in Contributing?

If you are interested in contributing to KEcoLab, you can join the matrix channels Energy Measurement Lab and KDE Energy Efficiency and introduce yourself. KEcoLab is hosted here. Thank you to Karan and Joseph as well as the whole KDE e.V. and the wonderful KDE community for helping out with this project. You can also reach out to me via email or on Matrix

Categories: FLOSS Project Planets

Kdenlive 24.02.1 released

Wed, 2024-03-27 18:52

We’re delighted to announce the first maintenance release of the 24.02 series, tackling regressions, bugs, and crashes. A big thank you to everyone who reported issues during this transition – keep up the great work!

Changelog

  • Fix crash on group cut. Commit.
  • Fix possible startup crash. Commit.
  • Fix typo. Commit.
  • Fix appstream release notes formatting. Commit.
  • Add release notes to AppData. Commit.
  • Fix: some sequence properties incorrectly saved, like subtitles list, timeline zone. Commit. Fixes bug #483516.
  • Fix: Windows crash clicking fullscreen button. Commit. Fixes bug #483441.
  • Fix: cannot revert letter spacing to 0 in title clips. Commit. Fixes bug #483710.
  • Fix: font corruption on Qt6/Wayland. Commit.
  • Fix: Fix pan timeline with middle mouse button. Commit. Fixes bug #483244.
  • Minor cleanup. Commit.
  • When file fails to open, display MLT’s warning to help debugging. Commit.
  • Fix crash trying to recover a backup after opening a corrupted file. Commit.
  • Fix multiple subtitles issues: several tracks not correctly saved, sequence copy not suplicating subs, crash on adding new subtitle track. Commit. Fixes bug #482434.
  • Update file org.kde.kdenlive.appdata.xml. Commit.
  • Update file org.kde.kdenlive.appdata.xml. Commit.
  • Add .desktop file. Commit.
  • Updated icons and appdata info for Flathub. Commit.
  • Org.kde.kdenlive.appdata: Add developer_name. Commit.
  • Org.kde.kdenlive.appdata.xml use https://bugs.kde.org/enter_bug.cgi?product=kdenlive. Commit.
  • Fix bin thumbnails for missing clips have an incorrect aspect ratio. Commit.
  • On sequence change, recursively update each sequence that embedded it. Commit. Fixes bug #482949.
  • When using multiple timeline sequences, fix change in a sequence resulting in effect loss if the tab was not changed. Commit.
  • Fix crash on spacer tool with grouped subtitle. Commit. Fixes bug #482510.
  • Fix crash moving single item in a group. Commit.
  • Block Qt5 MLT plugins in thumbnailer when building with Qt6. Commit. Fixes bug #482335.
  • [CD] Disable Qt5 jobs. Commit.
  • Don’t allow autosave when the document is closing. Commit.
  • Fix deleting single item in a group not working. Commit.
  • Fix moving a single item in a group with alt not always working and breaks on undo. Commit.
  • Fix another case of clips with mixes allowed to resize over another clip, add tests. Commit.
  • Fix adding a mix to an AV clit that already had a mix on one of its components moving existing mix. Commit.
  • Fix typo. Commit.
  • Fix for Qt6’s behavior change in QVariant::isNull() (fixes speech to text). Commit.
  • Fix crash on invalid gradient data. Commit. Fixes bug #482134.
  • Enforce proper styling for Qml dialogs. Commit.
  • Fix incorrect Bin clip video usage count and initialization, spotted by Ondrej Popp. Commit.

The post Kdenlive 24.02.1 released appeared first on Kdenlive.

Categories: FLOSS Project Planets

Haruna 1.0.2

Wed, 2024-03-27 07:00

Haruna version 1.0.2 is out.

There are not a lot of changes in this release as the focus was on porting to Qt6 and KF6 and code refactoring. Some hwdec options have been removed, if needed they can be set in the settings under "Custom commands" as set hwdec decoding_method_name and choose "Run at startup".

You can get it now on flathub:

Windows version can be found here. Availability of other package formats depends on your distro and the people who package Haruna.

If you like Haruna then support its development: GitHub Sponsors | Liberapay | PayPal

Feature requests and bugs should be posted on bugs.kde.org, but for bugs make sure to fill in the template and provide as much information as possible.

Changelog: 1.0.2

Features:

  • Opening items from the playlist is faster
  • If Maximum recent files setting is set to zero the recent files are removed from the config file

Bugfixes:

  • Opening file through Open File action was not playing the file
  • Opening playlist file from playlist header was not doing anything
  • Hiding/showing Playlist toolbar setting was not working
  • Track sub-menus in Audio and Subtiles global menus being empty
  • Freeze when opening HamburgerMenu
Categories: FLOSS Project Planets

KTextAddons 1.5.4

Tue, 2024-03-26 20:00
KTextAddons 1.5.4 is a bugfix release of our text display and handling library It fixes two notable bugs and updates translations Fix bug 484328: Kmail config dialog takes about 40 seconds to show up Use QListView::clicked (in emoji popup menu) URL: https://download.
Categories: FLOSS Project Planets

Free software wisdom

Tue, 2024-03-26 17:35

Every week veteran KDE contributor Kevin Ottens posts a bunch of thought-provoking links on his blog, and last week’s post contained one that I found particularly enlightening:

40 years of programming

It’s a collection of wisdom written from someone named Lars Wirzenius who started his software development career decades ago and has seen it all. While I don’t have 40 years of programming under my belt, I do have 16 years in programming, QA, release engineering, and management, and everything Lars wrote rings true to me. I’d encourage everyone to give it a read!

Here are my favorite takeaways:

  • Take care of yourself, or else you’re no good to others.
  • Useful software is too big to create alone, so your most important skill is the ability to collaborate.
  • Write caveman code anyone can understand, unless complexity can be justified by measurably and consistently better performance.
  • Do work in small chunks, and repeat.
  • Diversity of perspective is important, or else you’ll end up accidentally making something that only works for a narrow slice of people.
  • Know who the intended user is, and try to see things from their point of view.
  • Developing software is political. Deal with it.
  • Learn to write, and write stuff down.

But do check out the whole thing!

Categories: FLOSS Project Planets

Software Engineering Training in the Age of Generative AI

Tue, 2024-03-26 09:48

This is a piece I also wrote for the enioka blog, so there is a French version available.

At enioka Haute Couture we started offering trainings a little while ago. True to our DNA this is focusing on software engineering practice rather than a given tool, framework or API. This is why we have courses on topics like software architecture, refactoring, dealing with legacy code, test driven development (TDD), code review and so on.

Also, not every team has the same needs. Some prefer a few intensive days during a given week, others prefer smaller sessions over an extended period. That’s why our courses are designed to be flexible. They can be tailored to build a multi-day session, or all the way down to many one hour knowledge building sessions.

Hopefully, this all sound great to you (for sure it does sound great to me). So why talk about this now? Is it some kind of advertisement stunt? Well… not really.

You see, while working on our training offers something happened. Almost three years ago GitHub announced GitHub Copilot. It was just a technical preview at the time. Since then, there has been an arms race in the large language model (LLM) domain. Like it or not, generative AI is here to stay and code assistants based on such models are used more and more.

I’m not one of those doom sayers claiming such models and assistants are going to take over our jobs. Likewise, I don’t think they’re going to double the daily productvity of developers. Still, they will necessarily impact how we work and the code which is produced. So keeping an eye on development practices, I’m less concerned about disappearing developer jobs and more concerned about a drop in the quality of the code produced.

Indeed, early studies indicate that code assistants when introduced in an unchecked manner tend to push the code quality down and tend to increase the amount of security issues introduced. Interestingly the main factors highlighted are behaviorial. Which means that before waiting for a magical new assistant which would code perfectly (spoiler: it won’t happen), we should rather improve the way we introduce and use those tools.

Which gets me back to the [enioka Haute Couture trainings]. In this new era, we have to acknowledge coding assistants during our trainings. This perfuses all the topics I mentioned previously. There is now a nagging question for all our software development practices: when is a coding assistant the right tool for the job?

If you’re practicing TDD or trying to improve your use of it, is it a good idea to have the coding assistant write the tests for you? Maybe not… since it is where you make important design decisions, you likely want to stay at the helm. Might come in handy to generate the code which must pass the tests though.

If you’re dealing with a legacy code base which needs to be modernized, for which part of the process the coding assistant will make you faster? Updating the code to a newer version of the language or dependencies? Extracting clearer modules and functions? Writing approval tests to secure all of that?

There are many more such questions… and you can explore the answers with us during one of our training sessions. We’ll keep talking TDD, legacy code… with a twist!

And of course, just like any other tools, what we’re proposing is not specific to a given solution. You use GitHub Copilot? Codeium? A specific in-house fine-tuned model? This is fine. We’ll take this into account during the training to adapt it as much as possible to the involved developers and their context.

If you want to discuss this further, feel free to get in touch with us.

Categories: FLOSS Project Planets

KDE Plasma 6.0.3, Bugfix Release for March

Mon, 2024-03-25 20:00

Tuesday, 26 March 2024. Today KDE releases a bugfix update to KDE Plasma 6, versioned 6.0.3.

This release adds two weeks' worth of new translations and fixes from KDE's contributors. The bugfixes are typically small but important and include:

  • System Monitor: Colorgrid: Use the same background color as pie/bar charts. Commit. Fixes bug #482664
  • Plasma SDK: Fix desktop file name for icon explorer. Commit.
  • Startplasma: Use the sound theme setting for startup sound. Commit.
View full changelog
Categories: FLOSS Project Planets

Plasma 5: The Early Years

Mon, 2024-03-25 14:09

With KDE’s 6th Mega Release finally out the door, let’s reflect on the outgoing Plasma 5 that has served us well over the years. Can you believe it has been almost ten years since Plasma 5.0 was released? Join me on a trip down memory lane and let me tell you how it all began. This coincidentally continues pretty much where my previous retrospective blog post concluded.

The earliest clean full-desktop Plasma 5 screenshot I could find in my archives, dated December 2014

We released Plasma 5.0 on Tuesday, 15th July 2014, one week after the first issue of the KDE Frameworks 5, and 11 months after last Plasma 4 feature release which was part of the KDE Software Compilation 4.11. It featured an all-new shell written in QML and Qt Quick with infrastructure to switch between different form factors at runtime – ever wondered why the file it stores your desktop config in is called plasma-org.kde.plasma.desktop-appletsrc? It’s because your settings are stored per form factor.

Plasma 5 also came with a new theme titled “Breeze” with a frosted glass effect behind its panels and popups as opposed to the blurred transparency of its predecessor “Air”. This was done to avoid contrast issues with text on some, particularly dark, backgrounds. The unified System Tray popup that we still use today also had its debut then. Additionally, the window switcher, activity switcher, and widget explorer were all moved to a vertical sidebar on the left hand side to accommodate the now ubiquitous wide-screen monitors, a decision that was later criticized and ultimately let us choose a more traditional window grid again for Plasma 6’s Alt+Tab feature.

Unified System Tray popup, a staple of every Plasma desktop since 5.0

Neither the Breeze icon theme nor the Breeze window decoration were fully finished in time for the release, which meant that apart from the Plasma shell, visually the experience was very similar to using the KDE Software Compilation 4. Above all due to the fact that it wasn’t until December that we shipped our first KDE Applications based on Frameworks 5.

While there already was a Breeze window decoration featuring the meanwhile abandoned dark title bar and circle close button, it was built using Aurorae, the QML window decoration engine. Unfortunately, its new hardware-accelerated Qt Quick Scene Graph in Qt 5 didn’t interface well with KWin’s own rendering pipeline yet. Instead, a new KDecoration2 library was created to shed its predecessor’s dependency on X11 and Qt Widgets. However, the initial commit didn’t even land in KDE Git repositories until 18th July, three days after the release of 5.0.

You ain’t working hard enough if your desktop isn’t cluttered with sticky notes!

Unlike Plasma 6 which is obviously already built around Qt Quick and thus porting widgets was relatively straightforward, for Plasma 5 we actually had to rewrite them all. Only a few had previously been ported to QML in the late 4.x era, like the battery monitor, task manager, or virtual desktop pager. This meant that Plasma 5.0 featured a greatly reduced set of widgets, notably lacking most of the KDE Plasma Add-ons. Aside from that, in preparation for Plasma on Wayland, KWin’s binary was renamed kwin_x11 but kwin_wayland would only follow a few months later.

Plasma 5.1, published in October 2014 marked the return of the Sticky Notes widget as well as a few other omissions from the initial release. It also introduced the Clipboard applet in System Tray, replacing the QtWidget-based Klipper of Plasma 4. Alongside the re-introduction of the “Icon Tasks Manager” that behaves more like a Dock, mixing launchers, windows, and applications, it also saw the implementation of the “Alternatives” feature for quickly switching between similar widgets, such as regular task bar and icon task bar, or between different application launchers or clock styles.

We sure have come a long way in terms of UI design… (admittedly, Qt didn’t have great high-dpi support back then)

Speaking of clocks, I ported the most important of them all: Fuzzy Clock. Originally, it used JavaScript in the translation file (!) to transform “half past 8” to “halb 9” in German. I couldn’t figure out how to replicate that from QML since it didn’t know what to do with a KLocalizedString instance. Hence, I wrote a PHP script (it’s all the scripting languages I knew at the time) to generate the Array of 5-minute interval strings you still see in there today – true meta-programming! Finally, the Breeze widget style was now available for Qt 4 applications, making sure that visually both old and new looked indistinguishable.

Plasma 5 goes mainstream

The first release that saw widespread adoption was Plasma 5.2, released on 27th January 2015 and oh boy was that a psychedelic wallpaper! KScreen saw its return with automatic display configuration and remembering screen layouts based on the connected devices. Early Plasma 5 nevertheless had a couple of multi-monitor issues. This was also in part part due to bugs in then-new QScreen that we used instead of Plasma 4’s own Kephal library since we wanted to have a single source of truth for output configuration. I remember a colleague at work trying out Plasma 5.2 on Kubuntu 15.04 on his shiny new Dell laptop with high-dpi screen and was not very satisfied with the setup on his external 24″ monitor. To be fair, most of his issues were actually related to X11 not supporting per-display scaling.

Remember the Dashboard? Originally, there was another layer to place your widgets

Plasma 5.2 furthermore introduced the “Undo” feature when removing a Plasmoid. Shortly afterwards I assumed maintainership of PowerDevil, KDE’s power management service, and set up this very blog instance. In March 2015 I attended my first Plasma sprint in the Blue Systems Barcelona offices. It’s when we persuaded Ken Vermette (who even brought a French press in his suitcase all the way from Canada) to ship the wallpaper he had been using on his laptop as the default in Plasma 5.3, something he continued doing for many years, leaving a lasting impression on Plasma 5’s visual identity. It was also the inception of the Energy Info module, the first KCM (“KDE Configuration Module”) written in QML, and it unfortunately shows. The code hasn’t changed much since then, including its custom Canvas-based graph as we didn’t have a good QtQuick-compatible chart plotting library yet. The “wake-ups” API in UPower is long gone, however, and it’s definitely one of the user interfaces that in hindsight I am a lot less proud to still see around.

Amusingly, this file was named sexystats.png – not so sure about that ;-)

DDC (Display Data Channel) support in PowerDevil to control desktop monitor brightness is something I worked on at the time but it took many years (and in fact someone else to implement it) before it got actually shipped with Plasma. So much for “I’m quite confident to get that into 5.3.”. We might finally see multi-monitor brightness controls in a subsequent Plasma 6 update, though with HDR support many aspects of that need to be entirely reworked. A project I started that year which didn’t make it either is KDE Connect integration in Solid, KDE’s Hardware abstraction framework. The idea was to show devices paired through KDE Connect as removable storage just as any local USB stick would.

One year later

Plasma 5.4, released in August 2015, just after that year’s Akademy saw the return of KRunner’s history. David Faure told me at the conference he couldn’t switch to Plasma 5 without it, so here we are. This release was also the first to integrate with Qt’s relatively new high-dpi support and gave us a properly scaled user interface for applications, including spacing and line art, rather than just enlarged font sizes and icons. Plasma 5 from its inception was designed with high-dpi in mind and had its own scaling mechanism which predated Qt’s. It took us a long time to make the two work well together and only in Plasma 6 we were confident enough to make the Plasma shell scale its UI entirely using Qt’s mechanism by default under X11.

Dolphin in high-dpi Breeze glory for the very first time

Additionally, the Volume Plasmoid designed around PulseAudio (plasma-pa) replaced KMix. The full-screen application dashboard useful for convertibles and touchscreen laptops had its debut. And let’s not forget: Plasma Mobile was introduced in 2015, too! Seeing the volume popup I know from my laptop plop up on one of the Nexus 5 devices as I pressed the volume rocker was truly mind-blowing. People argued the purpose of Plasma Mobile a lot but thanks to Plasma’s modular nature much of its code was shared with its desktop counterpart. Also, much of the initial advances of Plasma on Wayland were driven by it since you really don’t want to have an X Server running on your phone. Some long-time KDE fellows might be able to tell you stories of a company that actually tried…

User switcher Plasmoid

One of my clients at the time was running Plasma 4 on a single shared computer they used for accounting and purchase. For ease of operation (they’re not computer-savvy people after all) I had installed the Fast User Switch Plasmoid. When it came time to migrate them over to Plasma 5, I naturally needed a replacement. Therefore, I wrote a clone of said applet in QML and upstreamed it to KDE Plasma Add-ons where it was released as part of Plasma 5.5 in December 2015. During its development I wrote a SessionsModel class for conveniently enumerating all logged-in users. Utilizing it, I created a proper user switcher for Plasma (nowadays we merely jump to the user switcher we already have on the lock screen), mimicking the look of the logout screen. This change actually made it into a printed issue of Linux Magazin! Previously, KRunner was in charge of that, a rather odd UI choice, I think. Fun fact: you can still type “SESSIONS” (all-caps) into KRunner today to bring up the list of logged in users.

Originally, we considered XEmbed, a protocol to embed X11 windows into other windows used for System Tray icons back in the days, obsolete. Nevertheless, we received many requests to restore support for legacy tray icons. That is why we came up with “XEmbed SNI Proxy” which acts as an XEmbed endpoint for apps to enroll their tray window with and translate them into proper icons registered with the contemporary Status Notifier Item DBus specification.

Plasma 5.5 is also when we started doing releases Fibonacci-style with the first update after a feature release scheduled just one week later, then another week, then two weeks, three weeks, and finally five weeks, just before the next feature release. This ensures that fixes for issues found in one of the new features reach users promptly. We’ll continue doing that for early Plasma 6, particularly for important additions to the Wayland session, but eventually we might consider slowing down a bit to take pressure of distributions having to package it all.

Jump list galore Unity Launcher API in action (number badge and progress reporting) – also mind everyone’s favorite cashew!

I’ve always been jealous of Windows 7’s ability to display application progress, quick launch shortcuts, and recent documents in its task bar. I spent most of my Christmas vacation in 2015 implementing the so-called “Jump Lists” in Task Manager. Ubuntu’s then-current Unity desktop already implemented a DBus API for application badges and progress reporting that was already widely supported in non-KDE applications through libunity. Alas, I never wrote a KDE Frameworks equivalent, so the few KDE applications that make use of it (e.g. KDevelop for displaying compilation progress in task bar, or various chat applications indicating unread messages) just emit the relevant DBus signals directly. Only in Qt 6.5 did we finally get QGuiApplication::setBadgeNumber as a partial cross-platform replacement for the discontinued QWinTaskbarButton.

On top of that, applications can define additional actions in their desktop file that are listed in the relevant launcher context menu – be it pinned applications in task manager or the Kickoff menu. Notable examples are “Open new incognito tab” for a browser, or “Compose new message” for a mail client. Around the same time Spectacle, our handy screenshot tool, saw the light of day, replacing KSnapshot, and of course I added a bunch of shortcuts for its various modes (such as “Take Rectangular Region Screenshot”), even though I usually just hit Meta+Shift+PrtScr (or Meta+R in Plasma 6 but that’ll always be “Run Command” to me) to take a region screenshot

Never implemented due to the kernel just side-stepping us here: Feedback OSD when toggling Wifi via keyboard shortcut

Plasma 5.6, released in March 2016 had the first release announcement to feature an introduction video with a narrator and all. It also enabled the Breeze Plasma theme to follow the current color scheme – there’s nothing like a Honeycomb Kickoff to brighten up your day! One thing we naturally don’t want to talk about is application crashes, which is why it’s not mentioned in the announcement that starting in this version DrKonqi, our crash handler, shows a sleek Plasma notification instead of its main window. The idea is to get you to re-launch your app as fast as possible and not add insult to injury by having you also close a stupid dialog window on the way.

Getting Physical @ CERN

One of my personal KDE career highlights was the 2016 Plasma Sprint at CERN (yes, the one with the particle accelerator) near Geneva, Switzerland. The event took place in their IdeaSquare, a place to collaborate and innovate within CERN, including a red ex-London double-decker bus parked in the middle of the building as a retreat, should you need to think about things in silence. It’s also when I tried to log into a Plasma Wayland session for the very first time.

Since Switzerland, and Geneva in particular, is quite expensive, for dinner we usually walked the 3km or so to neighboring village of Saint-Genis-Pouilly in France trying to find some more affordable restaurant options. As I came to the event by car, we also used it to buy cheap(er) beer in a French grocery store and sneakily drank it in the CERN cafeteria until they kicked us out at night. I sadly missed the tour of the particle accelerator (they also used Plasma 4 in their control room from what I heard) as I had already arranged to go skiing the adjacent weekend over in Austria.

Plasma 5.7, released in July 2016 made Jump Lists available through KRunner, too. We also came up with a way to colorize Breeze icons at runtime, replacing its dark strokes with white ones for use in dark themes as well as when used on top of the blue menu highlight. It’s done by merely altering the SVG string at load time, replacing a bunch of CSS rules. I hope with Qt’s renewed interest in icon theming we’ll get that functionality into Qt eventually. We also introduced the modular libtaskmanager with support for Wayland windows. It essentially does “functional programming” through QAbstractItemModel, stacking a bunch of proxy models on top of each other, each one executing a specific transformation (group by application, filter by desktop, etc) on the list of windows. Sadly, it lost the Win32 EnumWindows functionality in the process – yes, Plasma could display your Windows windows at some point!

Randaaaa, Valais, Switzerland – most beautiful village to host a developer sprint

In June 2016 I went to Randa Meetings in the Swiss Alps, one of the most productive sprints I’ve ever attended. Admittedly, there wasn’t much to do besides hacking all day and eating Swiss Chocolate. If you ever wondered whose finger it is pointing at me on my Phabricator profile picture: it’s David Edmundson’s. We had a bit of white wine that evening and while listening to music together decided it was a good idea to take random profile pictures. During our stay we also visited the village of Zermatt near infamous Matterhorn, a place devoid of cars! The only vehicles you’ll find there are small golf cart like electric vehicles to transport people and goods to one of the many hotels. It’s also where I had the most expensive scoop of vanilla ice-cream in my life. We also took the cable car up a mountain (which wasn’t Matterhorn but I can’t remember which one it was) and hiked back down, all the while talking about the then-new Qt 5.7 release.

KDE turns 20

I still fondly remember the first week of September 2016 when Akademy was co-hosted with Qt Con in Berlin. A bunch of KDE folks and I shared an apartment in Friedrichshain and the weather was just beautiful. Every morning we cycled from our apartment through Brandenburger Tor, past Siegessäule, to TU Berlin “MAR Building” where the BoF sessions were located.

Better use protective eye wear

Plasma 5.8, released in October 2016, just before KDE’s 20th birthday, is when we became really confident in Plasma 5 as a product and made it our first LTS (long-term support) release. Originally, we also considered Plasma 5.6 for that. It was also coming together nicely with Qt 5.6 declared an LTS release. To celebrate the occasion, we even got Chris Fisher of The Linux Action Show to voice our release announcement video! It’s also when we tried to unify the whole startup and shutdown experience and brought you the Blinding Blue colored login screen. Sorry about that! Actually, I had one of my office walls painted that color and I love it.

Typically, the first feature update after an LTS is the time to add fancy new features. Plasma 5.9, released in January 2017, sees two of the features I am still most proud of and enjoy every single day when using Plasma: audio indicators in task bar and draggable notification thumbnails. Being able to press a shortcut, take a screenshot, and then drag it from the preview in the notification popup straight to where I need it, the web browser, an email composer, or a chat client, is an unbelievable productivity booster.

Furthermore, web browsers back then already indicated which tab was playing audio, therefore it felt natural to have Plasma’s task manager do the same. Unfortunately, the audio stream isn’t actually attached to a window, thus every window of the same app will show the indicator. While PulseAudio actually supports apps associating their audio stream with an X11 window ID, I have never seen this actually used in practice and of course that wouldn’t help us much under Wayland. It gets even more complicated when you consider sandboxing (where the process ID a client reports might be in a different namespace from the Plasma shell) or a web browser’s multi-process architecture (where the process owning the window is not necessarily the one managing audio streams).

Plasma Sprint in Stuttgart Last time I checked the KDE decoration they put up for us was still there

In 2017 I organized the Plasma Sprint in Stuttgart, kindly hosted by my employer at the time. That’s when I unveiled Plasma Browser Integration, an extension for Firefox and Chrome to more tightly integrate them with the Plasma desktop. I realized that people spend most of their time on a computer actually on the web and with KDE not having a stake in any of the major browsers anymore it became virtually impossible to seamlessly bridge the two worlds. KDE Connect integration, finding browser tabs through KRunner, and download reporting in Plasma’s notification center were my main motivation for fathering this project.

Didn’t make the cut: Incognito tab indicator in Plasma Browser Integration

One night we went up the Fernsehturm (TV tower) in Stuttgart which had only recently reopened after renovation owing to fire safety regulations. I haven’t been up there there myself despite growing up in The Länd so I figured it’d be a nice social event. It’s that day when at 147 meters above the ground we brainstormed apps surviving a crash of the Wayland compositor for the very first time. Aside from that, during the sprint, some folks went to local Media Markt and bought a floppy drive. This allowed me to fix Solid erroneously calling them “0 Byte removable media”. It actually wasn’t until KDE Gear 23.08 of last year that KFloppy, a tool to format floppy disks, was finally allowed to retire.

That year is when we coined the expression “Simple by default, powerful when needed” that captures the spirit of Plasma very well. Out of the box, it just works for the majority of our users whereas it also lets them tailor it to their very specific needs. Back in the days, I had to spend forever wading through config dialogs before I was satisfied with the KDE desktop experience. Nowadays, I just move the panel to the top and window buttons to the left because I prefer it that way and call it a day.

Unresponsive apps get desaturated since Plasma 5.10

I didn’t attend Akademy 2017 in Almería for personal reasons. Nevertheless, I actually received an Akademy Award for my work on Plasma which is complementing the blue wall in my office very nicely. Due to my absence, I received it by mail alongside an Akademy T-Shirt. The yellow sun with KDE logo is still one of my favorite designs and I wear it a lot!

In 2018 I joined Blue Systems to work on KDE software full-time. Of course that meant that there’s now so many more things to talk about that it would surely go beyond the scope of this post, therefore I will wrap it up here since – as always – there has to be some material left for a sequel. I hope you enjoyed dwelling in the past with me for a while and it made you just as excited as I am about the next decade with Plasma 6. We undoubtedly wouldn’t be here without your continued generous donations, support, and contributions!

“Here’s to the next 10 years” (CC-BY-SA 4.0 Drakonic)

Discuss this post on KDE Discuss.

Categories: FLOSS Project Planets

Tellico 3.5.4 Released

Sat, 2024-03-23 13:52

Tellico 3.5.4 is available, with a few fixes.

Improvements and Bug Fixes
  • Fixed bug with opening help from the config dialog (Bug 479591).
  • Updated Open Library source to search for comics (Bug 479506).
  • Fixed bug with filter dialog buttons (Bug 479771).
  • Fixed display bug with entry status (Bug 479843).
  • Fixed bug for entry selection after changing group field (Bug 480297).
  • Fixed DVDFr searches with title accents.
  • Updated FilmAffinity data source.
Categories: FLOSS Project Planets

Using the QML Language Server for KDE Development

Sat, 2024-03-23 09:00

For a while Qt has been offering qmlls, a Language Server Protocol implementation for QML. This allows popular text editors like Kate (and some lesser known ones like Visual Studio Code) to work with QML code without having to write dedicated support for it.

Naturally many people are eager to use it to hack on KDE code. When trying to do that you probably have encountered some frustration with things not working as expected. So what’s going on there, and how can we make it work?

First and foremost one must mention that qmlls is still under heavy development. There’s a number of things missing that you’d expect from a fully featured LSP implementation. If you encounter something that looks like it should work but doesn’t, don’t hesitate to file a bugreport.

So how does one use qmlls? In Kate it should be activated out-of-the-box when opening a QML file. If that doesn’t work you might need to tweak the LSP-Client settings. For other editor please consult their documentation on how to enable LSP support.

One problem you are likely to encounter when using qmlls on KDE code is that it fails to find KDE-provided QML modules like Kirigami. This happens when the modules are installed into e.g. ~/kde/usr, which isn’t searched by Qt. One way to get around this is to build and install your own Qt into ~/kde/usr too, since that way the modules will be installed into the same prefix as Qt and Qt will find them. While building your own Qt is a worthwile thing to do in general it’s not a very satisfying solution. I hope we can find a better solution for this soon. See here for a related bugreport.

If your installation is set up in a way that qmlls can find the KDE-provided modules you might still encounter it warning on unknown modules or types. In order for qmlls to show information for a module the module needs a qmltypes file. These files provide machine-readable information about the types that the module exposes. The easiest way to make these available is porting the module to ecm_add_qml_module and declarative type registration. This was done for many KDE modules already, but there’s still a number of them missing. Help on that is very welcome! Something that isn’t obvious is that in order for the tooling to work correctly module dependencies need to be marked explicity via the DEPENDENCIES parameter in ecm_add_qml_module.

If all the modules and types are found correctly you will still encounter some warnings, but most of these should correspond to actual issues and non-optimal practices like using unqualified property lookups and context properties. qmlls is a great tool to guide you towards resolving those and thus modernizing and optimizing the code. There are however some classes of warnings for which we don’t have proper solutions yet:

  • Our translation functions, i18n and friends, are considered unqualified lookups by qmllint/qmlls. This is because they are magically injected into the engine at runtime. It’s not clear how a solution for this could look like.
  • When writing KCMs we expose the module’s C++ class via the kcm context property, which is opaque to the tools. A different approach is needed.

Despite the current limitations qmlls is already a very useful tool for working on QML code, assuming the project is set up properly.

Happy QML hacking!

Categories: FLOSS Project Planets

This week in KDE

Sat, 2024-03-23 01:24

The bug-fixing continued this week with the aim of getting Plasma 6.0.3 into a great state. Already the big bugs you folks found have almost all been fixed, and this week a lot of time was spent on some X11 regressions and various crashes that our new automatic crash reporting system was able to find (thanks for submitting those! It really does help). A number of automated tests were also added, and finally some nice UI improvements to round things out. More exciting work is in progress too, but not quite ready to mention here!

New Features

Ark can now open and un-archive self-extracting .exe archive files (Kai Uwe Broulik, Ark 24.05. Link)

System Monitor’s “bar chart” style can now be shown horizontally, not just vertically (Jin Liu, Plasma 6.1. Link)

UI Improvements

Did you know then you can middle-click a file in Dolphin to open it with the first app in the “Open with some other app” sub-menu? I bet you didn’t! I didn’t either. Well, now the menu item for that app indicates this, you can find out! (Kai Uwe Broulik, Dolphin 24.05. Link):

Made the floating panel’s float/de-float animation smoother when using a scale factor, both when using a scale factor above 100%, and also just in general (Fushan Wen, Plasma 6.0.3. Link 1 and link 2)

While you’re in Plasma’s global Edit Mode, you can now click anywhere on a panel to show that panel’s own configuration dialog, rather than having to aim for a tiny little icons-only “configure” button that appears at the end of the panel (Marco Martin, Plasma 6.1. Link):

Entries on System Settings’ Autostart page are now sorted alphabetically, rather than by the order in which they were added (Kristen McWilliam, Plasma 6.1. Link)

Mentioned on System Settings’ Mouse and Touchpad pages that using the middle-click emulation settings will increase click latency by 50ms, so you can make a more informed decision about whether or not to use them (Wladimir Leuschner, Plasma 6.1. Link)

Screen chooser OSD icons now respect the current accent color (Nicolas Fella, Frameworks 6.1. Link):

Bug Fixes

Fixed a recent regression that caused Gwenview to crash when trying to play videos (Nicolas Fella, Gwenview 24.02.2. Link)

Fixed an issue in Okular that caused it to crash when closing a note annotation while spell checking was enabled (Albert Astals Cid, Okular 24.02.2. Link)

Installing a font on Wayland now actually works, rather than crashing System Settings (Nicolas Fella, Plasma 5.27.12. Link)

Fixed a fairly common way that you could get System Settings to crash by applying a new window decoration theme (Nicolas Fella, Plasma 6.0.3. Link)

Plasma no longer crashes when certain music videos are played in Spotify (Fushan Wen, Plasma 6.0.3. Link)

Fixed a recent regression in System Monitor that caused it to crash when discarding changes after editing a page (Arjen Hiemstra, Plasma 6.0.3. Link)

Fixed a strange issue that could cause certain XWayland windows to continuously resize themselves when using certain fractional scale factors on Qt 6.7 (Yifan Zhu, Plasma 6.0.3. Link)

Relaxed KWin’s requirement on Wayland that XWayland windows can only get the clipboard contents when they have keyboard focus, as this was not a requirement on X11 and enforcing it was breaking some XWayland-using apps (David Edmundson, Plasma 6.0.3. Link)

Fixed the startup sound, which had stopped playing at startup after all the sound-related changes made for Plasma 6 (Harald Sitter, Plasma 6.0.3. Link)

Fixed a recent Fitts’-Law-compliance regression in Qt on X11 that could cause panel widgets to not activate when clicking on pixels right against a screen edge (Fushan Wen, Plasma 6.0.3. or Qt 6.6.3, Link 1 and link 2)

Fixed a recent regression that caused the network speed shown in the Networks widget to always appear as something crazily high (Kai Uwe Broulik, Plasma 6.0.3. Link)

Fixed a recent regression on multi-monitor setups that caused Task Manager widgets to display tasks from the wrong screen and notifications on X11 to appear in the center of one of the screens, rather than the correct position (Fushan Wen, Plasma 6.0.3. Link 1 and link 2)

Fixed a recent porting regression in System Monitor that had made it possible to drag pages up when re-ordering, but not down (Arjen Hiemstra, Plasma 6.0.3. Link)

Fixed a recent regression in the colors of the tiles in System Monitor widgets using the Color Grid visualization (Arjen Hiemstra, Plasma 6.0.3. Link)

Improved the robustness of the code that migrates custom global shortcuts from the old KHotKeys service to the new KGlobalAccel service (Nicolas Fella, Plasma 6.0.3. Link)

Fixed an issue with cursor-based camera control in some games on Wayland (Xaver Hugl, Plasma 6.0.3. Link)

The sub-pixel previews on System Settings’ Fonts page now display properly on Wayland (Du Yijie, Plasma 6.0.3. Link)

The Global menu’s compact button form now disables itself when the current app doesn’t have any global menus, rather than disappearing and causing your panel’s contents to bounce around (me: Nate Graham, Plasma 6.0.3. Link)

Fixed a recent regression causing “Total” sensors in System Monitor and its widgets to not work properly (Arjen Hiemstra, Plasma 6.1. Link)

A bunch of random Breeze icons that can appear in the System Tray which weren’t changing color properly when using non-default color schemes now do change color properly (Nicolas Fella, Frameworks 6.1. Link 1 and link 2)

Fixed a source of mysterious random pointless “Unknown Open Collaboration Service API error.(0)” messages when browsing for content in the “Get New [thing]” dialogs (Albert Astals Cid, Frameworks 6.1. Link)

Fixed a recent Qt regression in System Monitor that caused it to crash when attempting to open the details sidebar on the Applications page (Nicolas Fella, Qt 6.6.3. Link)

Other bug information of note:

Performance & Technical

Kup’s Plasma widget has been fully ported to Plasma 6, so it should start working again with the next Kup release (Simon Persson, link)

Global shortcuts for volume control are now handled by a KDED module rather than the last-active instance of the Audio Volume widget, which was fragile and caused the shortcuts to break if there was no such widget, or if you had two and deleted one and didn’t restart Plasma immediately (Bharadwaj Raju, Plasma 6.1. Link)

Automation & Systematization

Wrote a tutorial for creating KWin effects, and moved it to develop.kde.org (Vlad Zahorodnii and Carl Schwan, link)

Moved the “getting started with KDE development” documentation/tutorial to develop.kde.org, which is a better home for it (Thiago Sueto, link)

Added a whole bunch of tests in KWin to ensure that X11 windows behave properly (Vlad Zahorodnii, link)

Added a test to make sure that KRunner’s main UI works (Fushan Wen, link)

Added a test to make sure the screen locking shortcut works (Kristen McWilliam, 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

Please help with bug triage! The Bugzilla volumes are still high right now and help is appreciated. If you’re interested, read this.

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!

As a final reminder, 99.9% of KDE runs on labor that KDE e.V. didn’t pay for. If you’d like to help change that, consider donating today!

Categories: FLOSS Project Planets

Web Review, Week 2024-12

Fri, 2024-03-22 07:59

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

There is no cookie banner law

Tags: tech, gdpr, law, surveillance

It’s not the regulation which brings the banners, it’s the companies insisting on tracking us.

https://www.amazingcto.com/cookie-banners-are-not-needed/


Hackers Found a Way to Open Any of 3 Million Hotel Keycard Locks in Seconds

Tags: tech, security

This is bad. Unlocking many doors is just a couple of taps a way if you’re already a guest.

https://www.wired.com/story/saflok-hotel-lock-unsaflok-hack-technique/


Vision Pro is an over-engineered “devkit”

Tags: tech, apple, vr

Very thorough analysis of the Vision Pro value proposition. It shows quite well where it shines and where it should be improved.

https://hugo.blog/2024/03/11/vision-pro/


Microsoft reportedly runs GitHub’s AI Copilot at a loss • The Register

Tags: tech, gpt, copilot, economics

The price hike on the generative AI services will happen sooner or later. That much is clear.

https://www.theregister.com/2023/10/11/github_ai_copilot_microsoft/


The demise of coding is greatly exaggerated

Tags: tech, programming, ai, machine-learning, gpt, copilot

Definitely this. It might ultimately impact the abstraction levels accessible to us for coding… but the skills will still be needed. Natural language is too ambiguous for the task.

https://muratbuffalo.blogspot.com/2024/03/the-demise-of-coding-is-greatly.html?m=1


Core Guidelines are not Rules - Simplify C++!

Tags: tech, c++, complexity

When guidelines contradict each other. You need a proper way to communicate where a piece of code stands.

https://arne-mertz.de/2024/03/core-guidelines-are-not-rules/


The wrong way to speed up your code with Numba

Tags: tech, python, performance

As usual measure and don’t just assume when you want to optimize something. This is an interesting case in Python using Numba.

https://pythonspeed.com/articles/slow-numba/


How web bloat impacts users with slow devices

Tags: tech, web, frontend, performance

Indeed this. It’s not only about payload size, it’s also about CPU consumption. Our profession is still assuming too much that users will get faster CPU on a regular basis.

https://danluu.com/slow-device/


Obsolescence Paths: living with aging devices

Tags: tech, mobile, obsolescence

Interesting paper showing the main reasons why people ultimately change their phones. I find interesting that the opacity of storage management on mobile devices is such a factor.

https://hal.science/hal-04097867


A Few Words on Testing - by Thorsten Ball

Tags: tech, tests, tdd, quality

Indeed, don’t mindlessly add tests. I find interesting that the doubts raised in this piece are once again concluded using an old quote of Kent Beck. What he was proposing was fine and then over time people became clearly unreasonable.

https://registerspill.thorstenball.com/p/a-few-words-on-testing


Measuring Developer Productivity via Humans

Tags: tech, programming, productivity

Very interesting piece. The DORA metrics are a good thing but I always felt they’re kind of dry and missing something. On the other hand surveys which are more qualitative give also interesting results but come with their own biases. The idea pushed here for better qualitative surveys and to combine them with quantitative metrics like the DORA one is definitely a tempting way forward.

https://martinfowler.com/articles/measuring-developer-productivity-humans.html


Occasional paper: When Armor Met Lips — Crooked Timber

Tags: history, evolution

Very interesting theory on why the nautiloids started disappearing. A specie developed lips…

https://crookedtimber.org/2024/03/16/occasional-paper-when-armor-met-lips/


Bye for now!

Categories: FLOSS Project Planets

Kubuntu Wallpaper 24.04 – Call for Submissions

Fri, 2024-03-22 04:19

We are excited to announce a call for submissions for the official desktop wallpaper of Kubuntu 24.04! This is a fantastic opportunity for artists, designers, and Kubuntu enthusiasts to showcase their talent and contribute to the visual identity of the upcoming Kubuntu release.

What We’re Looking For

We are in search of unique, inspiring, and beautiful wallpapers that reflect the spirit of Kubuntu and its community. Your design should captivate users with its creativity, while also embodying the essence of Kubuntu’s commitment to freedom, elegance, and technical excellence.

Submission Guidelines

Resolution: Submissions must be at least 3840×2160 pixels to ensure high quality on all displays.

**Format: **JPEG or PNG format is preferred.

Original Work: Your submission must be your original work and not include any copyrighted material unless you have permission to use it.

Theme: While we encourage creativity, your design should be suitable for a wide audience and align with the values and aesthetics of the Kubuntu community.

How to Submit

Please send your wallpaper submissions to Rick Timmis of the Kubuntu Council, via one of:

Deadline

The deadline for submissions is March 31, 2024. We will review all submissions and select the design(s) to be included as part of the Kubuntu 24.04 release. The selected artist(s) will receive credit in the release notes and across our social media platforms, showcasing your contribution to users worldwide.

Let Your Creativity Shine

This is your chance to leave a mark on the Kubuntu community and be a part of the journey towards an exciting new release. We can’t wait to see your submissions and the diverse interpretations of what Kubuntu represents to you.

Embrace this opportunity to let your creativity shine and help make Kubuntu 24.04 the most visually stunning release yet. Good luck to all participants!

Categories: FLOSS Project Planets

KDE Gear 24.02.1

Wed, 2024-03-20 20:00

Over 180 individual programs plus dozens of programmer libraries and feature plugins are released simultaneously as part of KDE Gear.

Today they all get new bugfix source releases with updated translations, including:

  • dolphin: Don't hide panels after minimizing (Commit, fixes bug #481952)
  • konversation: Fix closing to the system tray (Commit, fixes bug #482316)
  • knights: Fix crash during game over (Commit, fixes bug #481546)

Distro and app store packagers should update their application packages.

Categories: FLOSS Project Planets

Trusting content on the KDE Store

Wed, 2024-03-20 06:59
Recent events

A global theme on the kde third party store had an issue where it executed a script that removed user's data. It wasn't intended as malicious, but a mistake in some shell parsing. It was promptly identified and removed, but not before doing some damage to that user.

This has started a lot of discourse around the concept of the store, secuirty and upstream KDE. With the main question how can a theme have access to do this?

To developers it's not a surprise that third party plugins can do this sort of thing. It's as intended. A global theme can ship custom lockscreens, custom applets, custom settings and all of these can run arbitrary bundled code. You can't constrain this without limiting functionality.

To that end there's an explicit warning when downloading plugins.

Expectations

Our primary issue boils down to expectation management and communication.

There are plenty of other ways where users can download and run any other unfettered code from the internet; the Arch user repository (AUR), adding ubuntu PPAs and alike. This isn't a bad thing - it's useful and people do amazing things with this to benefit users.

Nothing on the KDE store happens without explicit user interaction either.

A problem is there's an expectation that because it's programs that it's inherently unsafe and a user needs to trust the source. Our issue is phrases like "global themes" or "Plasma applets" don't always carry this message.

The tech world has changed a lot over the past decade and whilst our code hasn't changed, users expectations have. More and more places provide well kept walled gardens where most actions accessible via the UI are safe-by-default - or at least claim to be!

I've also seen confusion that because a lot of our UI is written in a higher-level language (QML) that's enriched with javascript all browser sandboxing automatically applies. Even though that's not what we claim.

But ultimately if there is a gap in expectations, that's on us to fix.

What can we do better?

In the short term we need to communicate clearly what security expectations Plasma users should have for extensions they download into their desktops. Applets, scripts and services, being programs, are easily recognised as potential risks. It's harder to recognise that Plasma themes, wallpaper plugins and kwin scripts are not just passive artwork and data, but may potentially also include scripts that can have unintended or malicious consequences.

We need to improve the balance of accessing third party content that allows creators to share and have users to get this content easily, with enough speed-bumps and checks that everyone knows what risks are involved.


(UI from Flathub for potentially unsafe content)

Longer term we need to progress on two avenues. We need to make sure we separate the "safe" content, where it is just metadata and content, from the "unsafe" content with scriptable content.

Then we can look at providing curation and auditing as part of the store process in combination with slowly improving sandbox support.

Do I need to do anything as a user?

If you install content from the store, I would advise checking it locally or looking for reviews from trusted sources.

If you're a sys-admin you might want to consider adding the following to block users installing addons with the following kiosk snippet.

/etc/xdg/kdeglobals

[KDE Action Restrictions][$i] ghns=false
Categories: FLOSS Project Planets

Splashscreen contributions

Tue, 2024-03-19 20:00
For the next digiKam releases, the digiKam team needs photographs for digiKam and Showfoto splash-screens. Proposing photo samples as splash-screens is a simple way for users to contribute to digiKam project. The pictures must be correctly exposed/composed, and the subject must be chosen from a real photographer’s inspiration. Note that we will add a horizontal frame to the bottom of the image as in the current splashes. If somebody wants to contribute with nice photographs, you can take a look at the previous selected items and follow the instructions to contribute to the dedicated page.
Categories: FLOSS Project Planets

Splashscreen contributions

Tue, 2024-03-19 20:00
For the next digiKam releases, the digiKam team needs photographs for digiKam and Showfoto splash-screens. Proposing photo samples as splash-screens is a simple way for users to contribute to digiKam project. The pictures must be correctly exposed/composed, and the subject must be chosen from a real photographer’s inspiration. Note that we will add a horizontal frame to the bottom of the image as in the current splashes. If somebody wants to contribute with nice photographs, you can take a look at the previous selected items and follow the instructions to contribute to the dedicated page.
Categories: FLOSS Project Planets

How to write a QML effect for KWin

Mon, 2024-03-18 02:00

Since the dawn of the times, the only way to implement any effect that has fancy user interface used to be in C++. It would be rather an understatement to say that the C++ API is difficult to use or get it right so there are no glitches. On the other hand, it would be really nice to be able to implement dashboard-like effects while not compromise on code simplicity and maintainability, especially given the rise of popularity of overview effects a few years ago, which indicated that there is demand for such effects.

In order solve that problem, we started looking for some options and the most obvious one was QtQuick. It’s a quite powerful framework and it’s already used extensively in Plasma. So, in Plasma 5.24, we introduced basic support for implementing kwin effects written in QML and even added a new overview effect. Unfortunately, if you wanted to implement a QtQuick-based effect yourself, you would still have to write a bit of C++ glue yourself. This is not great because effects that use C++ are a distribution nightmare. They can’t be just uploaded to the KDE Store and then installed by clicking “Get New Effects…”. Furthermore, libkwin is a fast moving target with lots of ABI and API incompatible changes in every release. That’s not good if you’re an effect developer because it means you will need to invest a bit of time after every plasma release to port the effects to the new APIs or at least rebuild the effects to resolve ABI incompatibilities.

This has been changed in Plasma 6.0.

In Plasma 6, we’ve had the opportunity to address that pesky problem of requiring some C++ code and also improve the declarative effect API after learning some lessons while working on the overview and other effects. So, enough of history and let’s jump to the good stuff, shall we?

Project Structure

Declarative effects require some particular project structure that we need to learn first before writing any code

└── package
├── contents
│   └── ui
│   └── main.qml
└── metadata.json

The package directory is a toplevel directory, it should contain two things: a metadata.json file and a contents directory. The metadata.json file contains information about the name of the effect, what API it uses, the author, etc.

{
"KPackageStructure": "KWin/Effect",
"KPlugin": {
"Authors": [
{
"Email": "user@example.com",
"Name": "Name"
}
],
"Category": "Appearance",
"Description": "Yo",
"EnabledByDefault": false,
"Id": "hello-world",
"License": "MIT",
"Name": "Hello World"
},
"X-KDE-Ordering": 60,
"X-Plasma-API": "declarativescript"
}

The contents directory contains the rest of QML code, config files, assets, etc. Keep in mind that ui/main.qml is a “magical” file, it acts as an entry point, every effect must have it.

In order to install the effect and make it visible in Desktop Effects settings, you will need to run the following command

kpackagetool6 --type KWin/Effect --install package/

This is quite a lot to memorize. That’s why kwin provides an example qtquick effect that you can grab, tweak some metadata and you’re good to go. You can find the example project at https://invent.kde.org/plasma/kwin/-/tree/master/examples/quick-effect?ref_type=heads. Note that the example project also contains a CMakeLists.txt file, which provides an alternative way to install the effect by the means of cmake, i.e. make install or cmake --install builddir.

Hello World

Let’s start with an effect that simply shows a hello world message on the screen:

import QtQuick
import org.kde.kwin

SceneEffect {
id: effect

delegate: Rectangle {
color: "blue"

Text {
anchors.centerIn: parent
color: "white"
text: "Hello world!"
}
}

ScreenEdgeHandler {
enabled: true
edge: ScreenEdgeHandler.TopEdge
onActivated: effect.visible = !effect.visible
}

ShortcutHandler {
name: "Toggle Hello World Effect"
text: "Toggle Hello World Effect"
sequence: "Meta+H"
onActivated: effect.visible = !effect.visible
}

PinchGestureHandler {
direction: PinchGestureHandler.Direction.Contracting
fingerCount: 3
onActivated: effect.visible = !effect.visible
}
}

import QtQuick is needed to use basic QtQuick components such as Rectangle. import org.kde.kwin imports kwin specific components.

The SceneEffect is a special type that every declarative effect must use. Its delegate property specifies the content for every screen. In this case, it’s a blue rectangle with a “Hello World!” label in the center.

The ShortcutHandler is a helper that’s used to register global shortcuts. ShortcutHandler.name is the key of the global shortcut, it’s going to be used to store the shortcut in the config and other similar purposes. ShortcutHandler.text is a human readable description of the global shortcut, it’s going to be visible in the Shortcuts settings.

The ScreenEdgeHandler allows to reserve a screen edge. When the pointer hits that screen edge, some code can be executed by listening to the activated signal.

The PinchGestureHandler and SwipeGestureHandler allow to execute some code when the user makes a pinch or a swipe gesture, respectively.

effect.visible = !effect.visible toggles the visibility of the effect. When effect.visible is true, the effect is active and visible on the screen; otherwise it’s hidden. You need to set effect.visible to true in order to show the effect.

If you press Meta+H or make a pinch gesture or move the pointer to the top screen edge, you’re going to see something like this

Note that there are no windows visible anymore, it is the responsibility of the effect to decide what should be displayed on the screen now.

Displaying Windows

Being able to display text is great, but it’s not useful. Usually, effects need to display some windows, so let’s display the active window

delegate: Rectangle {
color: "blue"

WindowThumbnail {
anchors.centerIn: parent
client: Workspace.activeWindow
}
}

The change is quite simple. Instead of displaying a Text component, there’s a WindowThumbnail component now. The WindowThumbnail type is provided by the org.kde.kwin module. WindowThumbnail.client indicates what window the thumbnail item should display.

Input

Input processing contains no kwin specific APIs. TapHandler, MouseArea, Keys and other stuff available in QtQuick should just work. For example, let’s implement an effect that arranges windows in a grid and if somebody middle clicks a window, it will be closed

delegate: Rectangle {
color: "pink"

GridView {
id: grid
anchors.fill: parent
cellWidth: 300
cellHeight: 300

model: WindowModel {}
delegate: WindowThumbnail {
client: model.window
width: grid.cellWidth
height: grid.cellHeight

TapHandler {
acceptedButtons: Qt.MiddleButton
onTapped: client.closeWindow()
}
}
}
}

The code looks pretty straightforward except maybe the model of the GridView. WindowModel is a helper provided by org.kde.kwin module that lists all the windows. It can be passed to various views, Repeater, and so on.

The result can be seen here

Delegates are Per Screen

One thing to keep in mind is that the delegates are instantiated per screen. For example,

delegate: Rectangle {
color: "yellow"

Text {
anchors.centerIn: parent
color: "black"
text: SceneView.screen.name
}
}

When you activate the effect on a setup with several outputs, each output will be filled with yellow color and the output name in the center

Usually, the output is irrelevant, but if you need to know what output particular delegate is displayed on, you could use the SceneView.screen attached property.

Configuration

As your effect grows, you will probably face the need to provide an option or two. Let’s say that we want the background color in our hello world effect to be configurable. How do we achieve that? The first step, is to add a main.xml file in package/contents/config directory, i.e.

package/
├── contents
│   ├── config
│   │   └── main.xml
│   └── ui
│   └── main.qml
└── metadata.json

The main.xml file lists all options

<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name=""/>
<group name="">
<entry name="BackgroundColor" type="Color">
<default>#ff00ff</default>
</entry>
</group>
</kcfg>

In our case, only one option is needed: BackgroundColor, which has Color type and #ff00ff default value. You can refer to the KConfigXT documentation to learn more what other entry types are supported.

The next step is to actually use the BackgroundColor option

delegate: Rectangle {
color: effect.configuration.BackgroundColor

Text {
anchors.centerIn: parent
color: "white"
text: "Hello world!"
}
}

effect.configuration is a map object that contains all the options listed in the main.xml.

Now, if you toggle the hello world effect, you’re going to see

There are a few more thing left to do though. If you navigate to Desktop Effects settings, you’re not going a configure button next to the hello world effect

Besides providing a main.xml file, the effect also needs to provide a config.ui file containing a configuration ui

package/
├── contents
│   ├── config
│   │   └── main.xml
│   └── ui
│   ├── config.ui
│   └── main.qml
└── metadata.json

The config.ui file is a regular Qt Designer UI file. The only special thing about it is that the controls that represent options should have special name format: kcfg_ + OptionName. For example, kcfg_BackgroundColor

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QuickEffectConfig</class>
<widget class="QWidget" name="QuickEffectConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>455</width>
<height>177</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Background color:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KColorButton" name="kcfg_BackgroundColor">
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KColorButton</class>
<extends>QPushButton</extends>
<header>kcolorbutton.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

The last final piece in order to expose the configuration ui is to add the following line in the metadata.json file

"X-KDE-ConfigModule": "kcm_kwin4_genericscripted"

With all of that, the effect is finally displayed as configurable in the system settings and the background color can be changed

Sharing Your Effect With Other People

The preferred method to distribute third party extensions is via the KDE Store. Both JS and QML effects can be uploaded to the same “KWin Effects” category.

Documentation and Other Useful Resources

Documentation is still something that needs a lot of work (and writing it is no fun ). KWin scripting API documentation can be found here https://develop.kde.org/docs/plasma/kwin/api/.

Besides the link above, it’s worth having a look at the examples https://invent.kde.org/plasma/kwin/-/tree/master/examples?ref_type=heads in kwin git repository.

Window Heap

If you need to pack or arrange windows like how the overview effect does, you could use the WindowHeap component from org.kde.kwin.private.effects module. BUT you need to keep in mind that that helper is private and has no stable API yet, so use it on your own risk (or copy paste the relevant code in kwin). Eventually, the WindowHeap will be stabilized once we are confident about its API.

The WindowHeap source code can be found at https://invent.kde.org/plasma/kwin/-/tree/2a13a330404c8d8a95f6264512aa06b0a560f55b/src/plugins/private.

More Examples

If you need more examples, I suggest to have a look at the desktop cube effect in kdeplasma-addons. It’s implemented using the same QML effect API in kwin + QtQuick3D. The source code can be found at https://invent.kde.org/plasma/kdeplasma-addons/-/tree/master/kwin/effects/cube?ref_type=heads

Conclusion

I hope that some people find this quick introduction to QML-based effects in KWin useful. Despite being a couple years old, declarative effects can be still considered being in the infancy stage and there’s a lot of untapped potential in them yet. The QML effect API is not perfect, and that’s why we are interested in feedback from third party extension developers. If you have some questions or feedback, feel free to reach out us at https://webchat.kde.org/#/room/#kwin:kde.org. Happy hacking!

Categories: FLOSS Project Planets

Setting up a Toggleable Side Panel in KDE Plasma 6

Sun, 2024-03-17 20:00

Since a brief tryst with Ubuntu Budgie Edition, I’ve dearly missed its Raven side-panel, a special panel on the side of the screen that can be opened and closed with a click. As someone who needs a clean, minimal desktop, the workflow is just too perfect — when you have two or three widgets that you use frequently, but not frequently enough that they warrant permanent homes on a main panel, just stuff them into a disappearing side-panel that can be called with a quick key-combination or by clicking on an icon; It’s a great way to keep things out of the way, but within reach, without having a permanently cluttered system tray that you might want to keep clear for things like email notifications.

My side panel, and the widget that launches it.

There are some drawbacks; this workflow isn’t well supported on KDE Plasma, so it’s a bit of a faff to set up, and only a few widgets will display nicely on a wide side-panel. For instance, it would be a dream to have the KDE weather widget automatically take advantage of the horizontal space and display the information that would usually be in its dropdown, but what you get instead is a giant icon, for now at least. I use my side-panel for my clipboard history and the media player widget, both of which play nicely with a side-panel. Another niggle I have with it is that, as far as I know, there’s no way to disable activation of the panel when your mouse pointer makes contact with the screen edge. This is a mild to moderate inconvenience when you’re working with applications that have toolbars on the sides of the window, like design applications often do.

For me, personally, the drawbacks aren’t so severe as to put me off of the workflow.

Creating and configuring the panel #

First, you’ll need to create a panel. To do this, right click on an empty section of your desktop, and select “Add Panel > Empty Panel.” When the panel appears, right click it and select “Enter Edit Mode.” Set up your panel however you like, but you will need to set “Visibility” to “Auto Hide” and may want to give it a width of at least 400px or so.

The panel settings configuration window. Setting up the script #

Now, if you wanted to show and hide your panel with a keyboard shortcut, you can set up a focus shortcut in the panel settings window and stop here. If, like me, you want to toggle your panel by clicking on an icon somewhere, we’re going to have to use a wee script, but don’t worry, it’s not as hard as it sounds and I’ll take you through it step by step.

Before we can put our script together, we’re going to need to know what the ID of our panel is. Open up KRunner with Alt+F2 or Alt+Space and run plasma-interactiveconsole. This will launch KDE’s Desktop Shell Scripting Console. In the console, type print(panelIds); and click “Execute.” Assuming you entered that in correctly, what you should see now in the output console beneath the text editor is a series of numbers — the ID numbers of our panels. Keep a note of these numbers.

Look at those IDs.

Clear the text editor and enter the following:

let panel = panelById(401); panel.hiding === "autohide" ? panel.hiding = "windowsgobelow" : panel.hiding = "autohide";

This will check if our panel is set to auto-hide; if it is, the script will set the panel to “windows go below” mode, otherwise it will set the panel to auto-hide.

Now to make use of those panel ID numbers. Which number corresponds to your new side-panel? While I can’t be sure, chances are it’s the last number on the list as we’ve just made the new panel a moment ago. So in the script above, where I have entered 401, enter the last number in your ID list and click “Execute.” At this point, if the ID number is correct, your panel should appear; click “Execute” once more to hide it.

Setting up the Scriptinator widget #

Alright, we’ve got our script ready, so we just need one more thing in place: a button or icon that we can click on to show and hide the panel. Fortunately, we can use a widget called “Scriptinator” to provide just this. Right click on an empty area of your desktop or a panel, click “Add Widgets,” and “Get New Widgets.”

Let’s get that widget.

From here, find and install Scriptinator. Once installed, simply drag it where you’d like it to live, either on your desktop, or on a panel. Once you’ve done that, right click on the widget and choose “Configure Scriptinator.” Here, enter the path of the icon you’d like to use in “Custom icon full path;” I used /usr/share/icons/breeze-dark/actions/22/sidebar-expand-right-symbolic.svg. In “OnClick Script,” enter the following:

qdbus org.kde.plasmashell /PlasmaShell evaluateScript ''

and between those single-quote marks, paste in the full script we put together in the Desktop Shell Scripting Console, like this:

qdbus org.kde.plasmashell /PlasmaShell evaluateScript 'let panel = panelById(401); panel.hiding === "autohide" ? panel.hiding = "windowsgobelow" : panel.hiding = "autohide";' The Scriptinator configuration window.

Set up a tooltip if you like, hit apply, and test out your toggle button.

Success! #

If you’ve done everything correctly, you should see your side-panel appear when you click the widget and disappear when you click a second time. You may need to restart to see your icon applied to the widget; if you don’t want to wait, you can drop the file path into “OnClick icon full path” in your Scriptinator configuration.

Categories: FLOSS Project Planets

Kile 2.9.95 / 3.0 beta 4 released

Sun, 2024-03-17 16:25

We have a release of Kile 2.9.95, also known as 3.0 beta 4! Earlier today, Michel Ludwig tagged the current Git master. This is the first beta release since October 2019. Beside the port to KDE Frameworks 6 and Qt 6, it provides a couple of new features and bug fixes.

New features
  • Port to KDE Frameworks 6 & Qt 6 (Port by Carl Schwan)
  • Enable high-dpi support
  • Provide option to hide menu bar (Patch by Daniel Fichtner, #372295)
  • Configurable global default setting for the LivePreview engines (Patch by Florian Zumkeller-Quast, #450332)
  • Remove offline copy of "LaTeX2e: An unofficial reference manual", use online version instead (Patch by myself, Christoph Grüninger, Issue #7)
Fixed bugs
  • Kile crashes on selecting "Browse" or "Zoom" for document preview (Patch by Carl Schwan, #465547, #476207, #467435, #452618, #429452)
  • Kile crashes when generating new document (Patch by Carl Schwan, #436837)
  • Ensure \end{env} is inserted in the right place even when the user uses tabs for indentation (Patch by Kishore Gopalakrishnan, #322654)
  • Avoid saving console commands in bash history (Patch by Alessio Bonfiglio, #391537, #453935)
  • Don't crash when deleting templates (#413506)
  • Avoid crashing when closing a document that is being parsed (#404164)

Thanks to all the contributors. They fixed bugs, wrote documentation, modernized the code, and in general took care of Kile.

Enjoy the latest Kile release!

Categories: FLOSS Project Planets

Pages