Public bug reported: In Kubuntu 26.04 LTS, if you boot from a live ISO and click "Try Kubuntu", you get what looks like a fully functional Plasma session. However, if you try to use a tool that requires an XDG desktop portal that only xdg-desktop-portal-kde provides, such as a remote desktop agent for sharing your live session with someone else, the application will fail in various ways (error messages in logs and silent failure are common symptoms). As it turns out, xdg-desktop-portal-kde is not being started or used; `systemctl --user status plasma-xdg-desktop-portal- kde.service` will report that the service is inactive, while `systemctl --user status xdg-desktop-portal.service` will show that lots of things are falling back to the GTK desktop portal. A real-world application that breaks because of this is Zoho Assist, but the "screen capture" button in KDE's XDG portal test (https://invent.kde.org/libraries/xdg- portal-test-kde) can also be used.
Steps to reproduce: 1. Boot a Kubuntu 26.04 LTS ISO in a VM with at least 8 GB RAM. 2. Run `sudo apt install cmake build-essential extra-cmake-modules libgstreamer1.0-dev wayland-protocols qt6-base-dev libkf6i18n-dev libkf6kio-dev libkf6notifications-dev libkf6windowsystem-dev` to install the dependencies of the XDG portal test linked above. (NOTE: This list might be incomplete.) 3. Clone the portal test: `git clone https://invent.kde.org/libraries/xdg-portal-test-kde.git` 4. Build it: `cd xdg-portal-test-kde && mkdir build && cd build && cmake .. && make` 5. Run it: `bin/xdg-portal-test-kde` 6. Click the screen recording button (don't remember what it's called now as I'm not looking at the window) Expected result: A window pops up asking you which screen or window you would like to "share". Actual result: An error message is printed in the console about the Screencast portal not being available, and no screen sharing window appears. The reason this happens appears to be that xdg-desktop-portal.service starts *before* Plasma when using the kubuntu-live-environment session. The environment loaded into the systemd user manager at that point doesn't tell xdg-desktop-portal that it is running under a KDE-based desktop, so xdg-desktop-portal falls back to the GTK portal instead. Restarting `xdg-desktop-portal.service` after Plasma has fully started fixes this; something that gets triggered by `startplasma-wayland` is most likely loading more environment variables into the systemd user manager, so once `xdg-desktop-portal.service` is restarted, it sees that it's running under a KDE-based desktop and picks the right portal provider. I haven't been able to find a particularly clean way of fixing this, but one working solution is to adjust the `start-kubuntu-live-env` script to drop a file at `$HOME/.config/autostart/portal-fix.desktop` that runs `systemctl --user restart xdg-desktop-portal.service`. This gets executed after Plasma starts, and fixes the portal. ** Affects: kubuntu-installer-prompt (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2164684 Title: xdg-desktop-portal-kde isn't being used in the live session To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/kubuntu-installer-prompt/+bug/2164684/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
