[PATCH] gnu: xdg-desktop-portal-gtk: Update to 1.8.0.

  • Done
  • quality assurance status badge
Details
2 participants
  • John Kehayias
  • Andrew Whatson
Owner
unassigned
Submitted by
Andrew Whatson
Severity
normal
A
A
Andrew Whatson wrote on 10 Aug 2021 06:51
(address . guix-patches@gnu.org)(name . Andrew Whatson)(address . whatson@gmail.com)
20210810045134.27435-1-whatson@gmail.com
* 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(-)

Toggle diff (24 lines)
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
J
J
John Kehayias wrote on 10 Aug 2021 18:34
(name . 49972@debbugs.gnu.org)(address . 49972@debbugs.gnu.org)
PyOwaQzBqSij34E9nmqMVxdBYloBLOhZD5StxzsW-Q8W9re4hFoYIVgiW2YZb7PhrVIIcPSVP1NbZWFia_S5M6cwHHOn_mobBXJCnTP-wTU=@protonmail.com
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
A
A
Andrew Whatson wrote on 12 Aug 2021 12:30
(name . John Kehayias)(address . john.kehayias@protonmail.com)(address . 49972@debbugs.gnu.org)
CAPE069c4DHFHCwuJPwQR9iO5EpvAAAQvs=x_jkmVQ7rxX9-_mA@mail.gmail.com
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
J
J
John Kehayias wrote on 12 Aug 2021 21:18
(name . Andrew Whatson)(address . whatson@gmail.com)(address . 49972@debbugs.gnu.org)
JphfNAyrR39pkie7UlFVciKTuQPn3yWdg-zURu0mgkL8qrBucUfJELlqumurHQNjtJPl1yiSDg0GIXLu_6BgcC_UP3DDbvrGgw9MdOhQvIA=@protonmail.com
Hi Andrew,

??????? Original Message ???????

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

Toggle quote (10 lines)
> 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.

Toggle quote (7 lines)
> 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.)

Toggle quote (5 lines)
> 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
A
A
Andrew Whatson wrote on 13 Aug 2021 12:38
(name . John Kehayias)(address . john.kehayias@protonmail.com)(address . 49972@debbugs.gnu.org)
CAPE069fq7jkMXoX33FUPZg7GiwEfUWRYv-XGF=6oOwoSQ239yw@mail.gmail.com
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@protonmail.com> wrote:
Toggle quote (41 lines)
>
> 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
J
J
John Kehayias wrote on 17 Aug 2021 04:35
(name . Andrew Whatson)(address . whatson@gmail.com)(address . 49972@debbugs.gnu.org)
nYDumQAVV1qsUhZhB2UVCk7U-Ne68XqfJBF29-fvtFJee2uA5gaWjLbcFx6lKBdK2xBKw9_9IAdWWRitydNlvIch3iE9i23lSKy8TGmZUFs=@protonmail.com
Hi Andrew,

??????? Original Message ???????

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

Toggle quote (17 lines)
> 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
J
J
John Kehayias wrote on 25 Oct 2021 21:39
(name . Andrew Whatson)(address . whatson@gmail.com)(address . 49972@debbugs.gnu.org)
q8drVnmoKilA3MdHmzNNiRAiS7VmJJIobCgJLk6mnbhmAM8_KvO3u1i4qBs65Av48OPbhZ0qHvdIE5LCY6tJamr2sKU46RTgsqxMi19APek=@protonmail.com
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.
J
J
John Kehayias wrote on 25 Oct 2021 21:41
IlHAebbX0SJ63OcPxyDzkHhG3VmY1OWTJfwy3Vi71bNOBwmAr1C31zY6XzS6f6q1hPl6WKf8u-j92n2DpcbxfUkL_RGOJgoW1paSvNPZIVU=@protonmail.com
Empty Message
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49972@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49972
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch