Skip to content

Instantly share code, notes, and snippets.

@probonopd
Last active April 27, 2025 19:14
Show Gist options
  • Save probonopd/9feb7c20257af5dd915e3a9f2d1f2277 to your computer and use it in GitHub Desktop.
Save probonopd/9feb7c20257af5dd915e3a9f2d1f2277 to your computer and use it in GitHub Desktop.
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

For the record, even in the latest Raspberry Pi OS you still can't drag a file from inside a zip file onto the desktop for it to be extracted. So drag-and-drop is still broken for me.

And Qt move() on a window still doesn't work like it does on all other desktop platforms (and the Wayland folks think that is good).

And global menus still don't work (outside of not universally implemented things like qt_extended_surface set_generic_property).


The Wayland project seems to operate like they were starting a greenfield project, whereas at the same time they try to position Wayland as "the X11 successor", which would clearly require a lot of thought about not breaking, or at least providing a smooth upgrade path for, existing software.

In fact, it is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incomprehensible words like "xdg_toplevel" instead).

DO NOT USE A WAYLAND SESSION! Let Wayland not destroy everything and then have other people fix the damage it caused. Or force more Red Hat/Gnome components (glib, Portals, Pipewire) on everyone!

Please add more examples to the list.

Wayland seems to be made by people who do not care for existing software. They assume everyone is happy to either rewrite everything or to just use Gnome on Linux (rather than, say, twm with ROX Filer on NetBSD).

Edit: When I wrote the above, I didn't really realize what Wayland even was, I just noticed that some distributions (like Fedora) started pushing it onto me and things didn't work properly there. Today I realize that you can't "install Wayland", because unlike Xorg, there is not one "Wayland display server" but actually every desktop envrironment has its own. And maybe "the Wayland folks" don't "only care about Gnome", but then, any fix that is done in Gnome's Wayland implementation isn't automatically going to benefit all users of Wayland-based software, and possibly isn't even the implementation "the Wayland folks" would necessarily recommend.

Edit 12/2023: If something wants to replace X11 for desktop computers (such as professional Unix workstations), then it better support all needed features (and key concepts, like windows) for that use case. That people also have displays on their fridge doesn't matter the least bit in that context of discussion. Let's propose the missing Wayland protocols for full X11 feature parity.

Edit 08/2024: "Does Wayland becoming the defacto standard display server for Linux serve to marginalize BSD?" https://fossforce.com/2024/07/the-unintended-consequences-linuxs-wayland-adoption-will-have-on-bsd/

Wayland is broken by design

  • A crash in the window manager takes down all running applications
  • You cannot run applications as root
  • You cannot do a lot of things that you can do in Xorg by design
  • There is not one /usr/bin/wayland display server application that is desktop environment agnostic and is used by everyone (unlike with Xorg)
  • It offloads a lot of work to each and every window manager. As a result, the same basic features get implemented differently in different window managers, with different behaviors and bugs - so what works on desktop environment A does not necessarily work in desktop environment B (e.g., often you hear that something "works in Wayland", even though it only really works on Gnome and KDE, not in all Wayland implementations). This summarizes it very well: https://gitlab.freedesktop.org/wayland/wayland/-/issues/233

Apparently the Wayland project doesn't even want to be "X.org 2.0", and doesn't want to provide a commonly used implementation of a compositor that could be used by everyone: https://gitlab.freedesktop.org/wayland/wayland/-/issues/233. Yet this would imho be required if they want to make it into a worthwile "successor" that would have any chance of ever fixing the many Wayland issues at the core.

Wayland breaks screen recording applications

  • MaartenBaert/ssr#431 ❌ broken since 24 Jan 2016, no resolution ("I guess they use a non-standard GNOME interface for this")
  • https://github.com/mhsabbagh/green-recorder ❌ ("I am no longer interested in working with things like ffmpeg/wayland/GNOME's screencaster or solving the issues related to them or why they don't work")
  • vkohaupt/vokoscreenNG#51 ❌ broken since at least 7 Mar 2020. ("I have now decided that there will be no Wayland support for the time being. Reason, there is no budget for it. Let's see how it looks in a year or two.") - This is the key problem. Wayland breaks everything and then expects others to fix the wreckage it caused on their own expense.
  • obsproject/obs-studio#2471 ❌ broken since at least 7 Mar 2020. ("Wayland is unsupported at this time", "There isn't really something that can just be easily changed. Wayland provides no capture APIs")
  • There is a workaround for OBS Studio that requires a obs-xdg-portal plugin (which is known to be Red Hat/Flatpak-centric, GNOME-centric, "perhaps" works with other desktops)
  • phw/peek#1191 ❌ broken since 14 Jan 2023. Peek, a screen recording tool, has been abandoned by its developerdue to a number of technical challenges, mostly with Gtk and Wayland ("Many of these have to do with how Wayland changed the way applications are being handled")

As of February 2024, screen recording is still broken utterly on Wayland with the vast majority of tools. Proof

Workaround: Find a Wayland compositor that supports the wlr-screencopy-unstable-v1 protocol and use wf-recorder -a. The default compositor in Raspberry Pi OS (Wayfire) does, but the default compositor in Ubuntu doesn't. (That's the worst part of Wayland: Unlike with Xorg, it always depends on the particular Wayand compositor what works and what is broken. Is there even one that supports everything?)

Wayland breaks screen sharing applications

  • jitsi/jitsi-meet#2350 ❌ broken since 3 Jan 2018
  • jitsi/jitsi-meet#6389 ❌ broken since 24 Jan 2016 ("Closing since there is nothing we can do from the Jitsi Meet side.") See? Wayland breaks stuff and leaves application developers helpless and unable to fix the breakage, even if they wanted.

NOTE: As of November 2023, screen sharing in Chromium using Jitsi Meet is still utterly broken, both in Raspberry Pi OS Desktop, and in a KDE Plasma installation, albeit with different behavior. Note that Pipewire, Portals and whatnot are installed, and even with them it does not work.

Wayland breaks automation software

sudo pkg install py37-autokey

This is an X11 application, and as such will not function 100% on 
distributions that default to using Wayland instead of Xorg.

Wayland breaks Gnome-Global-AppMenu (global menus for Gnome)

Wayland broke global menus with KDE platformplugin

Good news: According to this report global menus now work with KDE platformplugin as of 4/2022

Wayland breaks global menus with non-KDE Qt platformplugins

Wayland breaks AppImages that don't ship a special Wayland Qt plugin

  • https://blog.martin-graesslin.com/blog/2018/03/unsetting-qt_qpa_platform-environment-variable-by-default/ ❌ broke AppImages that don't ship a special Wayland Qt plugin. "This affects proprietary applications, FLOSS applications bundled as appimages, FLOSS applications bundled as flatpaks and not distributed by KDE and even the Qt installer itself. In my opinion this is a showstopper for running a Wayland session." However, there is a workaround: "AppImages which ship just the XCB plugin will automatically fallback to running in xwayland mode" (see below).

Wayland breaks Redshift

Update 2023: Some Wayland compositors (such as Wayfire) now support wlr_gamma_control_unstable_v1, see https://github.com/WayfireWM/wayfire/wiki/Tutorial#configuring-wayfire and jonls/redshift#663. Does it work in all Wayland compositors though?

Wayland breaks global hotkeys

Wayland does not work for Xfce?

See below.

Wayland does not work properly on NVidia hardware?

Apparently Wayland relies on nouveau drivers for NVidia hardware. The nouveau driver has been giving unsatisfactory performance since its inception. Even clicking on the application starter icon in Gnome results in a stuttery animation. Only the proprietary NVidia driver results in full performance.

See below.

Update 2024: The situation might slowly be improving. It remains to be seen whether this will work well also for all existing old Nvidia hardware (that works well in Xorg).

Wayland does not work properly on Intel hardware

Wayland prevents GUI applications from running as root

  • https://bugzilla.redhat.com/show_bug.cgi?id=1274451 ❌ broken since 22 Oct 2015 ("No this will only fix sudo for X11 applications. Running GUI code as root is still a bad idea." I absolutely detest it when software tries to prevent me from doing what some developer thinks is "a bad idea" but did not consider my use case, e.g., running truss for debugging on FreeBSD needs to run the application as root. https://bugzilla.mozilla.org/show_bug.cgi?id=1323302 suggests it is not possible: "These sorts of security considerations are very much the way that "the Linux desktop" is going these days".)

Suggested solution

Wayland is biased toward Linux and breaks BSD

  • https://blog.netbsd.org/tnf/entry/wayland_on_netbsd_trials_and ❌ broken since 28 Sep 2020 ("Wayland is written with the assumption of Linux to the extent that every client application tends to #include <linux/input.h> because Wayland's designers didn't see the need to define a OS-neutral way to get mouse button IDs. (...) In general, Wayland is moving away from the modularity, portability, and standardization of the X server. (...) I've decided to take a break from this, since it's a fairly huge undertaking and uphill battle. Right now, X11 combined with a compositor like picom or xcompmgr is the more mature option."

Wayland complicates server-side window decorations

  • https://blog.martin-graesslin.com/blog/2018/01/server-side-decorations-and-wayland/ ❌ FUD since at least 27 January 2018 ("I heard that GNOME is currently trying to lobby for all applications implementing client-side decorations. One of the arguments seems to be that CSD is a must on Wayland. " ... "I’m burnt from it and are not interested in it any more.") Server-side window decorations are what make the title bar and buttons of all windows on a system consistent. They are a must have_ for a consistent system, so that applications written e.g., Gtk will not look entirely alien on e.g., a Qt based desktop, and to enforce that developers cannot place random controls into window titles where they do not belong. Client-side decorations, on the other hand, are destroying uniformity and consistency, put additional burden on application and toolkit developers, and allow e.g., GNOME developers to put random controls (that do not belong there) into window titles (like buttons), hence making it more difficult to achieve a uniform look and feel for all applications regardless of the toolkit being used.

Red Hat employee Matthias Clasen ("I work at the Red Hat Desktop team... I am actually a manager there... the people who do the actual work work for me") expicitly stated "Client-side everything" as a principle, even though the protocol doesn't enforce it: "Fonts, Rendering, Nested Windows, Decorations. "It also gives the design more freedom to use the titlebar space, which is something our designers appreciate" (sic). Source

Wayland breaks windows rasing/activating themselves

Wayland breaks RescueTime

Wayland breaks window managers

Apparently Wayland (at least as implemented in KWin) does not respect EWMH protocols, and breaks other command line tools like wmctrl, xrandr, xprop, etc. Please see the discussion below for details.

Wayland requires JWM, TWM, XDM, IceWM,... to reimplement Xorg-like functionality

  • Screen recording and casting
  • Querying of the mouse position, keyboard LED state, active window position or name, moving windows (xdotool, wmctrl)
  • Global shortcuts
  • System tray
  • Input Method support/editor (IME)
  • Graphical settings management (i.e. tools like xranrd)
  • Fast user switching/multiple graphical sessions
  • Session configuration including but not limited to 1) input devices 2) monitors configuration including refresh rate / resolution / scaling / rotation and power saving 3) global shortcuts
  • HDR/deep color support
  • VRR (variable refresh rate)
  • Disabling input devices (xinput alternative)

As it currently stands minor WMs and DEs do not even intend to support Wayland given the sheer complexity of writing all the code required to support the above features. You do not expect JWM, TWM, XDM or even IceWM developers to implement all the featured outlined in ^1.

Wayland breaks _NET_WM_STATE_SKIP_TASKBAR protocol

  • https://git.521000.bestelectron/electron#33226 ("skipTaskbar has no effect on Wayland. Currently Electron uses _NET_WM_STATE_SKIP_TASKBAR to tell the WM to hide an app from the taskbar, and this works fine on X11 but there's no equivalent mechanism in Wayland." Workarounds are only available for some desktops including GNOME and KDE Plasma.) ❌ broken since March 10, 2022

Wayland breaks NoMachine NX

Wayland breaks xclip

xclip is a command line utility that is designed to run on any system with an X11 implementation. It provides an interface to X selections ("the clipboard"). Apparently Wayland isn't compatible to the X11 clipboard either.

This is another example that the Wayland requires everyone to change components and take on additional work just because Wayland is incompatible to what we had working for all those years.

Wayland breaks SUDO_ASKPASS

Wayland breaks X11 atoms

X11 atoms can be used to store information on windows. For example, a file manager might store the path that the window represents in an X11 atom, so that it (and other applications) can know for which paths there are open file manager windows. Wayland is not compatible to X11 atoms, resulting in all software that relies on them to be broken until specifically ported to Wayland (which, in the case of legacy software, may well be never).

Possible workaround (to be verified): Use the (Qt proprietary?) Extended Surface Wayland protocol casually mentioned in https://blog.broulik.de/2016/10/global-menus-returning/ "which allows you to set (and read?) arbitrary properties on a window". Is it the set_generic_property from https://github.com/qt/qtwayland/blob/dev/src/extensions/surface-extension.xml?

