Skip to content

Wednesday, 22 March 2023

This blog introduces a new tool to make it easy to stream wayland windows and screens to existing applications running under Xwayland that don't have native pipewire support in an easy-to-use manner than retains full user control throughout.

Intro

On my Plasma wayland session right now if I use the screen share function in Discord, I'm presented with the following.

It doesn't work 🙁

I have no windows listed, even though I clearly have windows open. The full screen shares are blank.
The same will be true in MS Teams, Slack, Zoom as well as any other Xwayland apps that involve screencasts.

Linux enthusiasts - and by reading developer blogs you're definitely in this camp - will understand why this is and probably know some technique to avoid this involving changing my setup or workflow in some way to work round things on a per-app basis.

For our wider userbase this isn't enough. Wayland is a technical detail and we want any switch has to be as transparent as possible for as many apps as possible for all cases - including cases we haven't thought of.

Introducing XwaylandVideoBridge

With our new tool, written by Aleix Pol and myself, running the workflow is as follows: I click on the share button. Immediately I'm presented with an option to choose what windows or screens I wish to make available to X.

This is now selectable in my existing application. The stream continues until I stop sharing within the application.

Left: a prompt to choose windows to stream.
Right: How it appears after selection

Security

The bridge works via the same mechanisms as any "native wayland" video streaming tool would work, through the XDG Desktop Portals. Getting data through PipeWire as requested it through the portal with explicit user consent.
Whilst the bridge does mean that any X application could eavesdrop the shared window the user still remains completely at the helm of which windows are shared to X applications and most importantly when.

We could go the route of trying to be completely seamless to the X client with N fake windows all forwarding content on demand, but I like the demonstration that it's possible to not break existing user applications without having to compromise on our lofty wayland goals.

Performance

Technically there's an overhead, pragmatically it uses no CPU and any latency is negligible compared to the cost of streaming.

Installation

Grab a flatpak from: Our gitlab builder or from source.

Note it requires a non-released libkpipewire, something the flatpak resolves.

Whilst only tested on a Plasma wayland session, this should be usable by any Wayland desktop with a working xdg-desktop-portal, screencasting and standard system tray.
(Edit March 24th: User testing has shown some mixed results on Gnome with colours, and completely not working at all Sway)

Usage

Ensure our proxy is running in the background flatpak run org.kde.xwaylandvideobridge optionally setting it to autostart. After that everything should kick in automatically the next time an Xwayland application starts streaming.

How it works under the hood

The inspiration for this came from the debug tool to show pipewire streams in a window whilst we were working on Plasma remote desktop support. If we force that debug tool to run as an Xwayland client, it becomes visible to other Xwayland chat / streaming programs. We had 90% of the code already.

The only remaining step was some sneaky tricks to hide this X11 window from the user's view making it unfocussable, invisible and out of view. We then added detection for when we're being streamed by using the XRecord extension to monitor all clients redirecting the window we own.

It's an excellent example of X11 allowing you to do really, really stupid things, for novel and creative puposes.

Future Plans

This is only an initial Alpha release. How we take it in the future is not completely decided; it might remain a standalone tool moving to flathub or distros, we might proposed it into Plasma 6 by default. There's a possibility the Linux desktop might be at a point where this is redundant.

There's definitely some minor tweaks still to do on the exact workflow.

Please do give feedback and let us know!

http://disuss.kde.org thread

Tuesday, 21 March 2023

Working on the Nextcloud desktop client, I stumbled into a nasty little bug. If you tried to add or remove a user account, the app would often freeze for a while. This was super annoying during testing, so I decided to look into it. Surprisingly this wasn’t a new bug I’d unwittingly introduced; tracing the … Continue reading "Fixing QtKeychain freezing on Apple devices"

Today we are announcing the availability of the latest release of LabPlot: Say hello to LabPlot 2.10!

This release comes with many new features, improvements and performance optimizations in different areas, as well as with support for new data formats and visualization types.

The major new features are introduced below. For a more detailed review of the changes in this new release, please refer to the ChangeLog file.

The source code of LabPlot, the Flatpak and Snap packages for Linux, as well as the installer for Windows and the image for macOS are available from our download page.

