Skip to content

Welcome to Planet KDE

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

Tuesday, 8 October 2024

I had the privilege of attending LAS this year. True to my role as a designer, I brought my camera and volunteered during the event to be a photographer. The venue and university of Monterrey were beautiful.

The main hall is a wall-to-wall glass building placed in the middle of campus. The pictures we got from there were so nice!

The day began with a review of OnlyOffice features and capabilities. We then reviewed the progress that Mexico has seen in advancing Open Source initiatives.

The sessions showcased a myriad of topics. They focused on how open source applications can make a difference in many areas. Other sessions focused on design guidelines, application-building logic, publication and efforts to promote Linux in education.

The work done by the organization was great. Internet access at the venue was strong, and allowed the team onsite to broadcast the sessions online. We were in a university setting. A team managed the broadcasting and sound for the venue and online audiences.

The city was beautiful and filled with great food.

During the conference I contributed with images that I will make available to the organizers soon.

Would love to come back!

Plasma 6 has come into its own over the last two releases. The wrinkles that always come with a major migration have been ironed out, and it’s time to start delivering on the promises of the new Qt 6 and Wayland technology platforms that Plasma is built on top of.

One of the outstanding issues has been to make Plasma a more artist-friendly environment by providing full support for the hardware that creative people need to get their work done.

So let’s start there…

What’s New

For Digital Artists

Plasma 6.2 includes a smorgasbord of new features for users of drawing tablets. Open System Settings and look for Drawing Tablet to see various tools for configuring drawing tablets.

New in Plasma 6.2: a tablet calibration wizard and test mode; a feature to define the area of the screen that your tablet covers (the whole screen or a section); and the option to re-bind pen buttons to different kinds of mouse clicks.

All this is built into Plasma; there’s no need to install new drivers or software from device manufacturers.

And if your tablet is not yet supported, “We care about your Input” is a community-wide project that aims to provide support for unusual input devices. Let us know about your device so we can add it to the list!

Color Management

Related to the above — and to ensure consistent colors across monitors — we’ve implemented more complete support for the Wayland color management protocol, and enabled it by default.

We have also improved brightness handling for HDR and ICC profiles, as well as HDR performance. This will improve your experience when designing graphics, playing games, and watching videos.

A new tone mapping feature built into Plasma’s KWin compositor will help improve the look of images with a brightness or set of colors greater than what the screen can display, thus reducing the “blown out” look such images can otherwise exhibit.

Before
After

Power Management

Managing how much energy your system consumes and when are not only important for preserving its resources for when you need them, but also for using it in an environmentally responsible way.

You can now override misbehaving applications that block the system from going to sleep or locking the screen (and thus prevent saving power), and you can also adjust the brightness of each connected monitor machine separately.

As for the Power and Battery widget, it not only shows how much power is remaining, but also allows you to adjust power profiles for different scenarios. New in Plasma 6.2: hold down the Meta (Windows) key and press B to cycle through the different options one at a time. A little badge of a leaf will show up on the battery icon to indicate when the system is in power save mode, and a rocket for performance mode.

The battery widget showing power profiles

Discover and System Updating

Another thing we put you in complete control of is your software.

Plasma’s built-in app store and software management tool, Discover, now supports PostmarketOS packages for your mobile devices, helps you write better reviews of apps, and presents apps’ license information more accurately.

You can also now choose to shut down the system after applying an offline system update, in addition to the existing option to restart afterwards.

Accessibility

Since we made improving accessibility a community-wide project, we have increased the ways in which Plasma is easy to use for everyone.

In Plasma 6.2, we overhauled System Settings’ Accessibility page and added colorblindness filters. We also added support for the full “sticky keys” feature on Wayland.

Color blindness assistant

UI/Visual Design

And of course, improving the look and feel of Plasma is always a high priority from one release to the next.

In Plasma 6.2, we tweaked accent colors and the System Tray, reworked the Widget Explorer, and unified the look of dialogs and pop-ups. Finally, we improved the Welcome Center, sound effects, and actions.

Many of these changes are subtle, but will provide a smoother and more enjoyable experience.

And All This Too…

  • The Weather Report widget now shows “feels like” temperatures, adds more information for BBC weather forecasts, and more.
  • You can turn off window borders in the Pager widget.
  • The Minimize All widget now minimizes only windows on the current virtual desktop and activity.
  • You can now give custom names to your custom shortcuts.
  • There's now an integrated cropping tool when setting a new user avatar.
  • We’ve added a once-a-year donation request notification — please consider using it to show your love for Plasma by donating!
…and there’s much more going on as well: numerous stability and performance improvements, smaller visual changes, more Wayland protocols, and more! Check out the complete changelog for Plasma 6.2.

Monday, 7 October 2024

I just installed a new FreeBSD desktop machine. For this one, I wanted to have KDE Plasma6, since that’s already running on my Linux laptop and gaming machine – and it’s time for me to dogfood on FreeBSD. Here’s some notes.

Base Install

FreeBSD has a Live ISO and a graphical installer. For licensing reasons, it isn’t Calamares (which is GPLv3). So I use the text-based installer. I downloaded the FreeBSD 14.1 memstick image. From boot to reboot into an installed system takes less than five minutes, but then you have an old-school UNIX system: a login: prompt.

From there:

  • log in as root
  • switch the package repository to latest
  • pkg install pkg, to get the package manager
  • pkg install git cmake, because you’re a developer
  • pkg install plasma6-plasma, which is an 800MiB download
  • pkg install sddm, because you’ll want a login-manager
  • pkg install drm-kmod, because you need a graphics driver

I have an AMD RX550 video card (cheapest I could get this year) in the machine, so then to set that graphics driver:

  • sysrc kld_list=amdgpu

Make sure DBus will run as a system service:

  • sysrc dbus_enable=yes

Create a regular user and add them to the video group.

Then reboot.

KDE Plasma6 X11 by Hand

At this point, the system has KDE Plasma6 installed, but it won’t come up (the login manager isn’t enabled, for instance) so we need some convenience things from The Before Times to do a little testing. (Installed as “automatic” so they are easy to remove later).

  • pkg install -A xinit xterm

As a normal user, create ~/.xinitrc and put this in it:

#! /bin/sh
exec /usr/local/bin/startplasma-x11

Then make it executable and start X11 (like it’s 1994):

  • chmod 755 .xinitrc
  • startx

Voila. KDE Plasma6. Note that, in this state, there are no applications besides xterm and KInfoCenter (and a handful of other KDE Plasma internal things). There’s no configuration applied to the system. The window manager does not honor alt-tab or alt-F4. Use ctrl-Q to quit KInfoCenter.

But X11 is soooo passé. Let’s move on to the Future!

Any Wayland by Hand

First, let’s install some convenience things that will help in debugging.

  • pkg install -A river foot

Like I wrote 3 years ago about river, it just works. You’ll need the example configuration file so that super-shift-E exits the compositor and window manager. super-shift-enter gets you a terminal window.

I started river as a regular user with

  • ck-launch-session river

KDE Plasma6 Wayland by Hand

Yeah, right.

So there was a brief time in 2021 that it worked. Since then, not so much – certainly not for me, not from the regular ports tree. So this post is a start of “ok, let’s give it another shot”.

I know that Wayland can work on FreeBSD with hardware rendering – that’s why that river section is there.

Here is a very short script that can launch KDE Plasma6 with software rendering. The resulting desktop experience is rather slow.

#! /bin/sh
export KWIN_COMPOSE=Q
exec /usr/local/bin/ck-launch-session \
    /usr/local/lib/libexec/plasma-dbus-run-session-if-needed \
    /usr/local/bin/startplasma-wayland

So the TODO part of this post is: figure out why opening dri/card0 fails when kwin_wayland is not using the software renderer.

KDE Applications5 and KDE Plasma6

Yeah, right.

Most (maybe even all) of the KDE Applications – for instance, konsole, or kmail – are still KDE Frameworks 5 based. Unfortunately, there are KDE Frameworks that have file-collisions between versions 5 and 6. As an example, package kf6-baloo and kf5-baloo both want to install a libbalooplugin.so. I mentioned the co-installability problem a half-year ago, but we haven’t fixed it since.

Edit 2024-10-08: this is entirely a packaging problem, where we could install the things to separate prefixes. That hasn’t happened, because of a lack of person-time to actually do it (and test it).

On this front I think we’re at a chicken-and-egg place: we would like to switch wholesale to newer applications releases and just drop the existing KDE Applications 5, but are so bogged down with Other Stuff that it’s not happening. On the Linux side of things KDE Applications 6 are doing fine.

All that said, there’s the KDE-FreeBSD ports development fork with a branch where newer KDE-FreeBSD packages are prepared. That already has a KF6-based KMail. So the TODO part of this section is: I need to double-check what’s holding that up.

Takeaways

  • for a nice KDE Plasma6 experience on a BSD, why not try OpenBSD?
  • KDE-FreeBSD has a nasty amount of hardware-testing to do.
  • The future is here, just not in the ports tree.

At work-work the system uses, for historical reasons, a lot of SystemV shared memory. The SysV shared memory API has C functions like shmat(2). There is also a different shared memory API, POSIX shared memory, which has functions like shm_open(3). For reasons, on some work-work systems we’re constrained to Python 3.7 and no additional libraries. I wanted to mess with the shared memory on such a system, from Python for convenience, so I wrote some very simple wrappers. Here’s a recap.

As usual, corrections are welcome, or tips (by email). I write these notes as much for future me as anyone else.

Here is the core of the story (I have also added this to my personal GitHub repository, which I won’t link because it’s not future-proof storage).

import ctypes

lib = ctypes.cdll.LoadLibrary(None)

shmget = lib.shmget
shmget.argtypes = [ctypes.c_int, ctypes.c_size_t, ctypes.c_int]
shmget.restype = ctypes.c_int
shmget.__doc__ = """See shmget(2)"""

This works on FreeBSD, where SysV shmem is in the core libraries. On Linux, I think you need to call LoadLibrary("librt"). Anyway, wrapping the library-loading to be safe isn’t the point here.

Once ctypes has loaded a library, you can extract function pointers from the library. By adding annotations, you can give the Python function the same prototype as the C manpage for shmget.

Note that the manpage points to some special flag values. For those, you need to dig into the C headers. On FreeBSD, the special value IPC_PRIVATE is equal to 0, so that’s easy enough to write in Python. The following snippet is then sufficient to create a shared memory segment (one that is 1024 bytes large and world-readable) and print out its ID. The returned value is -1 on error.

print(shmget(0, 1024, 0o644))

The ID can be cross-checked with command ipcs -m (it’s installed by default on FreeBSD and in my KDE Neon machine, so seems like a common tool). To get rid of the segment, ipcrm -m <id> does the trick.

Similar wrappers are there for shmat, shmdt and shmctl – but those wrangle void * in C, and how does that work with Python?

