Bug 473968 - Preference to launch app on Xwayland is ignored at session restoration
Summary: Preference to launch app on Xwayland is ignored at session restoration
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Session Management (show other bugs)
Version: 5.27.7
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2023-08-31 00:14 UTC by Andrew Shark
Modified: 2025-01-09 22:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Shark 2023-08-31 00:14:11 UTC
For the apps that you launch in XWayland, the session restoration launches them as native Wayland apps.

I am using Qt Creator, and it has some graphical glitches on Wayland (dialog windows shown with transparent areas until resized manually or moved to another screen). I have edited the launcher to use X11.
Now, when I reboot, the app is restored, but it is launched natively on Wayland.

STEPS TO REPRODUCE
1. My `System Settings | Desktop Session | On login, launch apps that were open` is set to `On last logout`.
2. Install Qt Creator. Edit the application with right click, in the Application tab add the `QT_QPA_PLATFORM=xcb` variable.
3. Open Qt Creator.
4. Reboot.
5. Log in to the Plasma Wayland session.
6. The Qt Creator is auto launched.

OBSERVED RESULT
It is launched natively on wayland platform. 

EXPECTED RESULT
The restoration should respect the user preference to launch the app with xcb platform.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Graphics Platform: Wayland
Qt Creator: 11.0.1 (Based on Qt 6.5.2)

ADDITIONAL INFORMATION
As a workaround, I can add it to the Ignored applications in the System Settings.
Comment 1 Nate Graham 2023-08-31 15:01:14 UTC
Apps restored via session management aren't being launched normally such that their desktop files are run; they're doing a special thing using the X11 session restore protocols. I'm not sure there's a clean way to fix this.