Wayland breaks games

Games are developed for X11. And if you run a game on Wayland, performance is subpar due to things like forced vsync. Only recently, some Wayland implementations (like KDE KWin) let you disable that.

Wayland breaks xdotool

(Details to be added; apparently no 1:1 drop-in replacement available?)

Wayland breaks xkill

xkill (which I use on a regular basis) does not work with Wayland applications.

What is the equivalent for Wayland applications?

Wayland breaks screensavers

Is it true that Wayland also breaks screensavers? https://www.jwz.org/blog/2023/09/wayland-and-screen-savers/

Wayland breaks setting the window position

Other platforms (Windows, Mac, other destop environments) can set the window position on the screen, so all cross-platform toolkits and applications expect to do the same on Wayland, but Wayland can't (doesn't want to) do it.

  • PCSX2/pcsx2#10179 PCX2 (Playstation 2 Emulator) ❌ broken since 2023-10-25 ("Disables Wayland, it's super broken/buggy in basically every scenario. KDE isn't too buggy, GNOME is a complete disaster.")

Wayland breaks color mangement

Apparently color management as of 2023 (well over a decade of Wayland development) is still in the early "thinking" stage, all the while Wayland is already being pushed on people as if it was a "X11 successor".

https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/color-management-model.md

Wayland breaks DRM leasing

According to Valve, "DRM leasing is the process which allows SteamVR to take control of your VR headset's display in order to present low-latency VR content".

Wayland breaks In-home Streaming

Wayland breaks NetWM

Extended Window Manager Hints, a.k.a. NetWM, is an X Window System standard for the communication between window managers and applications

Wayland breaks window icons

Update 6/2024: Looks like this will get unbroken thanks to xdg_toplevel_icon_manager_v1, so that QWindow::setIcon will work again. If, and that's a big if, all compositors will support it. At least KDE is on it.

Wayland breaks drag and drop

Wayland breaks ./windowmanager --replace

  • Many window managers have a --replace argument, but Wayland compositors break this convention.

Wayland breaks Xpra