What’s new in 2.10?

Worksheet

LabPlot’s worksheet comes with new visualizations and more advanced plots, including:

  • Bar plots
  • Plot templates that allow you to save and re-use custom plot configurations
  • Error bars in histograms
  • Rug plots for box plots and histograms
  • More flexible and customizable box plots
  • Reference ranges, that is, custom areas on the plot to highlight x- and y-ranges
  • LaTeX error messages in text labels when rendering with LaTeX

Spreadsheet

The Spreadsheets gain more functions and operations to modify and generate data:

  • Data sampling (random and periodic methods)
  • Data flattening to convert pivoted data to column base format
  • Baseline subtraction using the arPLS algorithm
  • Heat-map formatting for categorical data in text columns
  • Column statistics for text columns, including the frequency table, bar and Pareto plots
  • Functions to access arbitrary cells of columns with cell (f(index), g(column, ..))
  • Functions to work with column statistics (size, mean, stddev, etc.)
  • Ability to specify the seed number when generating random numbers

Analysis

The new analysis tools added to LabPlot 2.10 include:

  • Maximum likelihood estimation for several distributions
  • Guess start values of fit parameter for polynomial models by linear regression
  • Export the results of a computation to a new spreadsheet
  • Fourier filtering for DateTime data

Import/Export

LabPlot 2.10 adds support for new file formats and multiple optimizations to improve import performance:

  • Import of Excel .xlsx files
  • Export spreadsheet and matrices to Excel .xlsx format
  • Import of Binary Log File (BLF) files from Vektor Informatik
  • HDF5: support VLEN data import
  • Reduced memory consumption when importing from a database table into a spreadsheet
  • Reduced memory consumption during the spreadsheet export to SQLite databases
  • Faster import of files with a large number of columns

Notebook

The 2.10 release Improves the variable panel and plot export:

  • Show the type of a variable, its size (in Bytes), and its dimension (number of rows and columns) for backends that provide this information
  • Properly show the values of Octave’s row vectors and matrices
  • Allow to copy variable names and values to the clipboard
  • Export plot results to vector graphic formats (PDF and SVG)

Friday, 17 March 2023

Let’s go for my web review for the week 2023-11.


MoonRay Production Renderer

Tags: tech, foss, 3d, movie

This is a huge! DreamWorks Animation releasing its rendering pipeline as free software.

https://openmoonray.org/


Who reads your email?

Tags: tech, email, decentralized, self-hosting

This is very very centralized. No good surprise here unfortunately… and still email is really tough to fully self-host.

https://www.netmeister.org/blog/mx-diversity.html


Microsoft just laid off one of its responsible AI teams

Tags: tech, ai, microsoft, ethics, gpt

Well, people asking relevant questions slow you down obviously… since the goal about the latest set of generative models is to “move them into customers hands at a very high speed” this creates tension. Instead of slowing down they seem hell bent at throwing ethics out of the window.

https://www.platformer.news/p/microsoft-just-laid-off-one-of-its


GPT-4’s successes, and GPT-4’s failures - by Gary Marcus

Tags: tech, ai, gpt, ethics, science

The lack of transparency is staggering… this is purely about hype and at that point they’re not making any effort to push science forward anymore.

https://garymarcus.substack.com/p/gpt-4s-successes-and-gpt-4s-failures


Vim Best Practices For IDE Users

Tags: tech, tools, ide, vim

Very thorough overview of everything you can do with vim but also your IDE vim emulation.

https://betterprogramming.pub/50-vim-mode-tips-for-ide-users-f7b525a794b3


What a good debugger can do

Tags: tech, debugging, tools

I find debuggers to be underused at quite a few places. A shame when you see what they can do nowadays, and they keep improving!

https://werat.dev/blog/what-a-good-debugger-can-do/


Git Worktree: Enhance your Git Workflow

Tags: tech, tools, git

An often forgotten feature of git. That said it is very convenient when we need to juggle several branches at the same time. This can save some time and space.

https://www.dylanpaulus.com/posts/git-worktree


macige • mobile app CI workflow generator

Tags: tech, ci, mobile

