How you can help drive Flatpak adoption

What happens in Discover in when an app is available from multiple sources–say, Flathub as well as your distro’s packages?

As long as both versions of the app provide the same AppStream ID, Discover will show a single entry and let you choose which one you want to install, like this:

But if any of the available versions use a different AppStream ID, they’ll show up separately:

Uuurgh, how awful. Which GIMP is the real GIMP? And why do they all have different names?! Flathub uses org.gimp.GIMP as the AppStream ID, while The GIMP developers provide gimp.desktop for distros to use as the AppStream ID. And the Snap version provides no AppStream ID, sadly.

So we need the GIMP developers to change their AppStream ID to the same one that Flathub uses (which actually follows the AppStream spec). I submitted a patch to fix it that was recently accepted, so this should be resolved with the next GIMP release. That will unify the first two, but the third–which comes from Snap–won’t get rolled up into it until Snap uses AppStream IDs. The Snap folks are on the case, but it’s still a work in progress.

But adopting AppStream only work as long as developers are populating their AppStream files with valid IDs! An AppStream ID is supposed to look like com.myurl.NameOfMyApp, not NameOfMyApp.desktop or com.myurl.NameOfMyApp.desktop. Flathub gets this right, but a lot of app developers themselves get it wrong, and it’s up to us to help them, and make sure the AppStream IDs in their files match those on Flathub.

I’ve started to submit patches for apps that unify their AppStream IDs:

What can I do to help?

See all those patches I submitted? You can do the same! If you use any apps that have AppStream IDs in their distro packaging that are incorrect and different from what’s in Flathub, then submit a patch to fix it! Keep in mind the following guidelines:

  1. Dashes/hyphens must be replaced with underscores: com.shutter-project.shutter is wrong and should be com.shutter_project.shutter
  2. Leading digits in the app name are not allowed: com.wildfiregames.0ad is wrong and should be com.wildfiregames._0ad
  3. If the AppStream ID used for Flathub is wrong, don’t replicate that wrongness with your patches; encourage developers to use correct AppStream IDs and file a bug for the app on Flathub, like this one.

For extra credit, you can also submit patches that add information, too. This will make the app’s version string show up in Discover:

And here’s the properly formatted information in HexChat’s AppStream file that provides it: https://github.com/hexchat/hexchat/blob/master/data/misc/io.github.Hexchat.appdata.xml.in#L29

I know this isn’t the most immediately rewarding work, but it’s super important to make Flatpak (and later Snap) work properly in a mixed environment where you also have distro packages available. If you want the world to be Snappier or more Flatpacked, this is probably the easiest way to make it happen if you’re not a programmer or a packager. If you need a hand, you can email flatpak@lists.freedesktop.org or check out the #flatpak IRC channel on freenode.org.

As always, if you find this work useful or valuable, please consider becoming a KDE contributor or donating to KDE! But do consider submitting patches for Apps that have sparse or incorrect AppStream data. You’ll be doing your part to pull Linux software distribution into the future.release

Flatpak support in Discover

People often ask about the state of Flatpak in Discover, so today I’m going to write about that. Thew good news is that Discover’s Flatpak support is very good and getting better all the time. It’s fully production ready and we encourage you to use it!

To download Flatpak apps in Discover, you need to have the Flatpak backend installed. In many distros, it’s a separate package that doesn’t come installed by default. In Ubuntu-based distros, you can install it by running sudo apt install plasma-discover-flatpak-backend. in Discover 5.12, you’ll even be able to install different backends from within Discover itself, by searching for “Flatpak” or “Snap”. If you want faster Flatpak adoption, please petition your distros to install the Flatpak backend by default!

Once the Flatpak backend is installed, you need to add at least one Flatpak repo. Distros can provision this with default entries, but most don’t. Bug your distro if you want a better experience here! Until then, you can go to Discover’s Settings page and click the “Add Flathub” button to add Flathub as a source. After that, you can access Flatpak apps by browsing or searching through the app lists as normal. You can also go to the settings page and click on the Flatpak entry, which will show you just the Flatpak apps from that repo:

You can add multiple Flatpak repos; to do so, go to the Settings page, click the Hamburger menu button next to the text “Flatpak”, and click “Add Source…” Then enter the URL of the Flatpak repo you want to add. Discover also handles this properly when you click on a repo URL in your web browser.

Multiple Flatpak repos enable users to effortlessly switch between stable and up-to-date versions of apps, each version provided by a different repo. Right now, we’re generally stuck with one or the other, according to our distro’s packaging policy: Arch and other rolling distros say that you always get the latest version; Debian and Ubuntu and other stable release distros say that you always get a specific version that’s frozen in time. Sometimes that’s not right for you, because maybe the latest version has a bad bug, or an old stable version is missing features you want that were implemented in a later version.

Flatpak liberates us from this. You could add Flathub (https://flathub.org/repo/flathub.flatpakrepo) and also KDE’s nightly testing repo (https://distribute.kde.org/kdeapps.flatpakrepo). Then when you go to install a KDE app that’s present in both, you can choose the source! Maybe you want to live on the bleeding edge, but if you run into an issue, you can easily revert your installation to the stable version. It’s pretty awesome.

If any of this seems cool and useful, please don’t hesitate to join our team or make a donation to KDE. My next post shares some specific things you can do to help push Flatpak adoption, even without being a programmer.

This week in Usability and Productivity

I’d like to highlight some fixes and features that landed in the past week for our Usability and Productivity initiative:

  • Dragging a Firefox tab to the desktop now detaches it properly (KDE bug 337711)
  • Right-clicking on Discover’s icon exposes a new action that allows you to go straight to the Updates page (KDE Phabricator revision D9637)
  • You can now hide the “Comment” field in Dolphin’s Information Panel (KDE bug 365620)
  • Dolphin’s Properties window now has a tab that shows the same file metadata that the Information Panel does, for people who would prefer to access the information that way (KDE bug 384194)
  • Okular’s dialog box for when a PDF wants to be opened full screen is now presented more naturally (KDE bug 388511)
  • Okular can now Print .djvu files (KDE bug 388514)
  • Discover now de-duplicates categories from Flatpak (KDE bug 388313)
  • Discover no longer lets you scroll beyond the boundaries with the PageUp/PageDown keys (KDE bug 388745)
  • Discover app lists are now more compact (KDE Phabricator revision D9833)

These improvements were landed by KDE Developers Kai Uwe Broulik, Albert Astals Cid, Aleix Pol, Michael Heidelbach, and myself. And that’s not all; the entire KDE community has been busy landing many more bugfixes and features too–more than I can keep track of!

I want to especially focus on the last Discover change I mentioned above. After my last post about Discover, we got a lot of user feedback that people wanted greater density and to be able to see more apps at once. We’ve executed on a part of that, and this is now what Discover looks like if you make the window narrow:

I bring this up to highlight that we really do listen to users. Your feedback matters and we hear it! If you enjoy the results of our efforts, please consider becoming a contributor yourself or donating to KDE! In particular, we would love more contributors for our Usability and Productivity initiative. If you’re interested, please feel free to work on any of these bugs. Here are some that should be relatively easy. Happy coding!

Polishing Discover Software Center

KDE Discover Software Center is a key element of our Usability and Productivity initiative because it encompasses the basic experience of discovering, installing, and removing software. Most regular people don’t want to use the command line to do this, and for them, we have Discover.

In the last few weeks, lead developer Aleix Pol has put an enormous amount of work into Discover, fixing bugs and implementing features:

  • Add Flathub button now disappears immediately after adding Flathub (KDE Bug 388294)
  • “Update All” button is now always visible on Updates page even after you scroll down (KDE Bug 384351)
  • Improved search on Updates page (KDE Bug 384463)
  • Fixed a large number of crashes (KDE Bugs 384351, 385040, 378339, and 383413)
  • Major overhaul of the Settings page UI (KDE Bug 388153)
  • Screenshot pop-up now allows navigation (including via keyboard arrow keys) between multiple images (KDE Bugs 387816, 387879, and 387858)
  • Screenshot pop-up margins now always match image size and dimensions (KDE Bug 387819)
  • App description text no longer cut off when window is resized to be very narrow (KDE Bug 388104)

I even got a few patches of my own accepted:

Here are some screenshots of how Discover looks today:

Browse page:

App page:

Settings page:

Installed apps page:

Updates page:

Eagle-eyed readers will notice a few bugs in these screenshots. Those are tracked by the following:

  • Discover’s sidebar is too wide (KDE Bug 385992)
  • Discover sometimes doesn’t de-duplicate categories from Flatpak backend (KDE Bug 388313)
  • Discover’s package update information displays identical information under “Reason:” and “Change Log:” headers on Debian and Ubuntu-based distros (KDE Bug 387041)
  • Dolphin shows the icon for Nautilus rather than its own in Ubuntu-based distros (KDE Bug 388702 for Neon; KDE Phabricator Maniphest Ticket T7717 for Kubuntu)

We’re aware of these issues and are actively working to investigate and resolve them. If you use Discover and find any other issues, please feel free to file a bug.

As always, thank you all for your support. If this work excites you or you find Discover useful, consider becoming a contributor yourself or donating to KDE!

Richer Shadows

KDE’s Visual Design Group recently put some thought into shadows in Breeze. Right now, the default shadows are rather small, and can be almost entirely invisible on the left edge:

We decided to make them larger and deeper by default, and center them horizontally so that there’s a shadow on the left edges of windows and menus as well. I was honored to produce the patch, and I’m happy to report that it’s been accepted and merged! Starting in Plasma 5.12, here’s how shadows will look:

These are just default settings of course; if you don’t like big shadows, you can tweak to your heart’s content (System Settings > Application Style > Window Decorations > [click on the little menu button in the corner of the Breeze entry] > Shadows). But this new default setting provides a much greater sense of depth that I think most users will find quite welcome.

KDE Goal: Usability and Productivity

It’s been an honor to have had the community select my KDE goal: focus on usability and productivity. This is a topic that’s quite dear to my heart, as I’ve always seen a computer for a vehicle for giving substance to your thoughts. Low-quality computer operating systems and software get in your way and knock you out of a state of flow, while high quality versions let you create at the speed of thought. KDE Plasma is already pretty good in this department, but I think we can make it even better–we can turn it into the obvious choice for people who need to get things done.

To make this happen, I’m proposing to focus on the following broad approaches:

  • Make it easier to find, install, launch, update, and remove new software
  • Increase the speed and efficiency with which files and data can be transferred from one program or context to another
  • Write new features that make common operations easier, faster, more efficient, or less frustrating
  • Make common features look and behave identically to make use of users’ pre-existing muscle memory and knowledge of how things work
  • Fix bugs that make important features not work properly or at all
  • Improve the state of laptop touchpad input with libinput, which is rapidly becoming the new standard
  • Fix commonly-complained-about visual design and UX issues

In the past month, KDE contributors (myself included) have implemented the following important improvements–many of them commonly wished for:

  • Improved the default size of the Clock widget’s text (KDE Bug 375969)
  • Worked with the VLC devs to make VLC 3.0 work out of the box for streaming videos over Samba shares on KDE desktops (VLC Bugs 18993 and 18991)
  • Made sections in Dolphin’s Places panel hide-able (KDE Bug 300247)
  • Added a dedicated section for removable devices to open and save dialogs (Phabricator revision D8348)
  • Made Gwenview open Targa Image (.tga) files KDE Bug 332485)
  • Gave Gwenview’s move/copy/link dialog a title that reflects the selected files (Phabricator revision D8409)
  • Got Discover’s screenshot pop-ups navigation buttons that respond to keyboard arrow keys (KDE Bugs 387816, 387858, and 387879)
  • Implemented a Wayland-compatible Redshift-esque Night Color feature (KDE Bug 371494)
  • Restored advanced print options to the Qt print dialog (Qt Bug 54464)

And we’re just getting started! You can find a longer list of the improvements we’re targeting in the coming months and years on the proposal page, and the full list here on our Bugzilla.

How you can help

If you have programming skills, please feel free to work on any of the above bugs. Patches are submitted using Phabricator; additional developer documentation can be found here.

If you’re more visually inclined, please feel free to start giving feedback and input in the KDE Visual Design Group chatroom.

If you’re detail-oriented and like categorizing things, we’re always in dire need of bug screeners and triagers. Every day, KDE receives on average 15-25 new Bugzilla tickets. Many of these are duplicates of existing bug reports. Many have already been fixed. Many are caused by configuration issues on the reporter’s computer. And many are real bug or legitimate feature requests. But without bug screeners to categorize them appropriately, they just all pile up into an intimidating mountain. It’s an important job; the bug lists above could not have been compiled if not for KDE’s bug triagers. Read more about it here!

And finally, financial contributions are very much appreciated, too. KDE’s annual fundraiser is going on right now, so hop on over and donate! Every little bit helps.