Xpra is an open-source multi-platform persistent remote display server and client for forwarding applications and desktop screens.

  • Under Xpra a context menu cannot be used: it opens and closes automatically before you can even move the mouse on it. "It's not just GDK, it's the Wayland itself. They decided to break existing applications and expect them to change how they work." (Xpra-org/xpra#4246) ❌ broken since 2024-06-01

Xwayland breaks window resizing

Workarounds

  • Users: Refuse to use Wayland sessions. Uninstall desktop environments/Linux distributions that only ship Wayland sessions. Avoid Wayland-only applications (such as PreSonus Studio One) (potential workaround: run in https://github.com/cage-kiosk/cage)
  • Application developers: Enforce running applications on X11/XWayland (like LibrePCB does as of 11/2023)

Examples of Wayland being forced on users

This is exactly the kind of behavior this gist seeks to prevent.

History

  • 2008: Wayland was started by krh (while at Red Hat)
  • End of 2012: Wayland 1.0
  • Early 2013: GNOME begins Wayland porting

Source: "Where's Wayland?" by Matthias Clasen - Flock 2014

A decade later... Red Hat wants to force Wayland upon everyone, removing support for Xorg

References

@alexis-belmonte
Copy link

I'm appalled by all of this. Wayland is not X11, so don't be astonished to realize that things are going to break if you try to use tools that were developed for a specific display server. If you are not happy with Wayland, just stay on X11 -- it's definitely not going to die, unlike what the gist pretends to say.

@probonopd
Copy link
Author

They're supposed to be provided by portals.

Portals didn't even exist a few years ago. They also don't exist in other desktop operating systems. They should be optional components of an optional sandbox, not something required by the window server.

@probonopd
Copy link
Author

This is the CSD mindset all over again.

Yes, people LIKE CSD. One of the core issues with Wayland philosophy is that they want to force their preferences on everyone, which just doesn't work. Especially if all other desktop platforms (WIndows, Mac,...) can do something that Wayland can't.

@probonopd
Copy link
Author

probonopd commented Nov 5, 2023

Whether you like .desktop files

.desktop files are logic that belongs into (some) desktop environments - not into a display server. E.g., GNUstep and helloDesktop don't use them (for valid reasons).

If Wayland forces me to use .desktop files, that in itself would be reason alone for me not to use Wayland.

In fact, I have a specific list of welcome and unwelcome technologies for the desktop environment I am working on. A window server should be entirely agnostic to what desktop environment is being used and how its inner workings are.

@phrxmd
Copy link

phrxmd commented Nov 5, 2023

Whether you like .desktop files

.desktop files are logic that belongs into (some) desktop environments - not into a display server. E.g., GNUstep and helloDesktop don't use them (for valid reasons).

GNUstep and hello Desktop also don't put app icons in the title bar. So the whole discussion about whether or not to use .desktop files for that is beside the point for them anyway.

@probonopd
Copy link
Author

probonopd commented Nov 5, 2023

helloDesktop uses the window icon in the right-hand corner of the menu bar.

@phrxmd
Copy link

phrxmd commented Nov 5, 2023

helloDesktop uses the window icon in the right-hand corner of the menu bar.

Which makes it part of the desktop. It's even called helloDesktop. helloDesktop seems to consider the XDG desktop spec unwelcome technology. Design decisions have consequences, if the desktop decides not to follow the Freedesktop Cross Desktop Group specs then there's no wonder when something breaks.

@zocker-160
Copy link

zocker-160 commented Nov 5, 2023

This would suck indeed. In my desktop environment, I have done away with .desktop files entirely since they are an atrocity.
It would also mean that Qt functionality that works on all platforms would be broken on Wayland: https://doc.qt.io/qt-5/qwindow.html#setIcon
And where would be the place to file a bug for this, in case no one has been filed yet?

@probonopd

there is a bug report:
https://bugreports.qt.io/browse/QTBUG-101427

Resolution: Out of scope

lol

@probonopd
Copy link
Author

probonopd commented Nov 5, 2023

@phrxmd not every desktop environment follows the XDG desktop spec, and for a reason. The display server should not assume that all desktops follow the XDG desktop spec. The XDG desktop spec is the realm of the desktop environment. The display server has no business in that and should make no assumptions about it.

@zocker-160
Copy link

zocker-160 commented Nov 5, 2023

@phrxmd

I've edited it back in for clarity. He explicitly talked about having to launch an app from the .desktop file to show an icon. That is not correct.

You know exactly what he meant, stop splitting hairs.

Better don't do that. This is the CSD mindset all over again. Stateful information belongs in the app, not in some UI element that you have no control over.

First of all don't tell me what I have to do or not, that is the Wayland mindset all over, which I am very disgusted by.

Second I do have control over it on Windows and MacOS.
So please explain why should I degrade the application for 98% of my users just because a small part of Linux is trying to dictate what I can or cannot do?

This is not a Wayland problem

It is, 100% because Wayland does not support that functionality.

Plenty of X window managers won't show icons in the window

Which is not a problem, because users of those window managers do know that the icon is not shown and therefore it is their choice to have a more limited feature set. KDE users however expect this to work and will file bug reports if it doesn't.

When I used window tiling with i3 and KWin, I often had titlebars disabled for extra screen real estate, and I hated it when devs tried to be clever and squeeze in extra stateful information in there.

Sucks for you I guess, but 99% of users don't use a tiling WM, so the developer probably could not care less.

Copy link

ghost commented Nov 5, 2023

if you're going going to use the icon setting in your program to display the state of it, or not.
It's a very stupid limitiation of wayland once again, a weird decisison that noone can get behind and doesnt have any positives from how it was in XORG, in this case its even a downside...

@probonopd
Copy link
Author

Resolution: Out of scope

lol

As in: Qt cannot fix this, it must be fixed in Wayland

@zocker-160
Copy link

zocker-160 commented Nov 5, 2023

@probonopd

As in: Qt cannot fix this, it must be fixed in Wayland

Exactly, you could add this to the list above if it isn't there already 😆.

And given the criticality of the bug, any argument that "it is not needed" goes out of the window.

@phrxmd
Copy link

phrxmd commented Nov 5, 2023

@phrxmd

I've edited it back in for clarity. He explicitly talked about having to launch an app from the .desktop file to show an icon. That is not correct.
As for your point, you are correct in that if there is no .desktop file visible to the system somewhere, the system will have no way to map the app_id to an icon.

You know exactly what he meant, stop splitting hairs.

I agreed with you right in the next sentence that you conveniently edited out, so stop giving me this toxic bullshit.

First of all don't tell me what I have to do or not, that is the Wayland mindset all over, which I am very disgusted by.

I'm giving you feedback on your UI design. You're on a public forum, deal with it.

Second I do have control over it on Windows and MacOS. So please explain why should I degrade the application for 98% of my users just because a small part of Linux is trying to dictate what I should or should not do?

Well if you care about those 2% of users, that just makes it a bad UI design decision to put information in a place where even on X11 you can't be sure that they'll be able to see it.

Plenty of X window managers won't show icons in the window

Which is not a problem, because users of those window managers do know that the icon is not shown and therefore it is their choice to have a more limited feature set.

Users of TWM, WindowMaker, FVWM, i3 and the like will never know that you are trying to tell them something. I also suggest that you get out of this mindset of telling people what kind of X11 window managers they should run in order to get the full functionality of your app. That attitude is very similar to what you're criticizing in others.

@zocker-160
Copy link

zocker-160 commented Nov 5, 2023

Also here the bug report on the Wayland side: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/52

Answer in typical Wayland fashion:

Can you describe your use-case? What is your client, why do you need to change the icon?

This "why do you need" all the time is just 🤮 🤮 🤮 🖕 🖕

@probonopd
Copy link
Author

Just gave 5 reasons in that ticket. If you agree, please give a 👍 on my comment in that ticket (can log in using GitHub). Thanks!

@zocker-160
Copy link

@phrxmd

I'm giving you feedback on your UI design. You're on a public forum, deal with it.

Yes and I dealt with it by telling you that the advice is dumb. Users like the feature, so why should I remove it?

even on X11 you can't be sure that they'll be able to see it.

Yes, but as I said, those users also don't expect it, so they won't file a bug report. So I am fine with that.

I also suggest that you get out of this mindset of telling people what kind of X11 window managers they should run

NO you are now twisting my words. I am supporting whatever the majority of my users use. That is all. I am not telling anybody what to use.

If the majority used tiling WMs, I would target it, but this simply isn't the case.

Targeting 98% of users is good enough in my book.

Quotation-Bill-Cosby-I-don-t-know-the-key-to-success-but-the-6-51-55

telling people what kind of X11 window managers they should run in order to get the full functionality of your app

No I simply support what the majority uses. And that are window managers with floating windows and a taskbar or a dock with icons.

@phrxmd
Copy link

phrxmd commented Nov 5, 2023

@zocker-160

even on X11 you can't be sure that they'll be able to see it.

Yes, but as I said, those users also don't expect it, so they won't file a bug report.

The rationale why a window manager would want to use icons from a repository in the DE (which is what .desktop files are, according to the standard), rather than what the app developer thinks is a good idea, is because otherwise you get bug reports such as these, all from KWin X11:

Turns out what users expect is to have control over their icons, to be able to view them in good quality, to have different launchers for the same app with different icons in window decorations, and so on. What the user wants to see should trump what the developer wants them to see. Especially when we see so much emphasis that users should have control over their system.

You could argue that there should be a better way to communicate icons to the DE than .desktop files, but that's a separate discussion. With .desktop files being the standard they are, there could be ways of passing icon information to the system via .desktop files like Wine does) even when the app itself uses something else internally.

@probonopd
Copy link
Author

On all other platforms, applications can set the icons. On X11, applications can set the icons. So in terms of cross-platform consistency alone, Wayland needs to allow applications to set the icons.

Wayland has no business in having opinions about user experience. It is "just" a display server that is supposed to just render pixels to the screen. User experience decisions are made in other layers of the stack, and different environments may make different user experience decisions.

@hsnfirdaus
Copy link

hsnfirdaus commented Nov 5, 2023

On all other platforms, applications can set the icons. On X11, applications can set the icons. So in terms of cross-platform consistency alone, Wayland needs to allow applications to set the icons (at least under GNOME Wayland Session).

Wayland has no business in having opinions about user experience. It is "just" a display server that is supposed to just render pixels to the screen. User experience decisions are made in other layers of the stack, and different environments may make different user experience decisions.

I'm not desktop developers, but i think application can set their icon. Tested using gtk4:

Screenshot from 2023-11-05 19-59-58

In gtk4:

gtk_window_set_icon_name(window, "icon-name");

@phrxmd
Copy link

phrxmd commented Nov 5, 2023

Wayland needs to allow applications to set the icons.

Applications can set their icons, there is no problem for an app to register as many different icons as it wants, with NoDisplay set appropriately so that in the menu users see the one you want.

You just disagree with the way it's done. Here we go again. First it was portals and Pipewire, now it's .desktop files and the XDG spec.

But that was a design decision made to no small part to the developers of X11 WMs who respond to bug reports of the type I linked to above. They do the work, so they call the shots.

Wayland has no business in having opinions about user experience. It is "just" a display server that is supposed to just render pixels to the screen.

That's a misconception, but maybe it's no surprise that people who actively boycott Wayland, never use Wayland, don't develop for Wayland and actively try to prevent others from doing it are not very clear on what it is and why user experience matters in a way it didn't with bare X11. That's fair.

Wayland is not "just" a display server and not "just" a replacement for X11. It also does what the window manager would do. User experience becomes relevant because the stack is different and does not need separate components for "rendering pixels" and for managing rectangular areas. You could argue that this is not the way a display system should work, but that ship has sailed, unless you get people together and maintain your own.

@ssokolow
Copy link

ssokolow commented Nov 5, 2023

Applications can set their icons, there is no problem for an app to register as many different icons as it wants, with NoDisplay set appropriately so that in the menu users see the one you want.

You just disagree with the way it's done. Here we go again. First it was portals and Pipewire, now it's .desktop files and the XDG spec.

If you've been paying attention, you'll know that I've been a consistent voice in favour of cautious optimism about Wayland, but I disagree with this one.

I disagree with requiring Steam or Lutris or arbitrary GOG.com Mojosetup installers to finger-paint in my desktop. I don't think we should be going back to the bad old days when install flow design incentivized tools like Quarterdeck (later Norton) CleanSweep.

I disagree with forcing display of taskbar and SSD-based window icons to be something much easier for the user to "hold wrong".

As a developer, I disagree with being forced to install system integration while iterating on a piece of software I'm developing to get functionality such as "My compositor's server-side window decorations will display my application's icon".

I don't like how macOS essentially makes "Don't spawn a terminal window when I launch my application" a function of how the application is packaged, rather than what you launch it from like on Linux or some metadata in the binary header like on Windows either and I don't use KDE's "progress bar in taskbar" API because KDE used Canonical's Unity API for it which relies on a .desktop file to bind your application to a collision-prone string name.

Why not just make it so you don't get a taskbar entry at all without a .desktop file while you're at it? That's desktop integration too and there's precedent in that double-clicking an MP3 with no embedded cover art and having it play in MPV will result in music/podcast playback that can only be stopped by killing the process. You could exempt it from the Alt+Tab carousel while you're at it to encourage developers to buy into the system.

This feels like the same hostile, fragile, wetware-hacking-prone rationale that produced GNOMEs "If you don't draw your own window decorations, you don't get any. We refuse to implement the decoration protocol".

@phrxmd
Copy link

phrxmd commented Nov 5, 2023

Applications can set their icons, there is no problem for an app to register as many different icons as it wants, with NoDisplay set appropriately so that in the menu users see the one you want.
You just disagree with the way it's done. Here we go again. First it was portals and Pipewire, now it's .desktop files and the XDG spec.

If you've been paying attention, you'll know that I've been a consistent voice in favour of cautious optimism about Wayland, but I disagree with this one.

The motivation for that decision came from WM/DE developers who got tired of bug reports to the end of "why does the icon in the window decoration not match the theme" or "the one I specify in the menu editor" and "why is the icon blurry". In KDE that discussion goes back all the way to the 2000s. It predates Wayland.

Generating .desktop files on the fly in ~/.local/share/applications or wherever is what Wine does, too.

I guess the alternative in Unix-like OS would be to have some kind of daemon that Qt et al. can talk to via a standard API, where the app can register its desired DE behavior, specify an icon via QWindow::setIcon() and so on and the daemon passes it on to the window manager (or does whatever the user wants with it - e.g. overlay a website's favicon or a Telegram chat icon on the theme app icon in a defined way). That would also make it easier to get DEs to play nicely with self-contained apps.

@probonopd
Copy link
Author

Generating .desktop files on the fly in ~/.local/share/applications or wherever is what Wine does, too.

That's a shitty way to litter the system with such files, especially for portable applications (e.g., running from a USB stick that can come and go) and are not "installed" in any particular location in the filesystem.

@ssokolow
Copy link

ssokolow commented Nov 5, 2023

The motivation for that decision came from WM/DE developers who got tired of bug reports to the end of "why does the icon in the window decoration not match the theme" or "the one I specify in the menu editor" and "why is the icon blurry". In KDE that discussion goes back all the way to the 2000s. It predates Wayland.

And I do value the ability to override icons using the system theme highly, which comes from the same mechanism. I'm just not willing to give up the APIs Qt offers to fall back to a bundled icon if the lookup fails.

Generating .desktop files on the fly in ~/.local/share/applications or wherever is what Wine does, too.

I exported WINEDLLOVERRIDES='winemenubuilder.exe=d' years ago to keep Windows applications from finger-painting in my launcher menu. If I want a launcher, I use PlayOnLinux's list of installed wineprefixes.

I guess the alternative in Linux would be to have some kind of daemon that Qt et al. can talk to, where the app can register an icon via QWindow::setIcon() and the daemon passes it on to the window manager (or does whatever the user wants with it).

Except that appimaged is 100% optional by design... though I suppose that would be the route I'd have to take. Some kind of application-specific code where, when I run my application, it detects if it's running from a git checkout or tarball or what have you and then re-runs itself inside a wrapper which will invokes necessary commands like xdg-desktop-menu to add the icon and then clean it up whether or not its child exits cleanly.

@Monsterovich
Copy link

Monsterovich commented Nov 5, 2023

@phrxmd

Generating .desktop files on the fly in ~/.local/share/applications or wherever is what Wine does, too.

Not just .desktop files, but icons. I have to clean it up by hand every time, because wine doesn't do it.

@ssokolow

I exported WINEDLLOVERRIDES='winemenubuilder.exe=d' years ago to keep Windows applications from finger-painting in my launcher menu.

Oh great, at least that behaviour can be turned off.

@phrxmd
Copy link

phrxmd commented Nov 5, 2023

Generating .desktop files on the fly in ~/.local/share/applications or wherever is what Wine does, too.

That's a shitty way to litter the system with such files, especially for portable applications (e.g., running from a USB stick that can come and go) and are not "installed" in any particular location in the filesystem.

I agree, that's why there is the next paragraph.

@phrxmd
Copy link

phrxmd commented Nov 5, 2023

Except that appimaged is 100% optional by design... though I suppose that would be the route I'd have to take. Some kind of application-specific code where, when I run my application, it detects if it's running from a git checkout or tarball or what have you and then re-runs itself inside a wrapper which will invokes necessary commands like xdg-desktop-menu to add the icon and then clean it up whether or not its child exits cleanly.

I think it being optional is no big problem, the worst that could happen (in the "downloaded tarball" case) is that the daemon is not available AND there are no (packaged, user-configured) .desktop files, in which case all you lose is that your visual user experience degrades a bit. But that should not be critical, because if your user interaction critically depends on being able to draw stuff in your X11 WM's window decorations the way you want, you have a bigger problem.

With self-contained apps there's even less of a problem, an AppImage knows it's an AppImage and can do whatever it needs to do to check daemon availability, register things with it or the DE and initiate any necessary cleanup.

@ssokolow
Copy link

ssokolow commented Nov 5, 2023

I still don't like that it's necessary to to reinvent work that really should be done once, in a common, guaranteed-to-be-available place, for all portable or "being run from a git checkout for development purposes and fast iteration" applications.

It's CSD vs. SSD all over again and you're arguing that, once again, SDL2 should bite the bullet and fix the mess that Windows and macOS developers don't have to deal with.

@phrxmd
Copy link

phrxmd commented Nov 5, 2023

I still don't like that it's necessary to to reinvent work that really should be done once, in a common, guaranteed-to-be-available place, for all portable or "being run from a git checkout for development purposes and fast iteration" applications.

It's CSD vs. SSD all over again and you're arguing that, once again, SDL2 should bite the bullet and fix the mess that Windows and macOS developers don't have to deal with.

It's even worse, we've just reinvented a portal :) But I digress.

If we're just talking about icons, the question would be what is the alternative proposal to spare WM devs to deal with bug reports about wrong or ugly icons, while maintaining user icon theming. In the meantime we're going in circles. Just telling them to suck it up is not going to do it, not least because they call the shots regarding the design decisions in DEs.

That said, talking about what goes into a .desktop file, the world is not all rosy on the other side either. MacOS is better, but Windows developers have to deal with installers all the time already for basic things such as getting their app to show up in the launcher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment