Continued absurd Linux problems:

If I run in Wayland,
and run Chrome,
my custom .XCompose file is ignored.

Chrome on X11 does not have this problem,
Wayland apps other than Chrome do not have a problem,
if I use default XCompose sequences instead of custom XCompose there is no problem.

It's just this one combination of things.

Checking the Chromium bug tracker I find variations of this bug repeatedly filed, then closed, as far back as 2015 and as recently as 2021, closed as "fixed".

So I'm sitting here trying to figure out how to tell if a particular app is running in Wayland or XWayland.

This is the answer I get off Stack Overflow. I'm thinking… No. No, that's too silly. It can't be the best way.

I keep researching. It's the best way.

You run xeyes.

Wayland has security that keeps windows from knowing about mouse events in other windows. XWayland doesn't.

Xeyes will track your cursor whenever you're over an XWayland window, then stop if you pass over anything else.

@mcc This is hilarious, being that X is a remote protocol where you can put clients in a separate privilege domain and they only see the events the server tells them about (it's totally possible to deny them events they shouldn't see; it's an implementation choice not to) and Wayland is necessarily local within a single privilege domain where apps can just ptrace the display process. 🤪
@dalias @mcc
• Wayland is not strictly necessarily local, see waypipe
• clients can only ptrace the display server or other clients if they're allowed to by the other OS mechanisms (running as the same UID or so) — that won't be possible if the client is sandboxed

@bugaevc @dalias @mcc I thought the “only root can ptrace non-child processes” behaviour has been the default everywhere¹ for a decade?

And, yeah, XACE has existed forever, but actually trying to use it would break the exact set of things broken by Wayland anyway.

¹: I'm pretty sure it was Ubuntu sauce originally?

@RAOF @dalias @mcc I don't think it's been the default, I've always been able to strace/gdb other processes by PID. I only remember seeing that on Ubuntu machines