Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open link from Flatpak app if the default browser is Flatpak-packaged Chromium #1396

Open
hitomi-nakayama opened this issue Jul 17, 2024 · 1 comment
Labels

Comments

@hitomi-nakayama
Copy link

Operating System

Gentoo (default/linux/amd64/23.0/desktop)

XDG Desktop Portal version

1.18

XDG Desktop Portal version (Other)

No response

Desktop Environment

Other

Desktop Environment (Other)

Hyprland

Expected Behavior

Clicking on a link within a Flatpak app should open the link with my default browser. When I have Flatpak Chromium as my default browser, the link should open in that app.

Current Behavior

Clicking on a link inside of a Flatpak app does nothing.

Trying to run xdg-open inside of a Flatpak container produces the following output:

hitomi@machine ~ $ flatpak run --log-session-bus --command=bash us.zoom.Zoom
[📦 us.zoom.Zoom ~]$ xdg-open https://google.com
C1: -> org.freedesktop.DBus call org.freedesktop.DBus.Hello at /org/freedesktop/DBus
C2: -> org.freedesktop.DBus fake wildcarded AddMatch for org.freedesktop.portal
C3: -> org.freedesktop.DBus fake wildcarded AddMatch for org.mpris.MediaPlayer2.us.zoom.Zoom
C4: -> org.freedesktop.DBus fake wildcarded AddMatch for us.zoom.Zoom
C5: -> org.freedesktop.DBus fake wildcarded AddMatch for org.kde
C6: -> org.freedesktop.DBus fake AddMatch for org.freedesktop.ScreenSaver
C7: -> org.freedesktop.DBus fake GetNameOwner for org.freedesktop.ScreenSaver
C8: -> org.freedesktop.DBus fake ListNames
B1: <- org.freedesktop.DBus return from C1
B2: <- org.freedesktop.DBus signal org.freedesktop.DBus.NameAcquired at /org/freedesktop/DBus
B3: <- org.freedesktop.DBus return from C2
*SKIPPED*
B4: <- org.freedesktop.DBus return from C3
*SKIPPED*
B5: <- org.freedesktop.DBus return from C4
*SKIPPED*
B6: <- org.freedesktop.DBus return from C5
*SKIPPED*
B7: <- org.freedesktop.DBus return from C6
*SKIPPED*
B8: <- org.freedesktop.DBus return error org.freedesktop.DBus.Error.NameHasNoOwner from C7
*SKIPPED*
B9: <- org.freedesktop.DBus return from C8
C9: -> org.freedesktop.DBus fake GetNameOwner for org.freedesktop.DBus
C10: -> org.freedesktop.DBus fake GetNameOwner for org.freedesktop.portal.Desktop
C11: -> org.freedesktop.DBus fake GetNameOwner for org.freedesktop.portal.Documents
C12: -> org.freedesktop.DBus fake GetNameOwner for org.freedesktop.portal.Flatpak
C13: -> org.freedesktop.DBus fake GetNameOwner for org.kde.StatusNotifierWatcher
*SKIPPED*
B10: <- org.freedesktop.DBus return from C9
*SKIPPED*
B11: <- org.freedesktop.DBus return from C10
*SKIPPED*
B12: <- org.freedesktop.DBus return from C11
*SKIPPED*
B13: <- org.freedesktop.DBus return from C12
*SKIPPED*
B14: <- org.freedesktop.DBus return from C13
*SKIPPED*
C14: -> org.freedesktop.portal.Desktop call org.freedesktop.portal.OpenURI.OpenURI at /org/freedesktop/portal/desktop
B291: <- :1.20 return from C14

Steps to Reproduce

  1. Install Chromium through Flatpak.
  2. Set the Flatpak Chromium as your default browser. Run: xdg-settings set default-web-browser org.chromium.Chromium.desktop
  3. Open a different Flatpak app and try to open a link. (The link will not open.)

Anything else we should know?

I have tested the following browsers. Links from Flatpak apps do not correctly open with these browsers:

  • com.google.Chrome 126.0.6478.126-1
  • io.github.ungoogled_software.ungoogled_chromium 126.0.6478.126-1-1
  • org.chromium.Chromium 126.0.6478.126

This issue seems to only affect Chromium browsers packaged with Flatpak. I am able to open links with the Flatpak version of Firefox: org.mozilla.firefox 128.0. I also do not have this issue with the distro's www-client/chromium-126.0.6478.126.

Note: My xdg-desktop-portal and pipewire are compiled with the flatpak USE flag.

@swick
Copy link
Contributor

swick commented Oct 9, 2024

I just tested this. Links from matrix opened in Firefox, then I ran xdg-settings set default-web-browser org.chromium.Chromium.desktop and the links started opening in Chromium.

Is this still an issue for you? Since this seems reproducible only on certain systems, can you narrows this down?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Triage
Development

No branches or pull requests

2 participants