How to identify window by clicking in Wayland
Good news, there IS something like this built into Gnome Shell, and unlike xprop
works with Xorg and Wayland. Ultimately this may fall into the realm of other tooling if you're using KDE, i3, or something else.
To begin with, type the keys "ALT+F2" on the keyboard which will bring up a menu like this:
After that comes up, issue the command lg
(for "looking glass).
This will then bring up the looking glass window, from which we can extract window information. Select "window" from the top right corner of the looking glass:
From there, you'll see a list of windows, from which you can click on the name of the window you want to identify.
In this case, I chose gedit for an example:
In the top line of that output you may notice:
Inspecting object: object instance proxy GType: MetaWindowX11 ...
The "GType" will be one of MetaWindowX11
or MetaWindowWayland
.
This info comes as per https://fedoraproject.org/wiki/How_to_debug_Wayland_problems
Related videos on Youtube
czerny
Updated on September 18, 2022Comments
-
czerny over 1 year
I'd like to identify which process a window belongs to in Wayland. Is there anything like
xprop
for X that allows the user to pick a window by clicking and outputs all window details, including PID?-
mviereck about 6 yearsI doubt that there is or will ever be such a command like xprop. One major goal of Wayland is to restrict access to windows of other processes.
-
Nathaniel M. Beaver about 6 years@mviereck Surely the superuser could see window information, even in Wayland?
-
mviereck about 6 years@bariumbitmap: Only if the compositor provides these informations outside of its own memory, for example in a file or through an API. I am not aware of such a specification (but it may exist, though). Of course, you could fork a compositor like weston and implement that yourself, if you don't need a general solution for all compositors.
-
istepaniuk about 5 yearsWhy not just
xprop
? It shows an awful lot of detail over a window via XWayland, including_NET_WM_PID(CARDINAL)
, which is the originator process PID.
-
-
czerny about 6 yearsSo does this allow to find out the PID of process running the listed window?
-
RichieHH over 3 yearsSo how to use this from a shell in order to determine if a gui is running as wmctrl did?