Early days but could turn out useful when it gets more complete. Good way to easily have a CI pipeline targeting mobile platforms.

https://macige.tramline.app/


GitHub - huytd/comby-search: A code search tool based on Comby

Tags: tech, tools, refactoring

Looks like it completes Comby nicely for the search only case.

https://github.com/huytd/comby-search


Remote Synthesis | The Price Developers Pay for Loving Their Tools Too Much

Tags: tech, react, culture, tools

Excellent post about getting too invested in a single tool. We can loose flexibility in the process. Also in the case of React, I didn’t realize until now that half of the web developers have never known a time when React didn’t exist!

https://remotesynthesis.com/blog/the-price-of-developer-tools/


In Defense of Crusty Old Swiss Army Knives // Zach Goldstein

Tags: tech, django, htmx, react, frontend, backend

Nice exploration of Django + HTMX + web components for a CRUD use case. Interesting insights and highlights some of the limitations with HTMX.

https://zachgoldstein.engineering/posts/crusty-knives/crusty-knives/


Choose boring tools – Eduards Sizovs

Tags: tech, architecture, complexity

Definitely this. If it’s too fancy and fashionable you’re likely to pay it in later with the undue complexity it introduced.

https://sizovs.net/boring/


Debugging Architects - The Architect Elevator

Tags: tech, system, architecture, organization

Indeed, it’s important for architects to get their “hands dirty”. Organizations where it’s not the case prevent their architects to challenge their assumptions pushing them to stay in their ivory tower. It’s a good way for bad decisions to pile up over time.

https://architectelevator.com/transformation/debugging-architect/


Jade Rubick - Advice for new directors

Tags: tech, management

Interesting advises for higher management roles. The information gathering and the distorsion fields are key factors to have in mind to not loose perspective. Otherwise it’s when you’ll start doing more harm than good.

https://www.rubick.com/advice-for-new-directors/


Research: Do People Really Get Promoted to Their Level of Incompetence?

Tags: management, hr, career

Interesting, this seems to empirically confirm the Peter Principle, at least in sales. Also shows that companies are trying to workaround it. Dual career ladders seem to be an interesting path for this.

https://hbr.org/2018/03/research-do-people-really-get-promoted-to-their-level-of-incompetence


No heroes needed

Tags: tech, team, management, project-management

Definitely this as well. Having “heroes” brings obscurity and hide the problems, this prevents management from knowing and handling the issues. This also create lots of missed opportunities for collective learning and improvements.

https://rpadovani.com/no-heroes


Nearly 40% of software engineers will only work remotely | TechTarget

Tags: tech, remote-working, hr, hiring

The report is very US centric. Still it looks like the future standard for developer jobs will be more and more remote.

https://www.techtarget.com/searchhrsoftware/news/365531979/Nearly-40-of-software-engineers-will-only-work-remotely


See the First Complete Map of an Insect’s Brain | Smart News| Smithsonian Magazine

Tags: science, neuroscience

Very import milestone for brain mapping. Far from more complex animals of course and an insane amount of work each time. Still the common fruit fly is already revealing interesting new facts about neurology.

https://www.smithsonianmag.com/smart-news/see-the-first-complete-map-of-an-insects-brain-180981778/


Shoshikantetsu

Tags: culture, japan

Interesting japanese term. “Complete what was originally intended”. A few more proposed at this end of this short post.

https://asnewman.github.io/shoshikantetsu



Bye for now!

Tuesday, 14 March 2023

KBibTeX 0.9.3.2 got released, tar-balls are available at KDE’s download mirrors. This is the last release of the 0.9.x branch. Next is 0.10, where I will prepare release candidate tar-balls in the next few days and hopefully we will see a final release 0.10.0 this Spring.

A number of issues got fixed, including but not limited to:

  • Bugs 463398, 459150, 464607, and 464606.
  • Various online searches got revamped and should work again.
  • Building against newer Qt versions (thanks to Albert Astals Cid)

See the full ChangeLog for all the details.

Some spoilers about what is happening in the ‘master’ branch: I have been working on an exporter to Microsoft Word’s bibliography XML. Writing scientific manuscripts with references in Word is a painful experience, but this exporter allows you to continue to use your favorite BibTeX editor even under dire circumstances.

Monday, 13 March 2023

Dear digiKam fans and users,

After three months of active maintenance and other bugs triage, the digiKam team is proud to present version 7.10.0 of its open source digital photo manager.

See below the list of most important features coming with this release.

Bundles Internal Component Updates

As with the previous releases, we take care about upgrading the internal components from the Bundles. Microsoft Windows Installer, Apple macOS Package, and Linux AppImage binaries now hosts:

Friday, 10 March 2023

Make sure you commit anything you want to end up in the KDE Gear 23.04 releases to them

We're already past the dependency freeze.

The Feature Freeze and Beta is next week Thursday 16 of March.

More interesting dates  
  March 30: 23.04 RC (23.03.90) Tagging and Release
  April 13: 23.04 Tagging
  April 20: 23.04 Release

https://community.kde.org/Schedules/KDE_Gear_23.04_Schedule

Let’s go for my web review for the week 2023-10.


You Are Not a Parrot And a chatbot is not a human. And a linguist named Emily M. Bender is very worried what will happen when we forget this.

Tags: tech, ai, gpt, machine-learning, cognition, linguistics, politics, ecology, ethics

This is an excellent piece. Very nice portrait of Emily M. Bender a really gifted computational linguist and really bad ass if you ask me. She’s out there asking all the difficult questions about the current moment regarding large language models and so far the answers are (I find) disappointing. We collectively seem to be way too fascinated by the shiny new toy and the business opportunities to pay really attention to the impact on the social fabric of all of this.

https://nymag.com/intelligencer/article/ai-artificial-intelligence-chatbots-emily-m-bender.html


Did You Miss My Comment or What? Understanding Toxicity in Open Source Discussions

Tags: tech, sociology, foss, github

Early days for this type of research so a couple of limitations to keep in mind while reading this paper. Most notably: rather small sample explored (it’s a qualitative study) and tends to conflate GitHub with “the Open Source community”. The later especially matters since the vibe can be very different outside of GitHub. That being said, very interesting findings in there. Some validate my experience with GitHub. It’s clear that compared to other spaces there’s much more entitlement behavior from some people. Interestingly the words seem on average less violent (although it does happen of course) than in other platforms… still this is important to keep in check since it could have implication toward prospective contributors. The last point in their discussion section is promising. Some of the current manual interventions from maintainers seem to have good results (encouraging) and it seems possible to at least semi-automate the handling of toxic comments which could help with maintainers well-being.

https://cmustrudel.github.io/papers/osstoxicity22.pdf


diziet | Never use git submodules

Tags: tech, git, tools

I tend to agree with this quite a lot. Git submodules tend to create lots of strange issues and rather bad developer experience. Even worse it’s not necessarily spotted straight away, you notice the real pains only after having invested in it quite a bit. There are alternatives worth exploring though.

https://diziet.dreamwidth.org/14666.html


Safety and Soundness in Rust

Tags: tech, rust, safety

People tend to be fixated on the “unsafe” keyword and assuming not using it will make their code devoid of memory safety bugs. Well, it’s a bit more subtle than this. It helps you know where such bugs can hide but it can’t completely prevent them all the way down the stack.

https://jacko.io/safety_and_soundness.html


Indices point between elements - Made of Bugs

Tags: tech, programming

Neat way to think about array indices, if it was widespread it would simplify a few things in documentations I think.

https://blog.nelhage.com/2015/08/indices-point-between-elements/


A discussion between Casey Muratori and Robert C. Martin about Clean Code

Tags: tech, architecture, performance, craftsmanship

Very interesting conversation between Uncle Bob and one of the recent critics of his work regarding performance. I like how he admits some faults in the way he presents things and try to improve for later rather than trying to be right. Some people should learn from that. There’s clearly a tension between performance and what is described in Clean Code, it’d be pointless to deny it.

https://github.com/unclebob/cmuratori-discussion/blob/main/cleancodeqa.md


An Alternative to Dependency Injection Frameworks – Software the Hard way

Tags: tech, architecture, complexity, java