The void pointer

CTypes has a c_void_p type, which can be created from None (a null pointer, seems reasonable) and returned from C functions. It can cast to-and-fro (in classic C style, the thing in memory is what I say is in memory) to other pointer types, and without a typed-pointer type at the machine level that just works (but don’t ask me how).

So the C function int shmctl(int shmid, int cmd, struct shmid_ds *buf) gets these types in Python: shmctl.argtypes = [ctypes.c_int, ctypes.c_int, ctypes.c_void_p], which presents the struct-pointer as a void-pointer.

The function void *shmat(int shmid, const void *addr, int flag) works similarly. When calling it, unless you have specific address needs, parameter addr can be nullptr (er .. ok, this is C, so NULL and in Python None). The pointer it returns is where the shared memory is attached.

Actually doing something with a void * takes work in C, it also takes work in Python with ctypes. You can cast to an int * for instance, with iaddr = ctypes.cast(addr, ctypes.POINTER(ctypes.c_int)) (a cast to char * is also readily available).

A special case is when you need to provide a void * to some C function. Where do they come from? In C you would just declare a (character) buffer of some size and pass it in. In Python, ctypes.create_string_buffer() does the job. Give it a size and get a memory-managed buffer.

Wrangling shared-memory segment destruction

There’s shmget() to create a segment, shmat() to attach (map it into memory of a process) to it, shmdt() to detach from a segment, but destroying a shared-memory segment does not have a simple C call to do it. There is shmctl() which does special-control-actions on a shared-memory segement, and destruction is one of them.

I ended up writing this little wrapper.

def shmrm(shmid : int) -> int:
    return shmctl(shmid, 0, None)

Sending messages

As an experiment, I wrote a program that can create, read, write and destroy a shared-memory segment. By writing (from one invocation) and then reading (from another invocation) I can “send” messages from the past! Or to the future! It is nearly as convenient as writing the messages to a file.

Here’s the write function. It attaches the shared-memory segment and then writes a Pascal-style string to that memory (Pascal-style in the sense of “starts with a length, followed by the actual data, no NUL-termination”). For bloggy purposes I have removed error-handling.

def write(shmid : int, v : str):
    addr = shmat(shmid, ctypes.c_void_p(None), 0)
    iaddr = ctypes.cast(addr, ctypes.POINTER(ctypes.c_int))
    caddr = ctypes.cast(addr, ctypes.POINTER(ctypes.c_char))

    ustring = v.encode("utf-8")
    iaddr[0] = len(ustring)
    for i in range(len(ustring)):
        caddr[4+i] = ustring[i]

    return shmdt(addr)

Here, shmat() returns a void * and I cast that to two typed pointers to the segment. I haven’t figured out how to do pointer arithmetic, so on the assumption there are 32-bit integers, the integer goes first and then the message goes starting at byte (char) number 4.

Takeaways

CTypes is really cool! It makes wrangling C APIs in Python .. well, let’s call it “acceptable”.

Starting with Python 3.8, everything I’ve written above is unnecessary because there is a good shared-memory abstraction in the standard Python library, but for my work-work purposes in a very restricted environment, this particular tool has turned out to be really useful.

This weekend "The KDE Alberts"[1] attended Google Summer of Code Mentor Summit 2024 in Sunnyvale, California.


The Google Summer of Code Mentor Summit is an annual unconference that every project participating in Google Summer of Code 2024 is invited to attend. This year it was the 20th year celebration of the program!

I was too late to take a picture of the full cake!


We attended many sessions ranging from how to try to avoid falling into the "xz problem" to collecting donations or shaping the governance of open source projects.

 

We met lots of people that knew what KDE was and were happy to congratulate us on the job done and also a few that did not know KDE and were happy to learn about what we do.

 

We also did a quick lightning talk about the GSOC projects KDE mentored this year and led two sessions: one centered around the problems some open source application developers are having publishing to the Google Play Store and another session about Desktop Linux together with our Gnome friends.

 

All in all a very productive unconference. We encourage KDE mentors to take the opportunity to attend the Google Summer of Code Mentor Summit next year, it's a great experience! 

 

[1] me and Albert Vaca, people were moderately amused that both of us had the same name, contribute to the same community and are from the same city.


Sunday, 6 October 2024

Marble gets an update, KDE Connect gets a speed boost, and Kate gets all fluttery

Welcome to a new issue of “This Week in KDE Apps”! In case you missed it, we announced this series a few weeks ago, and our goal is to cover as much as possible of what's happening in the world of KDE apps and supplement Nate's This Week in Plasma published yesterday.

This week we had new releases of Tellico and Krita. We are also covering news regarding KDE Connect, the link between all your devices; Kate, the KDE advanced text editor; Itinerary, the travel assistant that helps you plan all your trips; Marble, KDE's map application; and more.

Let's get started!

Dolphin Manage your files

Dolphin now uses ripgrep-all or ripgrep for content search when Baloo indexing is disabled. Detailed information (Jin Liu, 24.12.0. Link)

The checksum and permissions tab in the property dialog used by Dolphin and other KIO-enabled applications is now more consitent with the other tabs. (Thomas Duckworth, Frameworks 6.8. Link)

Checksums tab
Permissions tab

Kaidan User-friendly and modern chat app for every device

Kaidan, KDE's XMPP instant messaging app, improves support for group chats. (Melvin Keskin, Link)

Kate Advanced Text Editor

Kate adds out of the box support for debugging Flutter projects. (Waqar Ahmed, 24.12.0. Link 1, link 2)

The option to 'Reopen latest closed documents' has been added to the tab context menu. (Waqar Ahmed, 24.12.0. Link)

Kdenlive Video editor

KDE e.V. and Kdenlive have posted two job offers for contractors to work on Kdenlive. Will this be your opportunity to contribute to KDE and get paid too?

KDE Connect Seamless connection of your devices

KDE Connect starts up much faster on macOS — startup time has gone from 3s to 100ms! (Albert Vaca Cintora, 24.12.0. Link)

Kleopatra Certificate Manager and Unified Crypto GUI

Kleopatra makes its decryption errors easier to understand when content was encrypted with a certificate you don't have. (Tobias Fella, 24.12.0. Link)

Krita Digital Painting, Creative Freedom

Krita 5.2.6 is out and fixes a critical issue that popped up in last week's release. More information.

Krusader File Manager

Krusader has been migrated to Qt6 and KF6. (Alex Bikadorov, 3.0.0. Link)

KStars Desktop Planetarium

KStars 3.7.3 is out with exciting features for astrophotography buffs. You're going to want to update if you're using multiple cameras with per-camera targeting and scheduling, leader-and-follower jobs, and focus synchronization. Read more here!

Weather View real-time weather forecasts

KWeather removes the "Add current location" button, as it doesn't work anymore since the shutdown of Mozilla's location service. (Devin Lin, 24.08.2. Link)

The setup wizard has been overhauled. (Devin Lin, 24.08.2. Link)

Welcome Page
Appearance Setup
Location Setup

KDE Itinerary Digital travel assistant

A new bi-monthly blog post about Itinerary and the infrastructure behind it is out: August/September in KDE Itinerary

Itinerary now extracts membership ids in German-language Eurostar (Thalys) tickets (Luca Weiss, 24.08.2. Link)

It can extract seat reservation data from SBB QR codes (Volker Krause, 24.08.2. Link)

If you are arranging accommodations, Itinerary can handle German language variants of NH Hotels booking confirmations (Volker Krause, 24.08.2. Link)

LabPlot Interactive Data Visualization and Analysis

The Color Maps Browser now has multiple view modes. Including one that shows detailed information about the used colors in the color map and that also allows to copy those values. (Alexander Semke, Link)

Added a new visualization type: Run Chart, (Alexander Semke, Link)

NeoChat Chat with your friends on matrix

NeoChat has a fix for a frequent and random crash on Android caused by receiving a notification. (James Graham, 24.12.0. Link)

The hover actions for the messages are now more reliable. (Carl Schwan, 24.12.0. Link)

Marble Virtual Globe

Marble Behaim got a new logo, similar to the Marble Maps logo. (Mathis Brüchert, 24.12.0. Link)

Marble Maps routing functionality was ported to Qt6 and redesigned. (Carl Schwan, 24.12.0. Link)

Marble Route Editor
Marble Routing displayed

Spectacle Screenshot Capture Utility

Spectacle fixed a crash when saving while the system's timezone is misconfigured (Noah Davis, 24.08.2. Link)

Tellico Collection Manager

Tellico, the KDE app that helps you manage all your collecions, is out with version 4.0.1. This version includes fixes for Qt6. More information.

Tokodon Browse the Fediverse

Tokodon fetches public servers and displays them in a list for registration. The list is fetched from joinmastodon.org and more filtering options will be added later. (Joshua Goins, 24.12.0. Link)

List of servers

Instead of wrapping all the tags for a post, they are now made scrollable. (Joshua Goins, 24.12.0. Link)

Apps on Windows

KDE Apps on windows now have better looking tooltips and menus without black corners. (Carl Schwan, Breeze 6.2.1. Link)

Third Party Applications

To get your application mentioned here. Please contact us on invent or in Matrix.

Kraft Quotes and invoices for small business

Kraft is a desktop app making it easy to create offers and invoices quickly and beautifully in small companies. Version 1.2.2 was just released and contains some small bug fixes. This is the last release before Kraft 2.0. More information.

…And Everything Else

This blog only covers the tip of the iceberg! If you’re hungry for more, check out Nate's blog about Plasma and KDE's Planet, where you can find more news from other KDE contributors.

Get Involved

The KDE organization has become important in the world, and your time and contributions have helped us get there. As we grow, we're going to need your support for KDE to become sustainable.

You can help KDE by becoming an active community member and getting involved. Each contributor makes a huge difference in KDE; you are not a number or a cog in a machine! You don’t have to be a programmer, either. There are many things you can do: you can help hunt and confirm bugs, even maybe solve them; contribute designs for wallpapers, web pages, icons and app interfaces; translate messages and menu items into your own language; promote KDE in your local community; and a ton more things.

You can also help us by donating. Any monetary contribution, however small, will help us cover operational costs, salaries, travel expenses for contributors and in general help KDE continue bringing Free Software to the world.

To get your application mentioned here. Please let us know in invent or in Matrix.

SVG cursor themes is a new feature in Plasma 6.2, which we are really excited about. In this blog post, I would like to provide more background behind what motivated us to add support for them, what they are, and how to build them.

(Classic) cursor theme format

A cursor theme is a collection of images defining the contents of various cursor shapes and additional metadata (for example, the human readable name of the theme, whether the cursor theme inherits/extends another cursor theme, etc). On disk, it looks as follows

The cursors/ directory contains a list of Xcursor files and symbolic links to represent cursor shape aliases, e.g. the arrow being an alias for default. The XCursor format has been in use for a very long time now and it has a pretty simple structure

The layout of an XCursor file

An XCursor file consists of a header that includes a magic number to determine whether particular file is actually an XCursor file, the size of the header in bytes, the file version, and the number of ToC entries. Every ToC entry provides the information about the corresponding chunk, for example the chunk type and where the chunk can be found in the file. Lastly, a chunk contains some useful data. A chunk may contain image data or text data, etc.

For example, here’s the image data that can be found in the “default” cursor shape file in the Adwaita cursor theme

As you can see, the Adwaita cursor theme provides the following sizes: 24, 32, 48, 64, and 96.

The index.theme files looks as follows

[Icon Theme]
Inherits=breeze_cursors
Name=Cool Cursor
Comment=That is a cool cursor theme

Cursor themes can be found in $DATADIR/icons directories. For example, /usr/share/icons or ~/.local/share/icons.

X11 vs Wayland cursors

Xcursor cursors are used both on X11 and Wayland, but the way how the cursor size is interpreted is different on the two platforms. X11 assumes that the cursor size is specified in the device pixels, while Wayland assumes that it’s in the logical pixels. Logical pixels have the same visual size across various devices, while physical pixels are specific to particular device. For example, 24 logical pixels on an output with a scale factor of 2 corresponds to 48 physical pixels.

Cursor sizes in Xcursor files are specified in the device pixels.

Another very important detail is that the XCURSOR_SIZE environment variable is treated differently by X11 and Wayland native applications. For example, if XCURSOR_SIZE is set to 24 and the output scale is 2, an X11 application would load a cursor with the size 24, but a Wayland application would effectively load a cursor with the size 48 (24 * 2) because it would see that the output is scaled so the provided cursor needs to be scaled accordingly as well.

“XCURSOR_SIZE=24 dolphin -platform xcb” (left) vs “XCURSOR_SIZE=24 dolphin -platform wayland” (right). Note that “Apply scaling themselves” has been selected in the display settings in Plasma Wayland

Limitations of Xcursor

The most painful thing about Xcursor is its lack of the proper HiDPI support. As it was said in the previous chapter, the cursor size in Xcursor files is specified in the device pixels. On X, it’s not a problem because all geometries are specified in the device pixels. It also means that if you change the scaling factor on X, you need to change the cursor size manually so the cursor is not too small. On Wayland, the cursor size is specified in the logical pixels so the compositor and the clients have to scale the cursor size in order to match the output scale. For example, if the configured cursor size is 24 and the window is on an output with a scale factor of 2, the application needs to load an Xcursor cursor with the size 48. If the cursor theme provides cursors with such a size, perfect! But what if it doesn’t? At the moment, every compositor and client applies its own policies. Some find the cursor with the closest size and use that, some find the cursor with the closest size and then scale it to match the requested size at the cost of adding some blurriness, and so on. It’s a mess. Because neither compositors nor clients can agree how to handle such a case, you could easily observe the cursor changing its size when moving between windows owned by different applications or when moving the cursor between the window and its decoration, e.g.

A script element has been removed to ensure Planet works properly. Please find it in the original post.

It’s worth noting though that this issue can be worked around by using the cursor-shape protocol because with it, the application can delegate the compositor the task of loading and displaying cursors. But the bottom line is that the Xcursor format is unsuitable for the HiDPI model that we have present on Wayland.

Another issue with the Xcursor format is that the image data is stored in an uncompressed format. It is okay if you need to provide cursors with small sizes, for example up to 72, but there are cases when you need to display a cursor at a very large size. For example, one such a case is the shake cursor accessibility feature in the Plasma Wayland session.

With the shake cursor feature enabled, the cursor will be inflated when it’s shaken. In order to operate, it needs to load the default cursor shape with a size around 250. If cursor themes provided images for such sizes, their package sizes would easily blow up beyond the 100MiB mark. That’s not good. And as a workaround, in Plasma 6.1, the shake cursor uses its own high resolution images of the Breeze cursor themes.

A script element has been removed to ensure Planet works properly. Please find it in the original post.
Shake cursor without any workarounds in 6.1
A script element has been removed to ensure Planet works properly. Please find it in the original post.
Shake cursor with workarounds in 6.1

The XCursor format was perfectly suitable for the use cases that existed back in the late 90s and early 2000s, but things have changed over the years and its current raster nature can’t keep up with the use cases that we have now (2024). We’ve got fractional scaling, we’ve got accent colors, we’ve got features that enlarge the cursor, and so on.

SVG cursor format

First of all, let’s build a list of requirements that the svg cursor format must satisfy:

  • obviously, it must support the ability to define cursor contents using svg files so we can fix HiDPI issues, etc
  • easy porting process for existing clients and compositors
  • it should be easy to develop and analyze svg cursor themes. Xcursor is a binary file format, which requires a special tool to create Xcursor files, we would like to avoid that with svg cursors
  • last and the most important requirement is that there must be some compatibility with the existing cursor theme format. We must not be required to write a new system settings module to handle the new cursor format, and the apps that don’t support svg cursors should easily fallback to the Xcursor format.

Here’s how a cursor theme providing svg cursors would look like

index.theme has the same format both for XCursor and SVG cursors. cursors/ directory contains the XCursor cursors, and cursors_scalable/ contains the SVG cursors.

In cursors_scalable/, every cursor shape must have its own directory, or if it’s an alias, then it must be a symlink. Every cursor shape directory must contain the cursor image and a metadata.json file providing the information about the cursor.

For a static cursor, the metadata.json file looks as follows

