Still not fixed for me.

$ kreadconfig5 --file kdeglobals --group General --key BrowserApplication
firefox.desktop

$ xdg-settings check default-web-browser firefox.desktop
/usr/bin/xdg-settings: 734: [: x!: unexpected operator
no

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to xdg-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1970594

Title:
  "xdg-settings check default-web-browser something.desktop" fails in
  Kubuntu 22.04: Bad substitution

Status in Xdg-utils:
  New
Status in xdg-utils package in Ubuntu:
  Fix Released
Status in xdg-utils source package in Jammy:
  Fix Released

Bug description:
  [Impact]

  The firefox snap (default in 22.04) will always report that it thinks
  it's not the default browser (even when it actually is) for KDE users
  (this can be seen when browsing to about:preferences).

  This is caused by an upstream bug in xdg-utils (using bashisms in KDE-
  specific functions whereas the default interpreter is dash).

  The fix is rather trivial and will visibly improve the UX for those
  users.

  
  [Test Plan]

  In Kubuntu 22.04:
   - make sure firefox isn't your default browser (by changing the setting to a 
different browser)
   - run the firefox snap, browse to "about:preferences", and observe that 
firefox claims NOT to be the default browser
   - click the "Set default" button
   - refresh the page (F5)
   - observe that now firefox claims to be the default browser
   - in a terminal, execute `xdg-open https://example.org`, and verify that the 
page is open in the firefox snap

  [Where problems could occur]

  The patch is changing KDE-specific functions (check_browser_kde and
  check_url_scheme_handler_kde), so in theory it shouldn't affect
  running xdg-utils in any other desktop environment.

  If the proposed patch is incorrect, it would affect the functionality
  of `xdg-settings check default-web-browser` and `xdg-settings check
  default-url-scheme-handler`, so this is what needs to be thoroughly
  tested in KDE.

  In the event of a regression, these functions wouldn't work as
  expected (they already don't, so the user wouldn't observe a
  functional regression, merely the absence of a fix).

  
  [Original description]

  I'm reporting this issue from stock Ubuntu, but the problem is
  observed only in Kubuntu (can be reliably reproduced in a Kubuntu
  22.04 VM). The version of xdg-utils is identical.

  This problem was initially reported on the snapcraft forum:
  https://forum.snapcraft.io/t/firefox-wont-set-as-my-default-
  browser/29708.

      $ xdg-settings check default-web-browser firefox_firefox.desktop
      /usr/bin/xdg-settings: 734: Bad substitution

  The offending line is:

      if [ x"!" == x"${browser:0:1}" ]; then

  If I modify /usr/bin/xdg-settings in place to set the interpreter to
  /bin/bash on the first line of the script, the problem goes away.

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: xdg-utils 1.1.3-4.1ubuntu1
  ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
  Uname: Linux 5.15.0-27-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu82
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Apr 27 11:21:31 2022
  InstallationDate: Installed on 2020-09-16 (587 days ago)
  InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Alpha amd64 (20200910)
  PackageArchitecture: all
  SourcePackage: xdg-utils
  UpgradeStatus: Upgraded to jammy on 2022-03-19 (38 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/xdg-utils/+bug/1970594/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to