Indeed, in some type of projects people tend to turn to Dependency Injection Frameworks a bit blindly (especially true in the Java world). Still there are other patterns which give similar benefits without less headaches. That’s worth investigating if this fits your context before picking up a framework.

https://software.rajivprab.com/2018/11/06/an-alternative-to-dependency-injection-frameworks/


Why You Should Send a Weekly Summary Email | by Jens-Fabian Goetzmann | Feb, 2023 | Medium

Tags: tech, organization, team, note-taking

The advice is sound. Having more written records of such things definitely help teams. It can have a benefit in other forms (notes or todo’s) if you do it just for you.

https://jefago.medium.com/why-you-should-send-a-weekly-summary-email-1c556149ed42


How to hire engineering talent without the BS · Jesal Gadhia

Tags: tech, hr, interviews

Hiring and interview isn’t simple. There are good advises in this piece. In particular I strongly agree with the fact that leet coding is probably not it and that having something guided and scripted it necessary.

https://jes.al/2023/03/how-to-hire-engineering-talent-without-the-bs/


Want an unfair advantage in your tech career? Consume content meant for other roles

Tags: tech, management, empathy, culture, team, learning

This is definitely a worthy advice with lots of interesting side effects. For me the main motive beyond cheer curiosity is developing more empathy towards others with different roles.

https://matthewgrohman.substack.com/p/want-an-unfair-advantage-in-your


The Lost Art of Lacing Cable - The Broadcast Bridge - Connecting IT to Broadcast

Tags: tech, networking, history, culture

Fascinating old school way to manage cables. And indeed the result looks pretty as well.

https://www.thebroadcastbridge.com/content/entry/12400/the-lost-art-of-lacing-cable



Bye for now!

Thursday, 9 March 2023

There has been some recent discussions about how KDE applications (or Qt apps in general) should look and feel like outside of the Plasma desktop, particularly in a GNOME environment.

During this discussion I noticed two major disconnects between the involved parties. One of them is technical in nature, where (understandably) not everyone involved has deep knowledge about how Qt and KDE apps work. The other one is cultural in nature, where there’s opposing views about who gets to decide how an application should look and feel like on a given platform.

I can’t do much about the cultural issue, but I can help the conversation by giving some much needed overview of how any of this works on a technical level. Everyone being on the same page technically could help foster a more productive conversation about this complex topic.

First of all it’s important to note that Qt to its core is an abstraction across various plaforms (most important here are Linux, Windows, and macOS, but also to some degree Android and iOS). Whenever possible Qt tries to use the platform’s native facilities to do anything, whether that’s rendering, file dialogs, widget styles etc. This becomes somewhat messy when you consider that “Linux” isn’t exactly a single, well-defined “platform”. Qt does usually have non-native fallbacks for things like file dialogs and widget styles, but they aren’t necessarily something you want a user to have to see. It’s also important to mention that Qt has two somewhat competing ways of defining UIs, the traditional QtWidgets, and the more recent QtQuick/QML.

There are several somewhat independent pieces involved in how a Qt application looks and feels. Jan Grulich already talked about some of them in the context of GNOME and QGnomePlatform, but there are also things specific to KDE applications that aren’t mentioned.

The first piece is the “Qt Platform Theme (QPT)”. Despite the name it doesn’t have much to do with the visual style. It is responsible for applying settings from the platforms. This for example includes font settings, the double click interval, or whether a file should be openend on single or double click. It also defines how standard dialogs look like, most importantly the file picker dialog, but also dialogs like a color picker. Third, it defines the color palette (QPalette) the application is using. More on that later. Qt itself ships platform themes for non-Linux platforms as well as somewhat generic Linux platform themes for GNOME and Plasma. Notable out-of-tree plugin exist, like plasma-integration which you are using right now if you are on Plasma, the aforementioned QGnomePlatform targeted towards GNOME (and to some degree similar environments), and qt5ct, which isn’t aligned to a specific environment and provides generic control over platformtheme things.

The second, and perhaps most well-known, knob is the widgets style (also called QStyle). It controls the majority of the appearance of a QtWidgets application. Well-known examples include Breeze (the current Plasma default), Oxygen (the KDE4-default), adwaita-qt, as well as built-in styles for Windows/macOS. Qt also comes with a built-in Fusion style. QStyles are implemented using C++ plugins. Whenever the app needs to render some piece of UI, e.g. a button, it defers that to the style plugin. Some style, like e.g. Windows then use platform native APIs to render widgets, others like Breeze draw the widgets from scratch. Application developers can also include custom styles for complete control over the appearance.

The third important concept is QPalette. A QPalette is a set of colors used to draw UI elements. The palette is defined by the platform theme(!). For example Plasma uses this to apply the color scheme set in System Settings. QGnomePlatform uses it to apply Adwaita-like colors. The selected QStyle may (or may not!) use this palette when drawing controls. The application developer can also manually query colors from the palette for drawing custom widgets while still respecting the platform’s wanted colors. A platform theme may only offer a single palette this way, or include light and dark variants, or allow the user to configure arbitrary color sets (like we do on Plasma). It is also possible for application developers to override the system-provided palette, for example to offer an in-app dark mode switch.

For applications using QML there is another relevant component: The Qt Quick Controls 2 Style. For reasons I’m not going to go into QtQuick Controls don’t use QStyle for their styling. Instead they come with their own stying system, which is itself based on QML. In Qt5 QML apps only have a very basic and broken default theme that should never be used. In Qt6 they use Fusion by default.

These are the relevant knobs every Qt app has. Some app developers choose to use them to control the appearance of their apps themselves, but many others leave it to the environment to apply a suitable look and feel. Furthermore, there are some relevant KDE-additions to this that are important to understand.

One such addition is KColorScheme. You can think of KColorScheme as a superset of QPalette, i.e. it provides additonal color roles and thus finer-grained control over colors. When changing the Colors setting in Plasma’s System Settings you are picking a color scheme. This gets applied to QPalette via the plasma-integration QPT, but can also be queried directly by the application developer for custom painting. Contrary to QPalette a KColorScheme is not porgrammatically filled based on plaform values (that happens only on Plasma), but it is a static, textual list of colors. Here we have the first problem for running KDE applications under e.g. GNOME. When running a KDE app on GNOME QGnomePlatform will apply Adwaita colors using QPalette. However, this does not affect colors the application directly pulls from KColorScheme, which unless explicitly configured has a default that resembles Breeze. This means we get mixtures of two different color sets, giving unpleasant results. This is especially noticeable when using a dark system theme combined with the light default colors from KColorScheme.

How do we solve this? Well, I’ve been banging my head against that problem for a while. Short of removing the concept of KColorScheme entirely I see two realistic options, not necessarily mutually exclusive. QGnomePlatform could create a KColorScheme definition with Adwaita-like colors and apply that to the application. If exuted correctly it would likely give very good results, but obviously only on platforms that use QGnomePlatform. The other option would be to programmatically derive a KColorScheme definition from a QPalette, which is likely much harder because KColorScheme is a superset of QPalette, but it would be a generic solution for all platforms.

The second noteworthy thing for KDE applications affects QML apps in particular. I’ve mentioned that QML has a separate theming system compared to QtWidgets. Because maintaining two style definitions for different systems is no joy KDE maintains a “hack” around this. qqc2-desktop-style implements a Qt Quick Controls style that fetches style information from a QStyle, which means all the existing QStyles out there keep working for QML apps. It works amazingly well, until it doesn’t. One of the shortcomings of this approach is that qqc2-desktop-style internally heavily relies on KColorScheme, which makes the aforementioned mismatch between QPalette and KColorScheme much more prominent. Possible solutions are the same as mentioned before.

I hope this gives some much needed overview over technology and terminology of involved components and helps with a productive way forward with addressing the problems we have. You are welcome to join this discussion. There’s some other relevant things to talk about, like icon loading, theming, and rendering, but that’s for another day.

Wednesday, 8 March 2023

Call for proposal ends Thursday the 30th of March


There's still a few weeks, but time is really running out.

 

I'm sure there's lots of interesting things you have to talk about Qt, KDE, C++, Community Management or other million things so head over to https://akademy.kde.org/2023/cfp/ or over to https://conf.kde.org/event/5/abstracts/ if you want to skip the nicely worded page that encourages you to submit a talk :)