[
   {
       "filename": "default.svg",
       "hotspot_x": 4,
       "hotspot_y": 4,
       "nominal_size": 24
   }
]

The filename property specifies the filename of the svg file. The hotspot_x and the hotspot_y properties specify the coordinates of the hot spot. The hot spot in the cursor determines the point where interaction with other elements on the screen occurs, e.g. clicks. The nominal_size property specifies the cursor size that the svg file represents. The nominal size is used to decide how much the svg image and the hotspot coordinates need to be scaled in order to get a cursor with the requested size. Note that the nominal size can’t be determined based on the <svg>‘s width and height attributes because there exist themes such as Breeze whose canvas is bigger than the represented cursor size. As an example, in the Breeze cursor theme, the canvas size is 32x32 even though the represented cursor size is 24 in order to accommodate for additional elements that can be attached to the arrow cursor, e.g. a little circle with a plus sign or a question mark.

For an animated cursor, the metadata.json file looks as follows

[
    {
        "filename": "wait-01.svg",
        "delay": 30,
        "hotspot_x": 16,
        "hotspot_y": 15,
        "nominal_size": 24
    },
    {
        "filename": "wait-02.svg",
        "delay": 30,
        "hotspot_x": 16,
        "hotspot_y": 15,
        "nominal_size": 24
    },
    ...
    {
        "filename": "wait-42.svg",
        "delay": 30,
        "hotspot_x": 16,
        "hotspot_y": 15,
        "nominal_size": 24
    }
]

The only new thing is the delay property. The delay property indicates the animation delay to the next frame.

A cursor theme that ships SVG cursors is required to have XCursor cursors too. This is needed to provide fallback for legacy applications that are unaware of the cursor-shape-v1 protocol or simply too old applications that are unlikely to be changed anymore. This restriction might be lifted in the future.

It is worth mentioning that SVG supports animations natively. However, that approach was not chosen for cursor animations for two reasons: to allow caching svg render results more easily and require fewer changes in the compositors and the apps to adapt the svg cursor format.

You can find the json schema for metadata.json over here.

Accent colors

Since the cursor contents is specified using the SVG format, it should be possible to re-color the cursor based on the currently configured accent color. As of now, it is not implemented, but, in general, this is doable and perhaps such a feature will be added to Plasma some day.

Standardization

This cursor format is not officially standardized. We are looking forward to making it upstream, but for now, the main focus is on confirming that the new format lives up to our and cursor creator needs.

To cursor theme creators

Breeze and Breeze Light are the only two cursor themes that support SVG cursors at the moment, but we would love to see custom themes adapting them too so users experience fewer issues with fractional scaling or other features in Plasma when using their favorite 3rdparty cursor themes. We would also like to hear feedback from the cursor theme creators regarding whether it’s easy to adapt this cursor format or whether some additional features are needed. You can reach out to us at Matrix in the #kwin room https://webchat.kde.org/#/room/#kwin:kde.org or in the kwin mailing list.

Examples

If you need an example of a cursor theme that supports SVG cursors, please check the Breeze cursor theme.

Closing words

The new SVG cursor format is amazing. Please try it!

Saturday, 5 October 2024

Plasma 6.2 will be released in just three days! In the end we did revert the notification changes I mentioned last week, so users of Plasma 6.2 won’t experience any new issues with notifications. The list of verified 6.2 regressions is extremely small, with most being low importance. We will of course eventually get them fixed anyway! But they aren’t release blockers.

Notable New Features

Distros can now customize the set of apps shown on Discover’s homepage in the “Editor’s Choice” section (Jarred Wilson, Plasma 6.3.0. Link)

Notable UI Improvements

We’ve returned to the older style of default audio device naming from Plasma 6.1, plus a few extra heuristics to hopefully make it even better when using PipeWire. And don’t worry, the new feature to rename devices remains present (Plasma 6.2.0. Link)

Discover now only shows the total size of available updates once it’s finished checking for them, so the number is always accurate and doesn’t bounce around (Soumyadeep Ghosh, Plasma 6.3.0. Link)

Notable Bug Fixes

Fixed the most common Plasma crash on X11, which was often encountered when waking up a sleeping monitor (Marco Martin, Plasma 6.2.0. Link)

Fixed a common case where KWin could crash when using Overview to search for stuff (Vlad Zahorodnii, Plasma 6.2.0. Link)

Fixed two a somewhat common seemingly random Plasma crashes (Fushan Wen, Plasma 6.2.0. Link 1 and link 2)

Fixed an issue that could, under certain circumstances, cause KWin to freeze when connecting or disconnecting an external monitor to a laptop (Xaver Hugl, Plasma 6.2.0. Link)

Fixed a bug that could cause System Monitor sensors configured with certain combinations of faces and sensors to become permanently invisible! (Arjen Hiemstra, Plasma 6.2.0. Link)

Improved the robustness of Plasma’s startup code, so that it doesn’t fail to launch when the kactivitymanagerd daemon is slow (David Edmundson, Plasma 6.2.0. Link)

Fixed an issue that could cause animations to get stuck on certain screens with the Adaptive Sync feature turned on (Xaver Hugl, Plasma 6.2.0. Link)

Removed the animations from Plasma’s Pager widget because they were too subtle to notice most of the time, and triggered a Qt bug that wrecks laptop battery life with auto-hidden panels. The Qt bug is under investigation, but at least now you should hit it less often (Vlad Zahorodnii, Plasma 6.2.0. Link)

Fixed one of the bugs that could cause icon positions on the desktop to get reset after monitors turned off and back on again. This may also fix a very common similar bug where positions get reset when the resolution changes; that’s still being verified. And of course there may be other bugs with positioning as well, but this was one of them and it’s fixed now! Others are under Investigation (Akseli Lahtinen, Plasma 6.2.0. Link)

Fixed KWin’s “Toggle Raise and Lower” functionality so that it does in fact lower the window again (Jarek Janik, Plasma 6.2.0. Link)

Fixed a regression that caused the title of any components using Kirigami.OverlaySheet to be vertically mis-positioned (Fushan Wen, Frameworks 6.7. Link)

Changing regional settings for your user is now more reliable in the case where your distro or its installer set the value of all of the LC_* properties at a systemwide level — as apparently happens on Ubuntu (Han Young, Plasma 6.2.0. Link)

Made sure that pointer acceleration in XWayland games with screen scaling is the same as in native Wayland apps (Xaver Hugl, Plasma 6.2.1. Link)

Other bug information of note:

How You Can Help

You know what? Have a rest. It’s not feasible to work all the time; breaks are important too. Everyone’s been working so hard on Plasma 6.2, and I think the results are going to be great. Make sure not to neglect your mental health! Rest when you need it. Were all humans with physical bodies.

Otherwise, visit https://community.kde.org/Get_Involved to discover additional 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! Or consider donating instead! That helps too.

Friday, 4 October 2024

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


W3C 30th anniversary clip

Tags: tech, web, history

Excellent clip for the W3C 30th anniversary. Shows the big milestones and evolution of the WWW.

https://www.youtube.com/watch?v=0TfUBuIZkmQ


OpenFreeMap

Tags: tech, foss, map

An excellent service to provide. Let’s hope it stays sustainable, the risk is commercial leeches not giving back a dime. Be responsible, sponsor it if you use it commercially.

https://openfreemap.org/


Why laptop support, why now: FreeBSD’s strategic move toward broader adoption | FreeBSD Foundation

Tags: tech, freebsd, laptop

Unexpected but definitely welcome. Let’s wish them luck in this endeavor.

https://freebsdfoundation.org/blog/why-laptop-support-why-now-freebsds-strategic-move-toward-broader-adoption/


The Public Domain Problem

Tags: tech, copyright, public-domain, commons

Putting things in the public domain voluntarily is indeed more difficult than it should be. The best tool we got is CC0, but it still raises (probably unwarranted) concerns for software.

https://dpk.land/pubdmn.txt


Patent troll Sable pays up, dedicates all its patents to the public!

Tags: tech, patents

Always happy to see a patent troll bite the dust.

https://blog.cloudflare.com/patent-troll-sable-pays-up/


Improving online advertising through product and infrastructure

Tags: tech, mozilla, advertisement, surveillance

Mozilla is clearly loosing its way, this is sad to watch. I guess the forks which remove the online advertising measures will become more popular.

https://blog.mozilla.org/en/mozilla/improving-online-advertising/


Microsoft details security/privacy overhaul for Windows Recall ahead of relaunch

Tags: tech, microsoft, ai, machine-learning, surveillance, privacy

They’re trying a come back… of course they added layers of security to pretend it’s all solved and shiny. They totally ignore the social implications or if something like this even needs to be done. At least one can remove it… for now…

https://arstechnica.com/gadgets/2024/09/microsoft-details-security-privacy-overhaul-for-windows-recall-ahead-of-relaunch/


Don’t believe the hype: AGI is far from inevitable

Tags: tech, ai, machine-learning, gpt, cognition, neuroscience, philosophy, mathematics, logic, research

This is a short article summarizing a research paper at the surface level. It is clearly the last nail in the coffin for the generative AI grand marketing claims. Of course, I recommend reading the actual research paper (link at the end) but if you prefer this very short form, here it is. It’s clearly time to go back to the initial goals of the AI field: understanding cognition. The latest industrial trends tend to confuse too much the map with the territory.

https://www.ru.nl/en/research/research-news/dont-believe-the-hype-agi-is-far-from-inevitable


The insatiable hunger of (Open)AI

Tags: tech, ai, machine-learning, gpt, energy, ecology

If you run the number, we actually can’t afford this kind of generative AI arm race. It’s completely unsustainable both for training and during use…

https://wimvanderbauwhede.codeberg.page/articles/the-insatiable-hunger-of-openai/


New AI trick: ‘synthetic human memories’

Tags: tech, ai, machine-learning, fake, fake-news

Maybe extrapolating a bit more than it should. Still this leads to worrying uses of AI generated images.

https://machinesociety.ai/p/new-ai-trick-synthetic-human-memories


Ethical Applications of AI to Public Sector Problems - Jacob Kaplan-Moss

Tags: tech, ai, machine-learning, ethics

Good article about the ethical implications of using AI in systems. I like the distinction about assistive vs automated. It’s not perfect as it underestimates the “asleep at the steering wheel” effects, but this is a good starting point.

https://jacobian.org/2024/oct/1/ethical-public-sector-ai/


Devs gaining little (if anything) from AI coding assistants

Tags: tech, ai, machine-learning, copilot, productivity

Unsurprisingly the productivity gains announced for coding assistants have been greatly exaggerated. There might be cases of strong gains but it’s still unclear in which niches this is going to happen.

https://www.cio.com/article/3540579/devs-gaining-little-if-anything-from-ai-coding-assistants.html?amp=1


Lies, Damn Lies, And Surveys About AI – ideatrash

Tags: tech, ai, machine-learning, copilot, marketing, criticism

Or why we shouldn’t trust marketing survey… they definitely confuse perception and actual results. Worse they do it on purpose.

https://ideatrash.net/2024/09/lies-damn-lies-and-surveys-about-ai.html


Sorry, GenAI is NOT going to 10x computer programming

Tags: tech, ai, machine-learning, copilot, productivity

How shocking! This was all hype? Not surprised since we’ve seen the referenced papers before, but put all together it makes things really clear.

https://garymarcus.substack.com/p/sorry-genai-is-not-going-to-10x-computer


Inside Elon Musk’s AI party at OpenAI’s old headquarters

Tags: tech, ai, machine-learning, gpt, business

The arm race is still on-going at a furious pace. Still wondering how messy it will be when this bubble bursts.

https://www.theverge.com/2024/10/3/24261160/elon-musk-xai-recruiting-party-openai-dev-day-sam-altman


I am tired of AI

Tags: tech, ai, machine-learning, gpt, marketing, criticism

I definitely agree with this. I’m sick of the grand claims around what is essentially a parlor trick. Could we tone down the marketing enough so that we can properly think about making useful products again?

https://www.ontestautomation.com/i-am-tired-of-ai/


Were RNNs All We Needed?

Tags: tech, ai, machine-learning, gpt, research

OK, this paper picked my curiosity. The limitations of the experiments makes me wonder if some threshold effects aren’t ignored. Still this is a good indication that the question is worth pursuing further.

https://arxiv.org/abs/2410.01201


I-XRAY

Tags: tech, social-media, scam, ai, machine-learning

Doxxing will get easier and easier. Con men are likely paying attention.

https://docs.google.com/document/d/1iWCqmaOUKhKjcKSktIwC3NNANoFP7vPsRvcbOIup_BA/mobilebasic


Hacking Kia: Remotely Controlling Cars With Just a License Plate

Tags: tech, automotive, security

More details about the KIA security issue. Clearly securing the embedded systems is not worth much if it is then all exposed via unsafe web services.

https://samcurry.net/hacking-kia


Attacking UNIX Systems via CUPS, Part I

Tags: tech, linux, security

This one is definitely a bad one. Looks like CUPS is a weak part of the ecosystem, especially when coupled with zeroconf. I wouldn’t be surprised to see macOS being affected too.

https://www.evilsocket.net/2024/09/26/Attacking-UNIX-systems-via-CUPS-Part-I/


Collaborative Text Editing with Eg-walker: Better, Faster, Smaller

Tags: tests, crdt, collaborative

This could be a game changer to collaborative editing. Clearly a good competitor to CRDTs, should make it easier to build such features without a central server.

https://arxiv.org/abs/2409.14252


Modes Considered Harmful

Tags: tech, distributed, reliability

Interesting point. You likely need to be careful with fallback modes especially in distributed systems. They might bring even more issues when the system is already under stress.

https://a-nickels-worth.dev/posts/modesharm/


std::array in C++ isn’t slower than array in C

Tags: tech, c++, programming, safety, performance

If you still needed to be convinced you need to use std::array and std::span, here is the proof.

https://pvs-studio.com/en/blog/posts/cpp/1164/


Code Generation in Rust vs C++26

Tags: tech, c++, rust, metaprogramming

Interesting comparison of the different choices made in Rust and the upcoming C++26 for code generation. It’s fascinating how they managed to have such facilities in Rust while having no introspection. C++ going the opposite direction will have a very different feel both in term of use or of implementation.

https://brevzin.github.io/c++/2024/09/30/annotations/


The Fastest Mutexes

Tags: tech, multithreading, performance, system

Nice results. Interesting implementation too. I wonder if some of it will make its way to the glibc or musl.

https://justine.lol/mutex/


Less htmx is More

Tags: tech, web, frontend, htmx

As it gets more adoption people are figuring out ways to use htmx properly and not abuse what should be niche features.

https://unplannedobsolescence.com/blog/less-htmx-is-more/


Three small proposals for putting “hyper” back in the hypertext

Tags: tech, web, frontend, html, htmx

Interesting proposals, let’s see how far they go. They could bring most of the benefits of htmx and similar straight in HTML.

https://alexanderpetros.com/triptych/


Changelogs and Release Notes

Tags: tech, foss, project-management

We keep saying they’re not the same. This article does a good job highlighting the differences and explaining why you need both.

https://harihareswara.net/posts/2024/changelogs-and-release-notes/


Learning to Call BS

Tags: tech, product-management

Good idea on how product managers should behave to facilitate requirements handling. I wish more of them would do this.

https://kevinyien.com/blog/bs.html


The world will need less energy after the energy transition

Tags: tech, energy, ecology, economics

Interesting analysis… I wonder if and how Jevons paradox will get in the way though.

https://www.sustainabilitybynumbers.com/p/electrification-energy-efficiency



Bye for now!

KDE e.V., the non-profit organization supporting the KDE community, and the Kdenlive team are looking for proactive contractors to implement some features in the Kdenlive video editor. Two positions are currently open:

  • OpenTimelineIO integration: this will require implementing a C++ module in Kdenlive to allow importing and exporting using this open standard, to allow exchanging project files with other applications. Please see the job ad for more details about this contracting opportunity.

  • Audiowaveform integration: this will require rewriting the code used to generate and display the audio waveforms in Kdenlive using the audiowaveform library. This should bring faster and more precise waveforms in the timeline. Please see the job ad for more details about this contracting opportunity. We are looking forward to your application.