On Windows, I can use Process Explorer and drag its crosshairs to a window, then Process Explorer highlights the associated process.
On Ubuntu, I didn't find such a function in System Monitor. What's the easy way to get process from window?
I'm open to downloading an alternative process monitor or other tools.
If you can use Terminal, try this:
and your cursor should turn into cross allowing you to click on any window to get its process name. If you just need the PID, try:
Hope this helps.
Using
xprop
is already mentioned in this other answer and probably the best solution.Another way might be to use
wmctrl -lp
to list all windows managed by your window manager together with their respective process IDs (PID) where possible:You could then use this PID to get more info about the process, e.g. with
ps aux -q YOUR_PID_HERE
: