Bug 509413 - Add support for X11 or Wayland Session selection in desktop files, similar to DE in OnlyShowIn and NotShowIn
Summary: Add support for X11 or Wayland Session selection in desktop files, similar to...
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasmashell
Classification: Plasma
Component: Session Management (other bugs)
Version First Reported In: 6.4.4
Platform: Other Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: X11-only
Depends on:
Blocks:
 
Reported: 2025-09-12 12:16 UTC by Ajrat Makhmutov
Modified: 2025-09-16 22:30 UTC (History)
3 users (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 Ajrat Makhmutov 2025-09-12 12:16:23 UTC
Some apps don't work on X11, but they work on Wayland. Some are the opposite.
For example: xkill.
I suggest adding session indication support to OnlyShowIn and NotShowIn.
For example: OnlyShowIn=KDE;GNOME;X11; - will mean that the application supports GNOME and KDE in the X11 session.

If I understood correctly, then for this we need to edit the "`std::optional<AutostartEntry> AutostartModel::loadDesktopEntry(const QString &fileName)`" function in the https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/autostart/autostartmodel.cpp?ref_type=heads#L54.
Comment 1 TraceyC 2025-09-16 15:26:37 UTC
I see the value in this, so I'll pass along the request to the developers. Changing this to wishlist, since it's asking for a feature to be implemented.

There is a low chance of this happening, however, due to the plans to deprecate X11 in the long run. If there's a lot of development work to achieve this, it's likely not going to get implemented, since X11 will no longer be a thing in Plasma in the future.
Comment 2 Nate Graham 2025-09-16 22:30:52 UTC
We could add a special KDE-specific key for this, but I think it would be better to work upstream and add it to the .desktop file spec first. If that gets done, I could see us potentially adding support for it.

However I'm not sure the provided example makes sense; xkill is a command-line program without a .desktop file. .desktop files belong to GUI apps, and GUI apps typically aren't specific to X11 or Wayland. As such, the utility of this seem low, and I would anticipate similar objections to any attempt to add a thing to the spec.