Planet KDE
KDE Ships Frameworks 6.7.0
Friday, 11 October 2024
KDE today announces the release of KDE Frameworks 6.7.0.
KDE Frameworks are 72 addon libraries to Qt which provide a wide variety of commonly needed functionality in mature, peer reviewed and well tested libraries with friendly licensing terms. For an introduction see the KDE Frameworks release announcement.
This release is part of a series of planned monthly releases making improvements available to developers in a quick and predictable manner.
New in this version Breeze Icons- Delete 32px colorful folder action icon symlink. Commit. Fixes bug #478493
- Add new knotes-symbolic.svg icon (22/32/48). Commit. Fixes bug #398901
- Format system-suspend-inhibited, system-suspend-uninhibited. Commit.
- Redesign system-suspend-inhibited, system-suspend-uninhibited. Commit.
- Fix recoloring in applications-multimedia-symbolic and applications-engineering-symbolic. Commit. Fixes bug #492879
- Add show-background icon. Commit. See bug #472863
- Merge output targets from multiple qt6_target_qml_sources() calls. Commit.
- Don't install QML files on Android. Commit.
- Propagate OUTPUT_TARGETS of qt6_target_qml_sources to the caller. Commit.
- Port Qt doc generation to qhelpgenerator. Commit.
- Correctly forward the OUTPUT_TARGETS argument of qt6_add_qml_module(). Commit.
- Set install destination for object files. Commit.
- Upstream FindGLIB2.cmake changes from Qt. Commit.
- KDEClangFormat: Ignore source files being in _install folder. Commit.
- Reenable individual targets for clang-format to enable better status reporting an parallelization. Commit.
- K7zip: prevent crash when archive has no modification times for files. Commit.
- Silence false positive clazy checks. Commit.
- Drop obsolete includes and HAVE_X11. Commit.
- Always show title and caption in tooltip if truncated. Commit.
- Make unit tests work with a static Qt build. Commit.
- General/widgetStyle -> KDE/widgetStyle. Commit.
- Make unit tests work with a static Qt build. Commit.
- Kcoreaddonsplugin: Link against Qt6::Network. Commit.
- Restore KProcess on Android. Commit.
- Don't build kprocesstest for Android/iOS. Commit.
- Fix build on ios. Commit.
- Qpixmapitem: prevent a crash when there are no window yet. Commit.
- Provide option to enable relocatable docbook files on non WIN32 platforms. Commit.
- KCountryFlagEmoji: Improve fitting to the icon's bounding box. Commit.
- KCountryFlagEmoji: Fix emoji representation for non-country codes. Commit.
- KCountryFlagEmoji: Add test and demo cases for non-coutry codes. Commit.
- Fix window insets foreground coloring on older Android versions. Commit.
- Fix build with Qt < 6.7. Commit.
- Fix color luma computation for Android window insets. Commit.
- WaylandClipboard: fix QMimeData::urls() not working. Commit.
- Update version for window insets API to match reality. Commit.
- Add QML bindings for KWindowInsetsControllert. Commit.
- Add KWindowInsetsController. Commit.
- WaylandClipboard: make sure format list doesn't have duplicate items. Commit.
- Holiday_si_sl: added missing Slovenian commemoration day. Commit.
- Make KTranscript work in static builds. Commit.
- Make QML API unit test work with static Qt builds. Commit.
- Fix endianness bug in PCX reader on big endian architectures. Commit.
- Fixed read of BGR32 and RGB555 formats. Commit.
- FIxed comparison of unsigned expression. Commit.
- Raw: Getting the image size does not need unpacking. Commit.
- [OpenFileManagerWindowJob] Fix crash when falling back to KRunStrategy. Commit. Fixes bug #486494
- Previewjob: Use .cache as temp folder, delete temp file after use. Commit. Fixes bug #494096. See bug #494061
- KFileItemActions: Try reading X-KDE-Show-In-Submenu as bool instead of string. Commit.
- KFilePlacesView: have setUrl() handle trailing slashes in place URLs. Commit.
- KFilePlacesItem: Use Solid to find home mount point. Commit.
- Fileitem,file_unix: simplify types for stat. Commit.
- Remove one level of three nesting in kdevtemplate. Commit.
- Knewfilemenutest: cleanup. Commit.
- Knewfilemenutest: test files and folders in ~/Templates. Commit.
- ConnectionBackenp: fix passing errorString. Commit.
- Knewfilemenu: Make ~/Templates work by simply placing files and folders there. Commit. Fixes bug #191632
- KFilePlacesItem: Cache groupType. Commit.
- Previewjob: avoid calling mkdir for path with two slashs. Commit.
- Add since info for new API. Commit.
- Re-enable cachegen on Android. Commit.
- Create CMake config file only once all build parameters are known. Commit.
- Fix unit tests when using a static build. Commit.
- PlatformTheme: fix crash when item is being destroyed. Commit.
- OverlaySheet: make default title vertically center aligned. Commit. Fixes bug #489357
- Fix clang-format version imcompatibilities and avoid turning formatting of. Commit.
- Dialog: Take header width into account, small fix for footerToolbar width. Commit.
- Workaround on incorrect palette update. Commit. Fixes bug #493654
- Platform: Check if weak pointer is expired in PlatformThemeChangeTracker ctor. Commit. Fixes bug #493652
- Dialog: Use footer buttons width if its wider than content. Commit.
- Fix sidebar text color in systemsettings. Commit.
- Use disabled text colors also for inherit-ing Theme instances. Commit. Fixes bug #433256
- Autotests/tst_theme: Add a test that verifies only one signal emission happens. Commit.
- Autotests/tst_theme: Remove waiting for events. Commit.
- Autotests/tst_theme: Explicitly mark root test objects as not inheriting. Commit.
- Add PlatformThemeChangeTracker to BasicTheme::sync(). Commit.
- Platform: Replace PlatformTheme::queueChildUpdate with ChangeTracker::Data flag. Commit.
- Platform: Don't use queued signals for batching change signals in PlatformTheme. Commit.
- Fix NavigationTabBar sizing on mobile. Commit.
- ContextualHelpButton: Clip to avoid text overflow. Commit.
- ContextualHelpButton: Fix flickering when the popup covers the button. Commit. Fixes bug #489688
- ColumnView currently allows having a QObject item inside its children list. Commit.
- ToolBarLayout: Add support for actions that are separators. Commit.
- Don't emit twice slotEntryChanged. Commit. See bug #492557
- Qtquick: make sort/filter buttons like Discover/kcms. Commit.
- Fix Android notification permission check. Commit.
- Ensure notification permission request callback is run on the right thread. Commit.
- Document flatpak manifest requirements. Commit.
- Fix typo in docs. Commit.
- Port away from deprecated KPluralHandlingSpinBox. Commit.
- Fix unexpected space indentation in Go var group. Commit. Fixes bug #487054
- Read dir kateconfig on view creation. Commit. Fixes bug #489600
- Fix pressing on } inserts two lines instead of one. Commit. Fixes bug #479717
- Dont remove trailing spaces in markdown by default. Commit. Fixes bug #451648
- Multicursors: Avoid indenting the sameline twice. Commit.
- Blockmode: repair indent when the cursor is in the first column. Commit.
- Multicursor: Fix indent with multiple cursors. Commit.
- With latest syntax definition, more tests pass for ruby. Commit.
- Use more views. Commit.
- Avoid double signal emission. Commit.
- Less deprecated calls, works locally. Commit.
- Store multiline ranges spanning multiple blocks in TextBuffer. Commit.
- Remove MovingRange caching in TextBlock. Commit.
- Add hint the file might got moved. Commit. Fixes bug #476071
- Dont create selection highlights with multiple selections. Commit.
- Optimize killLine for multiple cursors. Commit.
- Completion: Allow async population of documentation. Commit.
- More const to avoid wrong use of these members. Commit.
- Ensure modify the renderer that is used for printing. Commit. Fixes bug #465526. Fixes bug #488605. Fixes bug #487081. Fixes bug #483550
- Fix text insertion with multiple cursors at same position. Commit. Fixes bug #492869
- Add command names for "Remove Spaces" and "Keep Extra Spaces". Commit.
- Minimap now follows the theme also for search matches. Commit.
- Run clang-format. Commit.
- Fix merging of selections in opposite directions. Commit. See bug #492869
- Fix secondary cursor at boundary of selection doesn't get removed. Commit. See bug #492869
- Fix warnings. Commit.
- Build master ECM as part of the Flatpak build. Commit.
- Fix crash with older Qt. Commit. Fixes bug #493060
- Fix build against a static Qt. Commit.
- KDateComboBox: emit dateEntered() on FocusOut. Commit.
- Correctly read manually-specified ipv6 addresses from Networkmanager. Commit. Fixes bug #476008. Fixes bug #453453
- Simplify loops and avoid creating iterator on temporary. Commit.
- Use static regex for reusable objects. Commit.
- [imgur] Restrict to actually supported MIME types. Commit.
- Add extraJsonTranslationPaths.txt file for purpose specific translations. Commit.
- Ensure KPlugin object contains no unstandardized keys. Commit.
- Kquickstyleitem: Don't crash if colors changed and style option is null. Commit.
- Kirigamiintegration: Track changes to PlatformTheme where needed. Commit.
- TextFieldContextMenu: Open menu by keyPressed at TextField.cursorRectangle position. Commit.
- Fstab: add missing signal override. Commit.
- Fstab: Emit accessibilityChanged only when actually changed. Commit.
- Get rid of implicit QString and QChar conversions. Commit.
- Get rid of implicit QByteArray to const char* conversions. Commit.
- [Fstab] Minor cleanups (new style connect, extraneous include). Commit.
- [Fstab] Remove mntent wrapper macros. Commit.
- [Fstab] Remove remnants of Solaris support. Commit.
- Fail if none of the plugins can be build. Commit.
- Search for private link dependencies in static builds. Commit.
- Upload the uncompressed files. Commit.
- Odin: add missing items, fix attribute, add directive. Commit.
- Swift: fix detection of end of protocol method declaration. Commit. Fixes bug #493459
- Indexer: treats 1-character StringDetect as a DetectChar for unreachable rules and the merge suggestion. Commit.
- Indexer: check that WordDetect does not contain spaces at the beginning and end of text. Commit.
- Simplify installed xml syntax files to speed up reading. Commit.
- Indexer: replace some QString with QStringView and QLatin1Char with char16_t literal. Commit.
- Indexer: fix default value for char with LineContinuation. Commit.
- Orgmode.xml: Fix orgmode syntax highlighting not ending properly. Commit.
- Jira, Markdown, Org Mode: use rhtml syntax with erb language. Commit.
- Haml: complete the syntax and fix the highlighting of Ruby line following the change in ruby.xml. Commit.
- Ruby: fix %W, dot member, some parenthesis ; add ?c, escape char, etc. Commit. Fixes bug #488014
- Gleam: Minor modifications to syntax and example file. Commit.
- Remove truncase from Common Lisp. Commit.
KDE neon Rebased on Ubuntu 24.04 LTS
We have just switched on the upgrade for KDE neon to rebase on Ubuntu 24.04 LTS.
We do this every two years and the 22.04 LTS base was getting increasingly crusty with old Pipewire causing problems and packages like Krita not compiling at all.
Follow the Noble Upgrade instructions or just click the notification that should appear soon.
Kubuntu 24.10 Oracular Oriole Released
The Kubuntu Team is happy to announce that Kubuntu 24.10 has been released, featuring the new and beautiful KDE Plasma 6.1 simple by default, powerful when needed.
Codenamed “Oracular Oriole”, Kubuntu 24.10 continues our tradition of giving you Friendly Computing by integrating the latest and greatest open source technologies into a high-quality, easy-to-use Linux distribution.
Under the hood, there have been updates to many core packages, including a new 6.11 based kernel, KDE Frameworks 5.116 and 6.6.0, KDE Plasma 6.1 and many updated KDE gear applications.
Kubuntu 24.10 with Plasma 6.1Kubuntu has seen many updates for other applications, both in our default install, and installable from the Ubuntu archive.
Applications for core day-to-day usage are included and updated, such as Firefox, and LibreOffice.
For a list of other application updates, and known bugs be sure to read our release notes.
Wayland as default Plasma session.The Plasma wayland session is now the default option in sddm (display manager login screen). An X11 session can be selected instead if desired. The last used session type will be remembered, so you do not have to switch type on each login.
Download Kubuntu 24.10, or learn how to upgrade from 24.04 LTS.
Note: For upgrades from 24.04, there may a delay of a few hours to days between the official release announcements and the Ubuntu Release Team enabling upgrades.
Qt for Python release: 6.8 is out now!
We’re very happy to announce the latest release of Qt for Python 6.8. With every new release, we try to bring great things with Qt's new features and new trending ideas. For your convenience, you can check out what's new in Qt for Python 6.8 and what’s improved, along with the entire change log.
Kirigami Addons 1.5
Kirigami Addons is out. This releases contains mostly code cleanup and minor improvements. There is netherless a few relevant changes. Thanks to everyone who contributed some code.
New KAppTemplate’s templateA new KAppTemplate is available as a good starting point for application that manage multimedia libraries. It is based on shared design of Peruse, Arianna and the WIP Calligra Launcher.
Hopefully it helps people who want to develop game launchers and other type of specialized multimedia applications.
More templates are planned (e.g. for chat applications), so stay tunned!
FormCardFormCard is the part of Kirigami Addons that received the most changes in this release. First of all, FormCard now use more consistent spacing and padding, which slighly less horizontal padding. Descriptions for radio and checkbox delegates are also put underneath the delegate’s main text and checkbox, in an effort to make FormCard a bit more compact.
Before AfterAdditionally FormComboBoxDelegate now lets you display an inline status similar to that is available in other FormCard’s delegates.
Finally FormCard.AboutKDE was renamed to FormCard.AboutKDEPage. This improve the naming consistency with other page compoenents. A compatibility wrapper on top of AboutKDEPage named AboutKDE is still available to not break any existing applications.
DeprecationsThe Banner component is now deprecated. Kirigami.InlineMessage now has a position parameter which can be set to Header or Footer. Additionally with KDE Frameworks 6.8 Kirigami.InlineMessage will look exactly the same as Banner! So there is no more reasons for this component to exists in Kirigami Addons.
OtherKirigami Addons supports static builds with a recent enough version of extra-cmake-modules.
Packager SectionYou can find the package on download.kde.org and it has been signed with my GPG key.
KDE Gear 24.08.2
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: Ignore trailing slashes when comparing place URLs (Commit)
- kate: Fix session restore of tabs/views of untitled documents (Commit, fixes bug #464703, bug #462112 and bug #462523)
- konsole: Fix a crash when sending OSC 4 (RGB) color outside the 256 range (Commit, fixes bug #494205)
Distro and app store packagers should update their application packages.
- 24.08 release notes for information on tarballs and known issues.
- Package download wiki page
- 24.08.2 source info page
- 24.08.2 full changelog
Cursor Size Problems In Wayland, Explained
I've been fixing cursor problems on and off in the last few months. Here's a recap of what I've done, explanation of some cursor size problems you might encounter, and how new developments like Wayland cursor shape protocol and SVG cursors might improve the situation.
(I'm by no means an expert on cursors, X11 or Wayland, so please correct me if I'm wrong.)
Why don't we have cursors in the same size anymore?My involvement with cursors started back in the end of 2023, when KDE Plasma 6.0 was about to be released. A major change in 6.0 was enabling Wayland by default. And if you enabled global scaling in Wayland, especially with a fractional scale like 2.5x, cursor sizes would be a mess across various apps (the upper row: Breeze cursors in Plasma 6.0 Beta 1, Wayland, 2.5x global scale, the lower row: Same cursors in Plasma 6.0):
So I dug into the code of my favorite terminal emulator, Kitty, which at the time drew the cursor in a slightly smaller size than it should be (similar to vscode in the above image). I gained some understanding of the problem, and eventually fixed it. Let me explain.
How to draw cursors in the same size in different apps?In X11, there used to be a standard set of cursors, but nowadays most apps use the XCursor lib to load a (user-specified) cursor theme and draw the cursor themselves. So in order to have cursors in the same theme and size across apps, we need to make sure that:
- Apps get the same cursor theme and size from the system.
- Apps draw the cursor in the same way.
The transition to Wayland created difficulties in both points:
1. Get the same cursor theme and size from the systemIt used to be simple in X11: we have Xcursor.size and Xcursor.theme in xrdb, also XCURSOR_SIZE and XCURSOR_THEME in environment variables. Setting them to the same value would make sure that all apps get the same cursor theme and size.
But Wayland apps don't use xrdb, and they interpret XCURSOR_SIZE differently: in X11, the size is in physical pixels, but in Wayland it's in logical pixels. E.g., if you have a cursor size 24 and global scale 2x, then in X11, XCURSOR_SIZE should be 48, but in Wayland it should be 24.
The Wayland way is necessary. Imagine you have two monitors with different DPI, e.g. they are both 24" but monitor A is 1920x1080, while monitor B is 3840x2160. You set scale=1 for A and scale=2 for B, so UI elements would be the same size on both monitors. Then you would also want the cursor to be of the same size on both monitors, which requires it to have 2x more physical pixels on B than on A, but it would be the same logical pixels.
So Plasma 6.0 no longer sets the two environment variables, because XCURSOR_SIZE can't be simultaneously correct for both X11 and Wayland apps. But without them and xrdb, Wayland apps no longer have a standard way to get the cursor theme and size. Instead, different frameworks / toolkits have their own ways. In Plasma, KDE / Qt apps get them from the Qt platform integration plugin provided by Plasma, GTK4 apps from ~/.config/gtk-4.0/settings.ini (also set by Plasma), Flatpak GTK apps from the GTK-specific configs in XDG Settings Portal.
The last one is particularly weird, as you need to install xdg-desktop-portal-gtk in order fix Flatpak apps in Plasma, which surprised many. It might seem like a hack, but it's not. Plasma officially recommends installing xdg-desktop-portal-gtk, and this was suggested by GNOME developers.
But what for 3rd-party Wayland apps besides GTK and Qt? The best hope is to read settings in either the GTK or the Qt way, piggy-backing the two major toolkits, assuming that the DE would at least take care of the two.
(IMHO either Wayland or the XDG Settings Portal should provide a standard way for apps to get the cursor theme and size.)
That was part of the problem in Kitty. It used to read settings from the GTK portal, but only under a GNOME session. I changed it to always try to read from the portal, even if under Plasma. But that's not the end of the story...
2. Draw the cursor in the same wayIt's practically a non-issue in X11, as the user usually sets a size that the cursor theme provides, and the app just draws the cursor images as-is. But if you do set a cursor size not available in the theme (you can't do that in the cursor theme settings UI, but you can manually set XCURSOR_SIZE), you'll open a can of worms: various toolkits / apps deal with it differently:
- Some just use the closest size available (Electron and Kitty at the time), so it can be a bit smaller.
- Some use the XCursor default size 24, so it's a lot smaller.
- Some scale the cursor to the desired size, and the scaling algorithm might be different, resulting in pixelated or blurry cursors; Also they might scale from either the default size or the closest size available, resulting in very blurry (GTK) or slightly blurry (Qt) cursors.
The situation becomes worse with Wayland, as the user now specifies the size in logical pixels, then apps need to multiply it by the global scale to get the size in physical pixels, and try to load a cursor in that size. (If the app load the cursor in the logical size, then either the app or the compositor needs to scale it, resulting in a blurry / pixelated cursor.) With fractional scaling, it's even more likely that the required physical size is not available in the theme (which typically has only 2~5 sizes), and you see the result in the picture above.
One way to fix it (and why I didn't do)It can be fixed by moving the "when we can't load cursors in the size we need, load a different size and scale it" logic from apps / toolkits to the XCursor lib. When the app requests cursors in a size, instead of returning the closest size available, the lib could scale the image to the requested size. So apps would always get the cursor in the size they ask for, and their own different scaling algorithms won't get a chance to run.
Either the default behavior can be changed, or it can be hidden behind a new option. But I didn't do that, because I felt at the time that it would be difficult to either convince XCursor lib maintainers to make a (potentially breaking) change to the default behavior, or to go around convincing all apps / toolkits to use a new option.
My fix (or shall we say workaround)Then it came to me that although I can't fix all these toolkits / apps, they seem to all work the same way if the required physical size is available in the theme - then they just draw the cursor as-is. So I added a lot of sizes to the Breeze theme. It only has size 24, 36 and 48 at the time, but I added physical sizes corresponding to a logical size 24 and all global scales that Plasma allows, from 0.5x to 3x, So it's 12, 18, 24 ... all the way to 72.
It was easy. The source code of the Breeze theme is SVG (so are most other themes). Then a build script renders it into images using Inkscape, and packages them to XCursor format. The script has a list of the sizes it renders in, so I added a lot more.
And it worked! If you choose Breeze and size 24, then (as in the bottom row in the picture above) various apps draw the cursor in the same size at any global scale available in Plasma.
But this method has its limitations:
- We can't do that to 3rd-party themes, as we don't have their source SVG.
- It only works if you choose the default size 24. If you choose a different size, e.g. 36, and a global scale 3x, then the physical size 36x3=108 is not available in the theme, and you see the mess again. But we can't add sizes infinitely, as explained in Vlad's blog, the XCursor format stores cursor images uncompressed, so the binary size grows very fast when adding larger sizes.
Both limitations can be lifted with SVG cursors. But before getting to that, let's talk about the "right" way to fix the cursor size problem:
The "right" fix: Wayland cursor shape protocolThe simple and reliable way to get consistent cursors across apps is to not let apps draw the cursor at all. Instead, they only specify the name of the cursor shape, and the compositor draws the cursor for them. This is how Wayland cursor shape protocol works. Apps no longer need to care about the cursor theme and size (well, they might still need the size, if they want to draw custom cursors in the same size as standard shapes), and since the compositor is the only program drawing the cursor, it's guaranteed to be consistent for all apps using the protocol.
(It's quite interesting that we seem to went a full circle back to the original server-defined cursor font way in X11.)
Support for this protocol leaves a lot to improve, though. Not all compositors support it. On the client side, both Qt and Electron have the support, but GTK doesn't.
There are merge requests for GTK and Mutter, but GNOME devs request some modifications in the Wayland protocol before merging them, and the request seems to be stuck for some months. I hope the recent Wayland "things" could move it out of this seemingly deadlock.
Anyway, with this protocol, only the compositor has to be modified to support a new way to draw cursors. This makes it much easier to change how cursors work. So we come to:
SVG cursorsImmediately after the fix in Breeze, I proposed this idea of shipping the source SVG files of the Breeze cursor theme to the end user, and re-generate the XCursor files whenever the user changes the cursor size or global scale. This way, the theme will always be able to provide the exact size requested by apps. (Similar to the "modify XCursor lib" idea, but in a different way.) It would remove the limitation 2 above (and also limitation 1 if 3rd-party themes ship their source SVGs too).
With SVG cursors support in KWin and Breeze, I plan to implement this idea. It would also allow the user to set arbitrary cursor size, instead of limited to a predefined list.
Problems you might still encounter today Huge cursors in GTK4 appsIt's a new problem in GTK 4.16. If you use the Breeze cursor theme and a large global scale like 2x or 3x, you get huge cursors:
It has not limited to Plasma. Using Breeze in GNOME would result in the same problem. To explain it, let me first introduce the concept of "nominal size" and "image size" in XCursor.
Here is GNOME's default cursor theme, Adwaita:
"Nominal size" is the "cursor size" we are talking about above. It makes the list of sizes you choose from in the cursor theme settings UI. It's also the size you set in XCURSOR_SIZE. "Image size" is the actual size of the cursor image. "Hot spot" is the point in the image where the cursor is pointing at.
Things are a bit different in the Plasma default cursor theme, Breeze:
Unlike Adwaita, the image size is larger than the nominal size. That, combined with a global scale, triggers the bug in GTK4. Explanation of the bug.
XCursor allows the image size to be different from the nominal size. I don't know why it was designed this way, but my guess is so you can crop the empty part of the image. This both reduces file size, and reduces flicking when the cursor changes (with software cursors under X11). But the image size can also be larger than the nominal size, and Breeze (and a lot of other themes) uses this feature.
You can see in the above images that the "arrow" of nominal size 24 in Breeze is actually similar in size to the same nominal size in Adwaita. But the "badge" in Breeze is further apart, so it can't fit into a 24x24 image. That's why Breeze is built this way. In a sense, "nominal size" is similar to how "font size" works, where it resembles the "main part" of a character in the font, but some characters can have "extra parts" that go through the ceiling or floor.
This problem is already fixed in the main branch of GTK 4, but it's not backported to 4.16 yet, probably because the fix uses a Wayland feature that Mutter doesn't support yet. So at the moment, your only option is to use a different cursor theme whose "nominal size" and "image size" are equal.
Smaller cursors in GTK3 apps (most notably, Firefox)The cursor code in GTK3 is different from GTK4, with its own limitations. You might find the cursor to be smaller than in other apps, and if you run the app in a terminal, you might see warnings like:
cursor image size (64x64) not an integer multiple of scale (3)GTK3 doesn't support fractional scales in cursors. So if you have cursor size 24 and global scale 2.5x or 3x, it will use a scale 3x and try to load a cursor with a nominal size 24x3=72. And it requires the image size to be an integer multiple of the scale. So if your theme doesn't have a size 72, or it does but the image size is not multiple of 3, GTK3 fallbacks to a smaller unscaled cursor.
End wordsOK, this is a long post. Hope I can bring you more cursor goodies in Plasma 6.3 and beyond.
KPhotoAlbum 5.13.0 released
After almost a year, we’re very pleased to announce a new release of KPhotoAlbum, the Linux/KDE photo management software!
There are two new features/changes:
- The “time ago”/birthday/age calculation has been reworked. Timespans should now be displayed in a nicer (more natural) way. Also, the age of people born on February 29 is now calculated correctly.
- The ‘--db’ command line argument now rejects any file name that is not either an existing directory or an index.xml file within an existing directory (cf. Bug #418647).
Apart from that, quite a number of bugs have been fixed (cf. the ChangeLog for more info): #477529, #477530, #477531, #477532, #478944, #479483, #481181, #483266, #444744 and #493849. And on top some bugs that weren’t reported as a bug in the first place :-)
One additional change that should be mostly interesting for the distributors is: The key used for signing the release has been updated. All PGP keys used to sign KDE software releases can be found in the sysadmin/release-keyring repo. My currently used key that I used to sign the tarball can also be found there, cf. tleupold@key2.asc.
… and what about Qt 6?!
Fear not! Of course, there will be a Qt6/KF6 release of KPhotoAlbum. We currently have a working Qt6/KF6 branch, so most of the porting is already done. Last thing that’s missing is a Qt6/KF6 release of Marble, which we use to display maps for geographic coordinates in photos (preferrably stored there using KGeoTag ;-). It seems like there will be such a release towards the end of the year. We will get KPhotoAlbum ready for Qt6/KF6 shortly afterwards. Stay tuned!
According to git log, the following individuals contributed commits since the last release:
- Boudhayan Bhattacharya
- Oliver Kellogg
- Tobias Leupold
- Randall Rude
- Johannes Zarl-Zierl
Have a lot of fun with KPhotoAlbum 5.13.0 :-)
Linux App Summit – A Review!
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.2
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 ArtistsPlasma 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 ManagementRelated 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 ManagementManaging 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.
Discover and System UpdatingAnother 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.
AccessibilitySince 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.
UI/Visual DesignAnd 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!
Plasma6 and FreeBSD 14
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 InstallFreeBSD 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 HandAt 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-x11Then 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 HandFirst, 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
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-waylandSo 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 Plasma6Yeah, 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.
Python and SysV shared memory
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 pointerCTypes 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 destructionThere’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 messagesAs 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.
TakeawaysCTypes 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.
Google Summer of Code Mentor Summit 2024
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.
This Week in KDE Apps
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 filesDolphin 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)
Kaidan User-friendly and modern chat app for every deviceKaidan, KDE's XMPP instant messaging app, improves support for group chats. (Melvin Keskin, Link)
Kate Advanced Text EditorKate 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 editorKDE 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 devicesKDE 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 GUIKleopatra 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 FreedomKrita 5.2.6 is out and fixes a critical issue that popped up in last week's release. More information.
Krusader File ManagerKrusader has been migrated to Qt6 and KF6. (Alex Bikadorov, 3.0.0. Link)
KStars Desktop PlanetariumKStars 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 forecastsKWeather 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)
KDE Itinerary Digital travel assistantA 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 AnalysisThe 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 matrixNeoChat 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 GlobeMarble 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)
Spectacle Screenshot Capture UtilitySpectacle fixed a crash when saving while the system's timezone is misconfigured (Noah Davis, 24.08.2. Link)
Tellico Collection ManagerTellico, 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 FediverseTokodon 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)
Instead of wrapping all the tags for a post, they are now made scrollable. (Joshua Goins, 24.12.0. Link)
Apps on WindowsKDE Apps on windows now have better looking tooltips and menus without black corners. (Carl Schwan, Breeze 6.2.1. Link)
Third Party ApplicationsTo get your application mentioned here. Please contact us on invent or in Matrix.
Kraft Quotes and invoices for small businessKraft 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 ElseThis 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 InvolvedThe 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 cursors: everything that you need to know about them
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 formatA 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 fileAn 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 themeCursor themes can be found in $DATADIR/icons directories. For example, /usr/share/icons or ~/.local/share/icons.
X11 vs Wayland cursorsXcursor 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 XcursorThe 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.1The 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 formatFirst 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 colorsSince 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.
StandardizationThis 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 creatorsBreeze 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.
ExamplesIf you need an example of a cursor theme that supports SVG cursors, please check the Breeze cursor theme.
Closing wordsThe new SVG cursor format is amazing. Please try it!
This week in Plasma: 6.2 is nigh
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 FeaturesDistros 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 ImprovementsWe’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 FixesFixed 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:
- 2 Very high priority Plasma bug (up from 1 last week). Current list of bugs
- 30 15-minute Plasma bugs (down from 33 last week). Current list of bugs
- 137 KDE bugs of all kinds fixed over the last week. Full list of bugs
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.
Web Review, Week 2024-40
Let’s go for my web review for the week 2024-40.
W3C 30th anniversary clipTags: 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
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.
Tags: tech, freebsd, laptop
Unexpected but definitely welcome. Let’s wish them luck in this endeavor.
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.
Tags: tech, patents
Always happy to see a patent troll bite the dust.
https://blog.cloudflare.com/patent-troll-sable-pays-up/
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/
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…
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
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/
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
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/
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.
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
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
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
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/
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
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
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
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/
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
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/
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/
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/
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.
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/
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/
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/
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
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. and Kdenlive team are looking for contractors
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.
QCoro 0.11.0 Release Announcement
A long over-due release which has accumulated a bunch of bugfixes but also some fancy new features…read on!
As always, big thanks to everyone who reported issues and contributed to QCoro. Your help is much appreciated!
QCoro::LazyTask<T>The biggest new features in this release is the brand-new QCoro::LazyTask<T>. It’s a new return type that you can use for your coroutines. It differs from QCoro::Task<T> in that, as the name suggest, the coroutine is evaluated lazily. What that means is when you call a coroutine that returns LazyTask, it will return imediately without executing the body of the coroutine. The body will be executed only once you co_await on the returned LazyTask object.
This is different from the behavior of QCoro::Task<T>, which is eager, meaning that it will start executing the body immediately when called (like a regular function call).
QCoro::LazyTask<int> myWorker() { qDebug() << "Starting worker"; co_return 42; } QCoro::Task<> mainCoroutine() { qDebug() << "Creating worker"; const auto task = myWorker(); qDebug() << "Awaiting on worker"; const auto result = co_await task; // do something with the result }This will result in the following output:
mainCoroutine(): Creating worker mainCoroutine(): Awaiting on worker myWorker(): Starting workerIf myWorker() were a QCoro::Task<T> as we know it, the output would look like this:
mainCoroutine(): Creating worker myWorker(): Starting worker mainCoroutine(): Awaiting on workerThe fact that the body of a QCoro::LazyTask<T> coroutine is only executed when co_awaited has one very important implication: it must not be used for Qt slots, Q_INVOKABLEs or, in general, for any coroutine that may be executed directly by the Qt event loop. The reason is, that the Qt event loop is not aware of coroutines (or QCoro), so it will never co_await on the returned QCoro::LazyTask object - which means that the code inside the coroutine would never get executed. This is the reason why the good old QCoro::Task<T> is an eager coroutine - to ensure the body of the coroutine gets executed even when called from the Qt event loop and not co_awaited.
For more details, see the documentation of QCoro::LazyTask<T>.
Defined Semantics for Awaiting Default-Constructed and Moved-From TasksThis is something that wasn’t clearely defined until now (both in the docs and in the code), which is what happens when you try to co_await on a default-constructed QCoro::Task<T> (or QCoro::LazyTask<T>):
co_await QCoro::Task<>(); // will hang indefinitely!Previously this would trigger a Q_ASSERT in debug build and most likely a crash in production build. Starting with QCoro 0.11, awaiting such task will print a qWarning() and will hang indefinitely.
The same applies to awaiting a moved-from task, which is identical to a default-constructed task:
QCoro::LazyTask<int> task = myTask(); handleTask(std::move(task)); co_await task; // will hang indefinitely!` Compiler SupportWe have dropped official support for older compilers. Since QCoro 0.11, the officially supported compilers are:
- GCC >= 11
- Clang >= 15
- MSVC >= 19.40 (Visual Studio 17 2022)
- AppleClang >= 15 (Xcode 15.2)
QCoro might still compile or work with older versions of those compilers, but we no longer test it and do not guarantee that it will work correctly.
The reason is that coroutine implementation in older versions of GCC and clang were buggy and behaved differently than they do in newer versions, so making sure that QCoro behaves correctly across wide range of compilers was getting more difficult as we implemented more and more complex and advanced features.
Other Features and ChangesA coroutine-friendly version of QFuture::takeResult() is now available in the form of QCoroFuture::takeResult() when building QCoro against Qt 6 (#217).
QCoro::waitFor(QCoro::Task<T>) no longer requires that the task return type T is default-constructible (#223, Joey Richey)
Bugfixes- Suppress Clang error when building against Android NDK <= 25 (#204, Daniel Vrátil)
- Fixed missing QtGui dependency in QCoroQuick module (#209, Andreas Sturmlechner)
- Fixed QCoroIODevice::write() always returning 0 instead of bytes written (#211, Daniel Vrátil)
- Fixed unchecked std::optional access in QCoroIODevice::write
- Fixed awaiting on signal emission with qCoro() would resume the awaiter in the sender’s thread context (#213, Daniel Vrátil)
- Fixed build wilth clang 18 due to missing #include <exception> (#220, Micah Terhaar)
- Fixed crash when QNetworkAccessManager is destroyed from a coroutine awaiting on a network reply (#231, Daniel Vrátil)
If you enjoy using QCoro, consider supporting its development on GitHub Sponsors or buy me a coffee on Ko-fi (after all, more coffee means more code, right?).