GNU bug report logs - #49972
[PATCH] gnu: xdg-desktop-portal-gtk: Update to 1.8.0.

Previous Next

Package: guix-patches;

Reported by: Andrew Whatson <whatson <at> gmail.com>

Date: Tue, 10 Aug 2021 04:52:02 UTC

Severity: normal

Tags: patch

Done: John Kehayias <john.kehayias <at> protonmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49972 in the body.
You can then email your comments to 49972 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49972; Package guix-patches. (Tue, 10 Aug 2021 04:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Whatson <whatson <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 10 Aug 2021 04:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrew Whatson <whatson <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Andrew Whatson <whatson <at> gmail.com>
Subject: [PATCH] gnu: xdg-desktop-portal-gtk: Update to 1.8.0.
Date: Tue, 10 Aug 2021 14:51:34 +1000
* gnu/packages/freedesktop.scm (xdg-desktop-portal-gtk): Update to
1.8.0.
---
 gnu/packages/freedesktop.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 693a79c738..9f6810472b 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -2349,7 +2349,7 @@ and others.")
 (define-public xdg-desktop-portal-gtk
   (package
     (name "xdg-desktop-portal-gtk")
-    (version "1.7.1")
+    (version "1.8.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -2358,7 +2358,7 @@ and others.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "183iha9dxmvprn99ymgz17jx1lyn1fj5jyj6ghxl716zn9mxmird"))))
+                "0987fwsdgkcd3mh3scvg2kyg4ay1rr5w16js4pl3pavw9yhl9lbi"))))
     (build-system glib-or-gtk-build-system)
     (arguments
      `(#:phases
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49972; Package guix-patches. (Tue, 10 Aug 2021 16:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 49972 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: "49972 <at> debbugs.gnu.org" <49972 <at> debbugs.gnu.org>
Subject: Re: [PATCH] gnu: xdg-desktop-portal-gtk: Update to 1.8.0.
Date: Tue, 10 Aug 2021 16:34:20 +0000
Hi Andrew,

Thanks for the package update. There was actually just a discussion on IRC about using xdg-desktop-portal (and -gtk). It came up that it would be helpful to add to the description a note about this needing to be used as a dbus-service, with perhaps a short code snippet for the user. A few other packages do this, but I think it would be helpful to make this more widespread.

As it is, the description of xdg-desktop-portal does mention dbus but I think could be clearer. For this package, could be clearer that this is a backend to be used with xdg-desktop-portal (doesn't make sense on its own correct?). So, you would want to add this to a dbus service with xdg-desktop-portal.

Sorry if this is out of scope on this patch thread, but does this package work for you? When I try using this with xdg-desktop-portal with dbus, there are messages about not finding e.g. the OpenURI handler when links are clicked in Flatpak apps. Is there more configuration or package changes needed on Guix to make this work?

Thanks,
John




Information forwarded to guix-patches <at> gnu.org:
bug#49972; Package guix-patches. (Thu, 12 Aug 2021 10:32:01 GMT) Full text and rfc822 format available.

Message #11 received at 49972 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Whatson <whatson <at> gmail.com>
To: John Kehayias <john.kehayias <at> protonmail.com>
Cc: 49972 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: xdg-desktop-portal-gtk: Update to 1.8.0.
Date: Thu, 12 Aug 2021 20:30:43 +1000
Hi John,

This package works for me as-is, just installing flatpak,
xdg-desktop-portal, xdg-desktop-portal-gtk, and the patched p11-kit
from #49957.  I think flatpak launches the dbus services on-demand, so
no additional setup is needed.  The errors about the missing OpenURI
handler are fixed by this update; seeing that a version bump fixed the
problem, I haven't investigated further.

With these patches I'm successfully running Teams and Discord via
flatpak with no problems.

Cheers,
Andrew




Information forwarded to guix-patches <at> gnu.org:
bug#49972; Package guix-patches. (Thu, 12 Aug 2021 19:19:01 GMT) Full text and rfc822 format available.

Message #14 received at 49972 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Andrew Whatson <whatson <at> gmail.com>
Cc: 49972 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: xdg-desktop-portal-gtk: Update to 1.8.0.
Date: Thu, 12 Aug 2021 19:18:40 +0000
Hi Andrew,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Thursday, August 12th, 2021 at 6:30 AM, Andrew Whatson wrote:

> Hi John,
>
> This package works for me as-is, just installing flatpak,
>
> xdg-desktop-portal, xdg-desktop-portal-gtk, and the patched p11-kit
>
> from #49957. I think flatpak launches the dbus services on-demand, so
>
> no additional setup is needed.

Ah, thanks for that, I was confused over the dbus aspect. You are right, just having them installed lets them get launched by flatpak applications.

> The errors about the missing OpenURI
>
> handler are fixed by this update; seeing that a version bump fixed the
>
> problem, I haven't investigated further.
>

Hmm, I didn't notice a change between the versions here. In fact, I am still getting an error that the OpenURI handler is not provided, despite seeing it provided if I launch the portal manually with --verbose. (I didn't try the change to p11-kit as I haven't run into those errors.)

> With these patches I'm successfully running Teams and Discord via
>
> flatpak with no problems.
>

Good to know!

I don't mean to derail the patch discussion, but did finally get the OpenURI handler to work, but in an unexpected way: if I launch xdg-desktop-portal manually and with --replace. Then it works. Perhaps some difference in environment variables or something if it is launched via dbus? The only large factor I can think of is that I'm not in a DE but just a WM (but have e.g. xdg-open working).

Would appreciate any further tips or bits of your setup, but seems like this is on my end and not with the package maybe. Or else needing some configuration when not in Gnome or similar.

Thanks!
John




Information forwarded to guix-patches <at> gnu.org:
bug#49972; Package guix-patches. (Fri, 13 Aug 2021 10:39:02 GMT) Full text and rfc822 format available.

Message #17 received at 49972 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Whatson <whatson <at> gmail.com>
To: John Kehayias <john.kehayias <at> protonmail.com>
Cc: 49972 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: xdg-desktop-portal-gtk: Update to 1.8.0.
Date: Fri, 13 Aug 2021 20:38:24 +1000
Hi John,

Yes I'm using the default gnome-desktop-service, perhaps your setup is
missing something provided by that.  The only thing I can recommend
(and maybe you're already doing this) is to launch your apps like
this:

  flatpak run --log-session-bus --log-system-bus --log-ally-bus com.foo.barapp

This gives some extra debug information from flatpak and the app,
which might help diagnose the problem.

Good luck!
Andrew

On Fri, 13 Aug 2021 at 05:18, John Kehayias
<john.kehayias <at> protonmail.com> wrote:
>
> Hi Andrew,
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>
> On Thursday, August 12th, 2021 at 6:30 AM, Andrew Whatson wrote:
>
> > Hi John,
> >
> > This package works for me as-is, just installing flatpak,
> >
> > xdg-desktop-portal, xdg-desktop-portal-gtk, and the patched p11-kit
> >
> > from #49957. I think flatpak launches the dbus services on-demand, so
> >
> > no additional setup is needed.
>
> Ah, thanks for that, I was confused over the dbus aspect. You are right, just having them installed lets them get launched by flatpak applications.
>
> > The errors about the missing OpenURI
> >
> > handler are fixed by this update; seeing that a version bump fixed the
> >
> > problem, I haven't investigated further.
> >
>
> Hmm, I didn't notice a change between the versions here. In fact, I am still getting an error that the OpenURI handler is not provided, despite seeing it provided if I launch the portal manually with --verbose. (I didn't try the change to p11-kit as I haven't run into those errors.)
>
> > With these patches I'm successfully running Teams and Discord via
> >
> > flatpak with no problems.
> >
>
> Good to know!
>
> I don't mean to derail the patch discussion, but did finally get the OpenURI handler to work, but in an unexpected way: if I launch xdg-desktop-portal manually and with --replace. Then it works. Perhaps some difference in environment variables or something if it is launched via dbus? The only large factor I can think of is that I'm not in a DE but just a WM (but have e.g. xdg-open working).
>
> Would appreciate any further tips or bits of your setup, but seems like this is on my end and not with the package maybe. Or else needing some configuration when not in Gnome or similar.
>
> Thanks!
> John




Information forwarded to guix-patches <at> gnu.org:
bug#49972; Package guix-patches. (Tue, 17 Aug 2021 02:37:01 GMT) Full text and rfc822 format available.

Message #20 received at 49972 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Andrew Whatson <whatson <at> gmail.com>
Cc: 49972 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: xdg-desktop-portal-gtk: Update to 1.8.0.
Date: Tue, 17 Aug 2021 02:35:47 +0000
Hi Andrew,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Friday, August 13th, 2021 at 6:38 AM, Andrew Whatson wrote:

> Hi John,
>
> Yes I'm using the default gnome-desktop-service, perhaps your setup is
>
> missing something provided by that. The only thing I can recommend
>
> (and maybe you're already doing this) is to launch your apps like
>
> this:
>
> flatpak run --log-session-bus --log-system-bus --log-ally-bus com.foo.barapp
>
> This gives some extra debug information from flatpak and the app,
>
> which might help diagnose the problem.
>

I finally figured it out! It was quite a ride of diving into dbus, strace, ... in the end, the answer was right in front of me from xdg-desktop-portal --verbose output. XDG_DESKTOP_PORTAL_DIR needs to just be a single directory. Both this package and xdg-desktop-portal will add (the same directory) to this variable, and it chokes on that. Why that means some interfaces are registered but not others, I don't know. The output isn't clear as it will list the variable value as where it is loading from, but no follow-up that it did load portals.

So, I think upstream should support this environment variable having multiple entries, not that I think it is really needed, but should handle it (or error gracefully). Practically though, we only need it set once. I'll file a bug upstream.

Should we just have it in xdg-desktop-portal? The gtk, and other backends, would really only make sense used with xdg-desktop-portal if I understand correctly. So as long as their portals go in the same place, that should be fine. In my case, with this and xdg-desktop-portal installed, XDG_DESKTOP_PORTAL_DIR had the same entry twice, something like /path/to/profile/share/xdg-desktop-portal/portals

If you agree, we should update both the gtk and wayland package definitions to not have this search path set. And perhaps a note in the description that these backends are meant to be used with the main portal (and the main portal needs at least one to work? not sure).

Thanks!

John




Information forwarded to guix-patches <at> gnu.org:
bug#49972; Package guix-patches. (Mon, 25 Oct 2021 19:40:02 GMT) Full text and rfc822 format available.

Message #23 received at 49972 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Andrew Whatson <whatson <at> gmail.com>
Cc: 49972 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: xdg-desktop-portal-gtk: Update to 1.8.0.
Date: Mon, 25 Oct 2021 19:39:08 +0000
Updated to 1.10.0 as part of https://issues.guix.gnu.org/51100

Note that I also propagated xdg-desktop-portal as this fixes the bug I mentioned earlier in this thread. I didn't see a response from upstream about better handling of XDG_DESKTOP_PORTAL_DIR but exporting it only once in our packages fixes the problem.




Reply sent to John Kehayias <john.kehayias <at> protonmail.com>:
You have taken responsibility. (Mon, 25 Oct 2021 19:42:02 GMT) Full text and rfc822 format available.

Notification sent to Andrew Whatson <whatson <at> gmail.com>:
bug acknowledged by developer. (Mon, 25 Oct 2021 19:42:02 GMT) Full text and rfc822 format available.

Message #28 received at 49972-done <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: "49972-done <at> debbugs.gnu.org" <49972-done <at> debbugs.gnu.org>,
 Andrew Whatson <whatson <at> gmail.com>
Subject: Re: [PATCH] gnu: xdg-desktop-portal-gtk: Update to 1.8.0.
Date: Mon, 25 Oct 2021 19:41:19 +0000
Empty Message




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 23 Nov 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.