[mantic] xdg-desktop-portals no longer working in default Lubuntu after xdg-desktop-portal 1.17.1

Bug #2036098 reported by Jeremy Bícha
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
lubuntu-default-settings (Ubuntu)
Fix Released
Critical
Simon Quigley
lxqt-session (Ubuntu)
Fix Released
Critical
Simon Quigley
plasma-discover (Ubuntu)
Fix Released
Medium
Simon Quigley
xdg-desktop-portal-lxqt (Ubuntu)
Fix Released
Medium
Simon Quigley

Bug Description

The XDG Desktop Portals are no longer working in Lubuntu after xdg-desktop-portal was updated to 1.17.2-1ubuntu1

Similar issues were fixed in Ubuntu Desktop by updating gnome-session and in Kubuntu by updating xdg-desktop-portal-kde, but it looks like this one will be harder to completely fix. I believe the other default Ubuntu desktops are not affected since they use xdg-desktop-portal-gtk (which is special-cased) or use KDE Plasma.

Test Case
---------
Open Firefox (a Snap app)
Press Ctrl+O to open a file or Ctrl+S to save a webpage
The file chooser should show

Other Info
----------
- Lubuntu ships xdg-desktop-portal-lxqt but this is not packaged in Debian.
- Lubuntu also ships xdg-desktop-portal-kde because plasma-discover-backend-snap and plasma-discover-backend-flatpak both depend on xdg-desktop-portal-kde without any alternative dependency. Debian does not have this dependency but Ubuntu does.
- When I installed the older xdg-desktop-portal on Lubuntu and rebooted, I got the file chooser back but I believe it is actually being provided by xdg-desktop-portal-kde not xdg-desktop-portal-lxqt, in part because older xdg-desktop-portal used a simplistic alphabetical order system for choosing a portal. (However, uninstalling xdg-desktop-portal-kde and the 2 plasma-discover backends does still result in a working portal so this must be xdg-desktop-portal-lxqt).

Further Reading
---------------
https://lists.debian.org/debian-devel/2023/08/msg00311.html

https://github.com/flatpak/xdg-desktop-portal/blob/main/doc/portals-conf.rst

Attempts to Fix
---------------
I have been unable to find a way to get xdg-desktop-portal-kde to start automatically in the LXQt session. If I start it manually, it still isn't used to provide the Firefox file chooser.

Things that didn't work:
- Uninstall xdg-desktop-portal-lxqt

- Add a /usr/share/xdg-desktop-portals/lxqt-portals.conf copied from xdg-desktop-portal-kde with this contents:
[preferred]
default=kde

- Remove the UseIn=KDE line from /usr/share/xdg-desktop-portals/portals/kde.portal
-- Or substitute UseIn=LXQt

- Manually start the KDE portal.
systemctl --user start plasma-xdg-desktop-portal-kde.service
With xdg-desktop-portal 1.16, it started automatically. And xdg-desktop-portal needs to use D-Bus to start this service automatically.

- xdg-desktop-portal-lxqt doesn't actually provide a systemd user service but it does provide the D-Bus service

Suggested Initial Workaround
----------------------------
Have Lubuntu install xdg-desktop-portal-gtk

xdg-desktop-portal 1.17.2-1ubuntu1 has a hard-code workaround to use the GTK portal if no other portal is preferred.

The Firefox file chooser isn't the usual LXQt file chooser but at least it works. Also, it's the same file chooser GTK3 apps use.

Jeremy Bícha (jbicha)
description: updated
description: updated
description: updated
Jeremy Bícha (jbicha)
description: updated
Jeremy Bícha (jbicha)
description: updated
Jeremy Bícha (jbicha)
description: updated
Revision history for this message
Simon McVittie (smcv) wrote (last edit ):

> - Add a /usr/share/xdg-desktop-portals/lxqt-portals.conf copied from xdg-desktop-portal-kde with this contents:
> [preferred]
> default=kde

If the KDE portal is the one you want, then this looks one character off from being correct: it should be /usr/share/xdg-desktop-portal/lxqt-portals.conf (no "s" on xdg-desktop-portal).

Some things to check:

Run xdg-desktop-portal as "/usr/libexec/xdg-desktop-portal --verbose --replace" and it will show you more of what it's thinking. If it works when run from a shell but not when run from D-Bus activation, try editing its D-Bus and systemd service files to add --verbose, then read the systemd Journal.

Check that XDG_CURRENT_DESKTOP, DISPLAY, and XAUTHORITY if used are set, and are in the D-Bus and systemd activation environments. GNOME (and I think maybe also Plasma) explicitly uploads XDG_CURRENT_DESKTOP into the activation environments, but LXQt probably relies on the display manager to pick it up from DesktopNames. You might need https://salsa.debian.org/utopia-team/dbus/-/commit/711681dbde53e475f2ce8e01b10db0742a233fbf or dbus-x11, to make Xsession.d upload XDG_CURRENT_DESKTOP.

To check: systemctl --user show-environment, and perl -pe 's/\0/\n/g' /proc/$(pgrep -f xdg-desktop-portal | head -n1)/environ

> Lubuntu ships xdg-desktop-portal-lxqt but this is not packaged in Debian

There's an ITP, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1051790. If you want to use the KDE and LXQt portals (in some order), use default=kde;lxqt; or the other way round, or look at gnome-portals.conf for a less trivial example.

Please upstream any portal configuration that is added to Lubuntu. Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050804, not yet opened upstream (I couldn't work out which component in LXQt should be responsible for infrastructure like this).

https://gitlab.xfce.org/xfce/xfce4-session/-/issues/181 was the equivalent in XFCE and might be a good starting point for an upstream LXQt request.

[edited: perl -pe 's/\0/\n/' should have been perl -pe 's/\0/\n/g']

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Lubuntu developers, please add this line to /usr/share/xsessions/Lubuntu.desktop (to match lxde.desktop)

DesktopNames=LXQt

This will enable the environment variable XDG_CURRENT_DESKTOP to be set to LXQt

affects: xdg-desktop-portal-lxqt (Ubuntu) → lubuntu-default-settings (Ubuntu)
Revision history for this message
Jeremy Bícha (jbicha) wrote (last edit ):

Comment #2 is the only thing required to fix Lubuntu 23.10, but a future version of xdg-desktop-portal will also require this to be done (that future version won't happen for Ubuntu 23.10).

Please have something (maybe xdg-desktop-portal-lxqt would work, like how xdg-desktop-portal-kde does it)

install this file

/usr/share/xdg-desktop-portals/lxqt-portal.conf with this content:
[preferred]
default=lxqt

Revision history for this message
Jeremy Bícha (jbicha) wrote :

A nice benefit of the new xdg-desktop-portal (once #2 is fixed) is that xdg-desktop-portal-kde is no longer running by default in Lubuntu 23.10 and the LXQt desktop portal is being used instead.

It still may be a nice cleanup to have the Plasma Discover backends depend on
xdg-desktop-portal-kde | xdg-desktop-portal-backend
which hopefully will be enough to have germinate install your backend instead of the kde backend.

You will also need to add this to the Package paragraph in debian/control for xdg-desktop-portal-lxqt
Provides: xdg-desktop-portal-backend

xdg-desktop-portal-backend is a virtual package that is supposed to be provided by all the backends

Revision history for this message
Simon McVittie (smcv) wrote :

> DesktopNames=LXQt

Or maybe even "DesktopNames=Lubuntu;LXQt;" which would allow having Lubuntu-specific configuration that doesn't affect upstream LXQt if you want that, similar to how Ubuntu's customized GNOME session works.

> /usr/share/xdg-desktop-portals/lxqt-portal.conf with this content

That should be "/usr/share/xdg-desktop-portal/lxqt-portals.conf". (Look at the filename used in gnome-session, and follow the same pattern.)

> default=lxqt

It looks as though x-d-p-lxqt only implements org.freedesktop.impl.portal.FileChooser. If you want to use a different backend for the other interfaces (perhaps x-d-p-kde or x-d-p-gtk) then you need to configure it in this file: unlike 1.16.x, x-d-p 1.17.x does not automatically fall back to whichever portal backend happens to be first in alphabetical order.

For instance you might use default=lxqt;kde; or default=lxqt;gtk; or something like that, or see portals.conf(5) or the gnome-session-common package for examples of more elaborate configuration.

There's a list of portal implementation interfaces here: https://docs.flatpak.org/en/latest/portal-api-reference.html (the ones containing ".impl."). The documentation is hosted on flatpak.org but this particular part of it should be equally true for Snap.

> maybe xdg-desktop-portal-lxqt would work, like how xdg-desktop-portal-kde does it

I think it makes more sense to ship lxqt-portals.conf in the same core LXQt package that ships lxqt-mimeapps.list, or would ship lxqt-mimeapps.list if it existed. Having xdg-desktop-portal-kde provide this file seems odd to me: that's blurring the distinction between the information that is controlled by the portal backend, and the information that is controlled by the desktop environment.

Equivalents in other desktops: GNOME puts gnome-portals.conf in gnome-session-common; XFCE is going to have xfce-portals.conf in xfce4-session; and MATE is going to have mate-portals.conf in mate-desktop.

Revision history for this message
Simon Quigley (tsimonq2) wrote :

Both of you are amazing, thank you so much!

I'll start uploading. :)

Changed in lubuntu-default-settings (Ubuntu):
assignee: nobody → Simon Quigley (tsimonq2)
Revision history for this message
Jeremy Bícha (jbicha) wrote :

The Ubuntu session sets DesktopNames to ubuntu:GNOME with a colon.

Yeah, I agree that it sounds better to put the lxde-portals.conf file in maybe something like the lxqt-session package.

I think if you set the DesktopName to include Lubuntu, you could have a lubuntu-portals.conf file shipped by lubuntu-default-settings.

Revision history for this message
Simon McVittie (smcv) wrote (last edit ):

> I think if you set the DesktopName to include Lubuntu, you could have a lubuntu-portals.conf file shipped by lubuntu-default-settings

Yes, if you want Lubuntu-specific settings, then the way to do that would be DesktopNames=Lubuntu;LXQt;, which would mean that if lubuntu-portals.conf exists, it is used in preference to a lxqt-portals.conf in the same directory.

[edited: should be DesktopNames, plural]

Revision history for this message
Simon McVittie (smcv) wrote :

> The Ubuntu session sets DesktopNames to ubuntu:GNOME with a colon.

Are you sure? Be careful: the list separator in .desktop files is a semicolon, but the list separator in the XDG_CURRENT_DESKTOP environment variable is a colon.

I'm not running Ubuntu, but what I see in Debian is that GNOME variants like Budgie and GNOME Flashback set DesktopNames to a semicolon-separated list (trailing semicolon is optional but recommended) like DesktopNames=Budgie;GNOME or DesktopNames=GNOME-Flashback;GNOME;.

The result of setting DesktopNames like that is a colon-separated list (with no trailing colon) in XDG_CURRENT_DESKTOP, like XDG_CURRENT_DESKTOP=Budgie:GNOME or XDG_CURRENT_DESKTOP=GNOME-Flashback:GNOME.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Yes, and I believe it's been set that way for a while and I haven't seen issues from it.

https://salsa.debian.org/gnome-team/gnome-session/-/blob/ubuntu/latest/debian/patches/ubuntu/ubuntu-sessions.patch#L162

But you're right about the desktops you mentioned and even GNOME Classic is using the semicolons:

https://salsa.debian.org/gnome-team/gnome-shell-extensions/-/blob/debian/latest/data/gnome-classic.desktop.in

Revision history for this message
Jeremy Bícha (jbicha) wrote :

We are including the dbus changes. I don't think it is needed for our default Ubuntu desktop flavors but may help people with less common setups.

https://launchpad.net/ubuntu/+source/dbus/1.14.10-1ubuntu1

Revision history for this message
Simon McVittie (smcv) wrote :

> Yes, and I believe it's been set that way for a while and I haven't seen issues from it.

I suspect this might only work because only the display manager is reading DesktopNames, and it doesn't use that information for anything except populating XDG_CURRENT_DESKTOP. So it reads what it thinks is a single desktop name "ubuntu:GNOME", and copies it into XDG_CURRENT_DESKTOP without any escaping or validation, so that when consumers of this information read it back, they see it as two desktop names.

Something like this Python code:

# in the display manager
desktops = keyfile["DesktopNames"].rstrip(";").split(";") # incorrectly ["ubuntu:GNOME"]
environ["XDG_CURRENT_DESKTOP"] = ":".join(desktops)

# in xdg-desktop-portal or any other consumer
desktops = environ["XDG_CURRENT_DESKTOP"].split(":") # correctly ["ubuntu", "GNOME"]

> We are including the dbus changes

Thank you, I should probably look at getting that into Debian 12 as well.

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
https://iso.qa.ubuntu.com/qatracker/reports/bugs/2036098

tags: added: iso-testing
Revision history for this message
Simon Quigley (tsimonq2) wrote :

I have uploaded two fixes for this bug, they should land whenever accepted.

I'd like this to be a Beta blocker, let's see what happens.

Changed in lubuntu-default-settings (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Simon McVittie (smcv) wrote :

> I have uploaded two fixes for this bug, they should land whenever accepted.

As a non-user of Ubuntu, is there a packaging git repo or something where I can review those changes? I'd like to get whatever parts of this are applicable into Debian's LXQt or upstream LXQt too.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lubuntu-default-settings - 23.10.2

---------------
lubuntu-default-settings (23.10.2) mantic; urgency=high

  * Make XDG portals happier (LP: #2036098).

 -- Simon Quigley <email address hidden> Wed, 20 Sep 2023 22:39:15 -0500

Changed in lubuntu-default-settings (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Chris Guiver (guiverc) wrote (last edit ):

Lubuntu mantic daily (beta respin) 2023-09-22 is still impacted.

Both live sessions (http://iso.qa.ubuntu.com/qatracker/milestones/448/builds/287181/testcases/1303/results/) and post-install for me.

- opening firefox;
- navigating to fridge.ubuntu.com (I have no imagination)
- right-click SAVE AS but no dialog appears.

(2x hp boxes + 1x sony)

When `firefox` was started from a terminal, I'd see the following appear on terminal when I clicked the SAVE AS option

(firefox:4480): Gtk-WARNING **: 02:17:02.694: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.FileChooser” on object at path /org/freedesktop/portal/desktop

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :
Download full text (7.7 KiB)

Sep 22 06:50:39 lubuntu dbus-daemon[1698]: [session uid=1000 pid=1698] Activating via systemd: service name='org.freedesktop.portal.Desktop' unit='xdg-desktop-portal.service' requested by ':1.170' (uid=1000 pid=7686 comm="/snap/firefox/3145/usr/lib/firefox/firefox" label="snap.firefox.firefox (enforce)")
Sep 22 06:50:39 lubuntu systemd[1670]: Starting xdg-desktop-portal.service - Portal service...
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/home/lubuntu/.config/xdg-desktop-portal/lubuntu-portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/home/lubuntu/.config/xdg-desktop-portal/portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/etc/xdg/xdg-Lubuntu/xdg-desktop-portal/lubuntu-portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/etc/xdg/xdg-Lubuntu/xdg-desktop-portal/portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/etc/xdg/xdg-desktop-portal/lubuntu-portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/etc/xdg/xdg-desktop-portal/portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/etc/xdg-desktop-portal/lubuntu-portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/etc/xdg-desktop-portal/portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/home/lubuntu/.local/share/xdg-desktop-portal/lubuntu-portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/home/lubuntu/.local/share/xdg-desktop-portal/portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/usr/share/Lubuntu/xdg-desktop-portal/lubuntu-portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/usr/share/Lubuntu/xdg-desktop-portal/portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/usr/local/share/xdg-desktop-portal/lubuntu-portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/usr/local/share/xdg-desktop-portal/portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/usr/share/xdg-desktop-portal/lubuntu-portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/usr/share/xdg-desktop-portal/portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/var/lib/snapd/desktop/xdg-desktop-portal/lubuntu-portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/var/lib/snapd/desktop/xdg-desktop-portal/portals.conf'
Sep 22 06:50:39 lubuntu xdg-desktop-portal[8799]: XDP: Looking for portals configuration in '/usr/share/xdg-desktop-portal/lubuntu-portals.conf'
Sep 22...

Read more...

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote (last edit ):

The problem appears to have been the "DesktopNames=Lubuntu;LXQt;" line in /usr/share/xdg-desktop-portal/lxqt-portals.conf. "Lubuntu;" looks like it was causing XDG_CURRENT_DESKTOP to become "Lubuntu" in the xdg-desktop-portal process and breaking the portal.

A workaround for now is to run "sudo killall xdg-desktop-portal" after logging in - this fixes the issue for the current session (as confirmed by me and guiverc doing a ton of debugging). (sudo may be unnecessary in this command, but we didn't test without it.) Once xdg-desktop-portal is forced to restart, it picks up the right XDG_CURRENT_DESKTOP and things work. IMO this is enough for the beta to be unblocked - we have a one-liner that fixes it and we can fix this before final release by fixing the lxqt-portals.conf file.

Revision history for this message
Chris Guiver (guiverc) wrote (last edit ):

rebooted & attempted what was Aaron documented in #19, alas no SAVE_AS dialog appeared in firefox.

I rebooted live session & what I got to work is

- sudo vim /usr/share/xsessions/Lubuntu.desktop and remove Lubuntu; (from DesktopNames)
- logout/login again... then perform `sudo killall xdg-desktop-portal`
- no SAVE_AS dialog appears when firefox opens.

(We did the vim edit earlier; i think that is a required step Aaron maybe implied in first paragraph, but I missed when I read it for test)

One one boot (of last two) I didn't need to perform the `killall xdg-desktop-portal` too? unless I spaced out command thus it wasn't in my history.
Anyway I rebooted & repeated these steps in test; they worked for me.

Revision history for this message
Simon McVittie (smcv) wrote (last edit ):

> 1. Firefox is trying to call org.freedesktop.portal.FileChooser. The provided "method" in xdg (is that what you call it, a method?) is org.freedesktop.impl.portal.FileChooser. Dunno if the .impl missing in one of those means anything.

Those dotted names are interfaces, not methods.

The fact that there are two interfaces with/without .impl is an xdg-desktop-portal thing. The way it works is that the sandboxed application talks to the interface *without* .impl, which is provided by the desktop-agnostic xdg-desktop-portal service. x-d-p uses portals.conf(5) to choose an appropriate desktop-specific *backend*, like perhaps x-d-p-gtk or x-d-p-lxqt, which provides the version of the interface *with* .impl.

For some interfaces like FileChooser the version with/without .impl are very similar, but for other interfaces it isn't an obvious 1:1 mapping.

> 2. Running "/usr/libexec/xdg-desktop-portal --verbose --replace" in a terminal fixes the problem while that command is left running. The problem immediately resurfaces when the process is terminated.

That probably means that the variable $XDG_CURRENT_DESKTOP is set correctly in your terminal, but incorrectly in the activation environment. When you are in the bad state, what is $XDG_CURRENT_DESKTOP in your shell, and what is it in `systemctl show-environment`?

Revision history for this message
Simon McVittie (smcv) wrote :

The change in https://launchpad.net/ubuntu/+source/lubuntu-default-settings/23.10.2 looks correct to me, but incomplete. Someone, somewhere, also needs to be installing lubuntu-portals.conf and/or lxqt-portals.conf. Can you point me to where that change took place?

> The problem appears to have been the "DesktopNames=Lubuntu;LXQt;" line in /usr/share/xdg-desktop-portal/lxqt-portals.conf.

Are you sure you mean that? I would expect to see DesktopNames in /usr/share/xsessions/*.desktop, as shown in https://launchpadlibrarian.net/688333989/lubuntu-default-settings_23.10.1_23.10.2.diff.gz, but I would not expect to see any DesktopNames in /usr/share/xdg-desktop-portal/*-portals.conf.

> "Lubuntu;" looks like it was causing XDG_CURRENT_DESKTOP to become "Lubuntu" in the xdg-desktop-portal process and breaking the portal.

If that's the case, then a straightforward short-term workaround would be to either set "DesktopNames=LXQt;" (only), or copy lxqt-portals.conf to lubuntu-portals.conf. I think either of those would be a better and more reliable workaround than restarting xdg-desktop-portal at arbitrary times.

For a longer-term solution, if that behaviour is what is happening, then that would indicate that there is something in desktop startup (display manager? session manager?) that is not converting DesktopNames into XDG_CURRENT_DESKTOP correctly. The fact that you can work around this by restarting x-d-p might indicate that there are two components that "fight", with one of them doing it correctly (taking the whole list), and the other doing it wrong (taking only the first element of the list).

The semantics I expect are that DesktopNames=Foo;Bar;Baz; becomes XDG_CURRENT_DESKTOP=Foo:Bar:Baz, which x-d-p interprets as "use foo-portals.conf or bar-portals.conf or baz-portals.conf or portals.conf, in that order". In other desktop variants, things like Ubuntu's customized GNOME session rely on this behaviour.

Revision history for this message
Simon McVittie (smcv) wrote :

Ah, I see https://launchpad.net/ubuntu/+source/lxqt-session/1.3.0-0ubuntu2 is the other half of this.

https://launchpadlibrarian.net/688335880/lxqt-session_1.3.0-0ubuntu1_1.3.0-0ubuntu2.diff.gz looks correct to me, **if** the only thing you want xdg-desktop-portal for is the FileChooser - but I would have expected that you would want other portal interfaces to work too.

If you do want other interfaces to work, then "default=lxqt;gtk;" might be more appropriate.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

@smcv Apologies, I did state a wrong filename on accident earlier (it was past midnight my time and I was really tired).

I'm sure the final solution isn't going to be a random "kill things and it works". Ubuntu has a mandatory Beta milestone that this bug has been threatening, but it's oftentimes acceptable for a beta to be released with known issues if there are documented workarounds or the issue isn't that bad. So the killall stunt would probably not be OK for the final release, but probably would be OK for getting the beta out the door. Then we have the period between the beta and the final to do things the right way.

DesktopNames=Lubuntu;LXQt turned into XDG_CURRENT_DESKTOP=Lubuntu in the activation environment (though the shell had XDG_CURRENT_DESKTOP=LXQt). Not sure what happened there but it broke things. As guiverc documented, fixing the file and then killall'ing xdg-desktop-portal seems to fix the issue, so the hope is that once the fixed file is being shipped with the live ISO, xdg-desktop-portal will just work without having to be killall'd.

(Also, thank you for that perl command in comment #1 - that was a lifesaver. It was finally what told us the env variable was getting messed up from xdg-desktop-portal's perspective.)

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Also, I believe the only thing Lubuntu needs the portal for is the file chooser. Lubuntu is still X11-based, so it doesn't need a Wayland-compatible screenshot/screencast helper. (Unless Lubuntu migrated to using Wayfire while I was gone, in which case yeah, it might need that.)

Simon Quigley (tsimonq2)
Changed in lubuntu-default-settings (Ubuntu):
status: Fix Released → Fix Committed
Changed in plasma-discover (Ubuntu):
assignee: nobody → Simon Quigley (tsimonq2)
importance: Undecided → Medium
status: New → In Progress
Simon Quigley (tsimonq2)
Changed in lxqt-session (Ubuntu):
status: New → In Progress
status: In Progress → Fix Released
importance: Undecided → Critical
assignee: nobody → Simon Quigley (tsimonq2)
Changed in xdg-desktop-portal-lxqt (Ubuntu):
assignee: nobody → Simon Quigley (tsimonq2)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Jeremy Bícha (jbicha) wrote :

There are many more portals than the file chooser. Sandboxed Snap and Flatpak apps need to be able to use the portals regardless of whether they are being run in Wayland. Also, I have seen apps distributed as .deb's use portals.

https://flatpak.github.io/xdg-desktop-portal/

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Whatever changes we made fixed the FileChooser, so that's great.

We probably need to fallback to kde since lxqt (even upstream) only implements that one interface. So that means we should probably do "default=lxqt;kde;" in our portal.conf.

Here's a weird quirk, though: I can't open files from within Firefox. Curiously, it complains about there being no OpenURI interface, but Kubuntu, which offers both the gtk and kde portals, neither of which implement that interface, works fine.

Seems to me that's a bigger problem than not being able to save the page.

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Also: it fails with the kde fallback.

Here's what I did (using the 20230922.1 Lubuntu ISO):

 1. Edited /usr/share/xdg-desktop-portal/lxqt-portals.conf, changing the "default" key to "lxqt;kde;"
 2. Ran `/usr/libexec/xdg-desktop-portal --verbose --replace` in terminal
 3. Ran Firefox in a separate tab in terminal
 4. Pointed Firefox at https://git.lubuntu.me/Lubuntu/artwork/src/branch/ubuntu/mantic/src/usr/share/lubuntu/wallpapers/2310-mantic-minotaur.png and clicked the download button

What happens:

 * no additional windows open
 * no feedback from Firefox, either in terminal or graphically
 * the following from the xdg-desktop-portal tab:
   XDP: document portal returned empty doc id for path '/home/lubuntu/Downloads/2310-mantic-minotaur(4).png'
   XDP: OpenFile: translating path value '/home/lubuntu/Downloads/2310-mantic-minotaur(4).png' to host path '/home/lubuntu/Downloads/2310-mantic-minotaur(4).png'
   XDP: Content type for file /home/lubuntu/Downloads/2310-mantic-minotaur(4).png: image/png
   XDP: Default handler lximage-qt for file, image/png
   XDP: Recommended handlers for file, image/png: display-im6.q16, lximage-qt, firefox_firefox
   XDP: Found in permission store: handler: (null), count: 0 / 3, always ask: 0
   XDP: (null)
   XDP: Opening app chooser

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Looks like lxqt-session 1.3.0-0ubuntu3 is in unapproved. It fixes the above problem by:
 1. seeding xdg-desktop-portal-gtk
 2. setting "default=lxqt;kde;gtk;"

What I find curious is that the app chooser provided is the gtk one, not the kde one.

FWIW, the output from XDP is the same as above.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-desktop-portal-lxqt - 0.4.0-0ubuntu2

---------------
xdg-desktop-portal-lxqt (0.4.0-0ubuntu2) mantic; urgency=medium

  * Add a Provides for xdg-desktop-portal-backend (LP: #2036098).

 -- Simon Quigley <email address hidden> Fri, 22 Sep 2023 11:51:42 -0500

Changed in xdg-desktop-portal-lxqt (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package plasma-discover - 5.27.8-0ubuntu2

---------------
plasma-discover (5.27.8-0ubuntu2) mantic; urgency=medium

  * Allow an alternative XDG portal after KDE's (LP: #2036098).

 -- Simon Quigley <email address hidden> Fri, 22 Sep 2023 11:45:31 -0500

Changed in plasma-discover (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Chris Guiver (guiverc) wrote :

I tested for this issue on Lubuntu mantic 2023-09-23 (daily) and could NOT re-create problem

test was LIVE session only, VM on dell [optiplex] 7050 (i5-6500, 16gb, intel hd530/i915, amd cedar radeon) with my mantic host os.

Revision history for this message
Chris Guiver (guiverc) wrote :

Another live Lubuntu mantic test (2023-10-03) & I could not re-create this issue;

hardware test on

hp prodesk 400 g1 sff (i5-4570, 8gb, amd/ati cedar radeon hd 5000/6000/7350/8350)

Changed in lubuntu-default-settings (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.