This is a 2-step identification of your mysterious windows.
Identification 1a
You could open a terminal and use
$ xwininfo
which will prompt you to select the window about which you want to get info.
Once you have the window ID WIN_ID
(among other info), you could get more info with other flags, or with wmctrl
, see Identification 1b below.
In particular, you may want to get the process ID.
If wmctrl
does not work for that, you could try getting the PID
from WIN_ID
with
$ xprop -id <WIN_ID> | grep _NET_WM_PID (or simply...)
$ xprop -id <WIN_ID> _NET_WM_PID
If you do not grep
you could get other interesting info.
In my experience, this not always gives you positive results.
See also Identification 2 below.
Related:
- https://unix.stackexchange.com/a/84981/137608
- https://stackoverflow.com/questions/1131277/how-to-convert-a-x11-window-id-to-a-process-id
- Tell a process PID by it's window?
- https://ubuntuforums.org/archive/index.php/t-1124561.html
Identification 1b
As an alternative (probably easier to use, but in your case it seems not working),
you could open a terminal and use
$ wmctrl -l -p -x
to list all windows managed by the current window manager
(you could check it with wmctrl -m
or env | grep -i desktop
, and it would be useful to have you posting that output in the OP).
From wmctrl --help
:
The format of the window list:
<window ID> <desktop ID> <client machine> <window title>
This is the basic format, obtained with -l
. Options -p
and -x
add extra columns.
Columns 1 (numerical window ID, from the basic option -l
), 3 (PID no., from option -p
), 4 (WM_CLASS
, from option -x
) and 5 (window title, from the basic option -l
) of the output will be most useful.
Then, you could use
$ wmctrl -a <WIN>
with each of the listed windows,
to "Activate the window by switching to its desktop and raising it" (check ).
This way, you could identify your mysterious windows.
As for <WIN>
: "This argument specifies the window. By default it's interpreted as a string. The string is matched against the window titles and the first matching window is used. The matching isn't case sensitive and the string may appear in any position of the title."
So you would be mostly ok using for <WIN>
any substring of column 5 above, e.g., wmctrl -a 'Firefox'
.
You may need to suitably escape the string.
Alternatively, you could use
$ wmctrl -a <window hex no.> -i
with column 1 above (which avoids any possible ambiguity with string matching of the window title), or
$ wmctrl -a <WM_CLASS> -x
with column 4 above.
You could tinker with other funny and useful options, as -R
or -G
.
Identification 2
With the pidno
of each target window, you could use
$ ps -ef | grep <pidno>
$ pwdx <pidno>
$ pidstat -p <pidno>
$ ls /proc/<pidno>
$ cat /proc/<pidno>/<file>
for further identification.
You could see with ls
above what you could use for <file>
, e.g., status
or cmdline
.
Sources:
- How to see detailed information about a given PID?
- https://superuser.com/questions/632979/if-i-know-the-pid-number-of-a-process-how-can-i-get-its-name