Default Applications > Web Browser is non-functional

Bug #1946920 reported by Stephan Sokolow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
plasma-desktop (Ubuntu)
Undecided
Unassigned

Bug Description

Description: Ubuntu 20.04.3 LTS
Release: 20.04

plasma-desktop:
  Installed: 4:5.18.5-0ubuntu0.1
  Candidate: 4:5.18.5-0ubuntu0.1
  Version table:
 *** 4:5.18.5-0ubuntu0.1 500
        500 http://ca.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     4:5.18.4.1-0ubuntu1 500
        500 http://ca.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

No matter what I set Default Applications > Web Browser to in System Settings, it reverts to the screenshotted state upon being reopened and has no apparent effect.

This has led to a dysfunctional desktop where I have to leave my desired browser open and either take advantage of "Copy URL" or an application's built-in support for overriding the system-default HTTP opener because:

1. `xdg-open` delegates to kde-open5, which doesn't understand that I only want Konqueror as a file manager and I'm still rooting around, trying to figure out which `.desktop` file is telling the desktop that Konqueror is a valid HTTP or HTML handler so I can delete it and `chattr +i` so the desktop only sees Konqueror as a more featureful alternative to Dolphin.

(That's also why, if Launchpad records the submitting browser, it'll show Konqueror. I couldn't figure out how to forcibly override the browser `ubuntu-bug` uses.)

2. `xdg-desktop-portal-kde` decided that the Flatpak version of `xdg-open` should open URLs from `org.mozilla.Thunderbird` in `com.github.Eloston.UngoogledChromium`, even though I don't think I've *ever* asked for anything but `org.mozilla.firefox` through it. (I've blanked out the `MimeType` line in both my `/home/ssokolow/.local/share/applications/com.github.Eloston.UngoogledChromium.desktop` and `/var/lib/flatpak/exports/share/applications/com.github.Eloston.UngoogledChromium.desktop` but I can't remember how to trigger a regeneration of the relevant cache to see if it worked without restarting my desktop sesson.)

3. The File Associations KCM is set to prefer Firefox for HTML, and gVim is higher in the priority order than Ungoogled Chromium, and Konqueror was below either before I removed it from the list of associations for HTML entirely, but Default Applications doesn't appear to be forcing "in an application based on the contents of the URL" (which I wouldn't want anyway), which makes that ineffective.

4. I've manually edited the `~/.local/share/mime*.*` files to ensure the PCManFM-made selections of Firefox are complete for both the HTML filetypes and the `x-scheme-handler` lines, but KDE clearly still hasn't switched to the XDG-standardized approach to specifying file associations, let alone scheme handlers.

5. Because the browsers I actually use are all Flatpak'd for extra sandboxing, the Debian alternatives system can't see Firefox or Ungoogled Chromium, but it chooses a leftover copy of `xlinks2` for `x-www-browser` over Konqueror anyway. (I *could* remove xlinks2, but it currently serves as confirmation that nothing's actually *used* `x-www-browser` since I stopped using Skype years ago.)

6. Because of how KDE loves to move so much functionality into daemons like kded (ostensibly so that, if part of your desktop crashes, it's impossible to restore correct function without restarting the whole session), `strace kde-open5` didn't turn up anything useful.

Given what an imposing maze the KDE codebase is and how this is probably already fixed on KDE upstream (we'll see when 22.04 LTS comes out), it's getting to the point where I'm considering patching the problem by writing an LD_PRELOAD hack to formalize and generalize the the bash+kdialog script I set as a `.zip` handler so I get a "Did you want MComix instead? Yes/No" prompt when Firefox's Downloads pane tries to open a file with a `.cbz` extension using Ark. (i.e. Just hook the `exec*` family of libc functions and have a `.toml` file that defines which subprocess invocations to rewrite unless a special environment variable is set. It can't be as crashy as that old "give GTK apps KDE Open/Save dialogs" KGtk `LD_PRELOAD` hack was and I can just look at the `gtk3-nocsd` package for the recommended way to install a system-wide LD_PRELOAD hack.)

I've attached this to the `plasma-desktop` package, because that's what dpkg says kcm_componentchooser is provided by.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: plasma-desktop 4:5.18.5-0ubuntu0.1
ProcVersionSignature: Ubuntu 5.11.0-37.41~20.04.2-generic 5.11.22
Uname: Linux 5.11.0-37-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.20
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Wed Oct 13 02:21:12 2021
SourcePackage: plasma-desktop
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Stephan Sokolow (ssokolow) wrote :
Revision history for this message
Stephan Sokolow (ssokolow) wrote :

I haven't managed to fix the GUI, but I did manage to fix the rest of the dysfunction by manually editing `mimeapps.list` and running `kbuildsycoca5`.

My best guess is that, when the value in lines like `x-scheme-handler/http=firefox.desktop;` doesn't exist, KDE synthesizes a fallback chain, and kde-open5 and xdg-desktop-portal-kde disagreed on the ordering of the synthesized fallback chain.

The GUI still resets to like in the screenshot though.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers