Easy way to get process information from a windowHow to identify and kill hanging process, when system hangs and reacts slowly on user input?Can I use standard tools to get the full name of a process, when its name has embedded spaces?How to get rid of Transmission zombie process?Identify package by window?Close active window from terminalprocess id from window idWindows “jumping” between monitors when scale plugin usedProcess(application) is active but is not shown anywhere on the desktop. How to open its window?Different colors for active/inactive Unity window title bars?Cannot tile the “Files” window to the left or right side by pressing Super + Left/Right keys very often
Can "être sur" mean "to be about" ?
Email address etiquette - Which address should I use to contact professors?
How to assign many blockers at the same time?
Does fossil fuels use since 1990 account for half of all the fossil fuels used in history?
Submitting a new paper just after another was accepted by the same journal
How can I categorize files in a directory based on their content?
Why are Tucker and Malcolm not dead?
Super Duper Vdd stiffening required on 555 timer, what is the best way?
How to describe accents?
The cat ate your input again!
What is a good class if we remove subclasses?
What gave Harry Potter the idea of writing in Tom Riddle's diary?
visible indication that a cell is not evaluatable
Is this curved text blend possible in Illustrator?
Is it legal for a company to enter an agreement not to hire employees from another company?
80's/90's superhero cartoon with a man on fire and a man who made ice runways like Frozone
Loading military units into ships optimally, using backtracking
Understanding this peak detector circuit
how do companies get money from being listed publicly
What is this "Table of astronomy" about?
If a digital camera can be "hacked" in the ransomware sense, how best to protect it?
If clocks themselves are based on light signals, wouldn't we expect the measured speed of light to always be the same constant?
Is there a command to install basic applications on Ubuntu 16.04?
If "more guns less crime", how do gun advocates explain that the EU has less crime than the US?
Easy way to get process information from a window
How to identify and kill hanging process, when system hangs and reacts slowly on user input?Can I use standard tools to get the full name of a process, when its name has embedded spaces?How to get rid of Transmission zombie process?Identify package by window?Close active window from terminalprocess id from window idWindows “jumping” between monitors when scale plugin usedProcess(application) is active but is not shown anywhere on the desktop. How to open its window?Different colors for active/inactive Unity window title bars?Cannot tile the “Files” window to the left or right side by pressing Super + Left/Right keys very often
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
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.
18.04 window process
add a comment |
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.
18.04 window process
add a comment |
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.
18.04 window process
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.
18.04 window process
18.04 window process
edited Aug 1 at 12:34
Zanna
52.7k14 gold badges149 silver badges250 bronze badges
52.7k14 gold badges149 silver badges250 bronze badges
asked Jul 31 at 21:05
GqqnbigGqqnbig
2712 silver badges10 bronze badges
2712 silver badges10 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
If you can use Terminal, try this:
xprop | grep WM_CLASS
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:
xprop | awk '/PID/ print $3'
Hope this helps.
6
grep
is not really necessary, you can give a property name as argument to show only that one, likexprop WM_CLASS
directly. Note that especially theWM_CLASS
does not have to be the same as the process executable, it can be an arbitrary value as set by the developer.
– Byte Commander♦
Jul 31 at 21:42
It works like a charm, thanks.
– Gqqnbig
Jul 31 at 22:40
add a comment |
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:
$ wmctrl -lp
0x03a00002 0 1570 type40mark3 XdndCollectionWindowImp
0x03a00003 0 1570 type40mark3 unity-launcher
0x03a00004 0 1570 type40mark3 unity-panel
0x03a00005 0 1570 type40mark3 unity-dash
0x03a00006 0 1570 type40mark3 Hud
0x02c0000a -1 302 type40mark3 Desktop
0x08a00003 0 8861 type40mark3 18.04 - Easy way to get process from window - Ask Ubuntu - Mozilla Firefox
0x08a00033 0 8861 type40mark3 Some other site in a different window - Mozilla Firefox
0x0840b72c 0 20705 type40mark3 bytecommander@type40mark3: ~
0x08800001 0 7389 type40mark3 New Tab - Chromium
You could then use this PID to get more info about the process, e.g. with ps aux -q YOUR_PID_HERE
:
$ ps aux -q 20705
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
bytecom+ 20705 0.0 0.2 676820 32268 ? Sl Jun28 1:58 /usr/lib/gnome-terminal/gnome-terminal-server
Thanks for sharing this command. I more like the other visual way. Sometimes a window doesn't have title bar or is boradless, I can't really tell from this list given by wmctrl.
– Gqqnbig
Jul 31 at 22:40
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1162509%2feasy-way-to-get-process-information-from-a-window%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you can use Terminal, try this:
xprop | grep WM_CLASS
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:
xprop | awk '/PID/ print $3'
Hope this helps.
6
grep
is not really necessary, you can give a property name as argument to show only that one, likexprop WM_CLASS
directly. Note that especially theWM_CLASS
does not have to be the same as the process executable, it can be an arbitrary value as set by the developer.
– Byte Commander♦
Jul 31 at 21:42
It works like a charm, thanks.
– Gqqnbig
Jul 31 at 22:40
add a comment |
If you can use Terminal, try this:
xprop | grep WM_CLASS
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:
xprop | awk '/PID/ print $3'
Hope this helps.
6
grep
is not really necessary, you can give a property name as argument to show only that one, likexprop WM_CLASS
directly. Note that especially theWM_CLASS
does not have to be the same as the process executable, it can be an arbitrary value as set by the developer.
– Byte Commander♦
Jul 31 at 21:42
It works like a charm, thanks.
– Gqqnbig
Jul 31 at 22:40
add a comment |
If you can use Terminal, try this:
xprop | grep WM_CLASS
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:
xprop | awk '/PID/ print $3'
Hope this helps.
If you can use Terminal, try this:
xprop | grep WM_CLASS
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:
xprop | awk '/PID/ print $3'
Hope this helps.
answered Jul 31 at 21:35
Abhishek NairAbhishek Nair
4413 silver badges9 bronze badges
4413 silver badges9 bronze badges
6
grep
is not really necessary, you can give a property name as argument to show only that one, likexprop WM_CLASS
directly. Note that especially theWM_CLASS
does not have to be the same as the process executable, it can be an arbitrary value as set by the developer.
– Byte Commander♦
Jul 31 at 21:42
It works like a charm, thanks.
– Gqqnbig
Jul 31 at 22:40
add a comment |
6
grep
is not really necessary, you can give a property name as argument to show only that one, likexprop WM_CLASS
directly. Note that especially theWM_CLASS
does not have to be the same as the process executable, it can be an arbitrary value as set by the developer.
– Byte Commander♦
Jul 31 at 21:42
It works like a charm, thanks.
– Gqqnbig
Jul 31 at 22:40
6
6
grep
is not really necessary, you can give a property name as argument to show only that one, like xprop WM_CLASS
directly. Note that especially the WM_CLASS
does not have to be the same as the process executable, it can be an arbitrary value as set by the developer.– Byte Commander♦
Jul 31 at 21:42
grep
is not really necessary, you can give a property name as argument to show only that one, like xprop WM_CLASS
directly. Note that especially the WM_CLASS
does not have to be the same as the process executable, it can be an arbitrary value as set by the developer.– Byte Commander♦
Jul 31 at 21:42
It works like a charm, thanks.
– Gqqnbig
Jul 31 at 22:40
It works like a charm, thanks.
– Gqqnbig
Jul 31 at 22:40
add a comment |
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:
$ wmctrl -lp
0x03a00002 0 1570 type40mark3 XdndCollectionWindowImp
0x03a00003 0 1570 type40mark3 unity-launcher
0x03a00004 0 1570 type40mark3 unity-panel
0x03a00005 0 1570 type40mark3 unity-dash
0x03a00006 0 1570 type40mark3 Hud
0x02c0000a -1 302 type40mark3 Desktop
0x08a00003 0 8861 type40mark3 18.04 - Easy way to get process from window - Ask Ubuntu - Mozilla Firefox
0x08a00033 0 8861 type40mark3 Some other site in a different window - Mozilla Firefox
0x0840b72c 0 20705 type40mark3 bytecommander@type40mark3: ~
0x08800001 0 7389 type40mark3 New Tab - Chromium
You could then use this PID to get more info about the process, e.g. with ps aux -q YOUR_PID_HERE
:
$ ps aux -q 20705
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
bytecom+ 20705 0.0 0.2 676820 32268 ? Sl Jun28 1:58 /usr/lib/gnome-terminal/gnome-terminal-server
Thanks for sharing this command. I more like the other visual way. Sometimes a window doesn't have title bar or is boradless, I can't really tell from this list given by wmctrl.
– Gqqnbig
Jul 31 at 22:40
add a comment |
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:
$ wmctrl -lp
0x03a00002 0 1570 type40mark3 XdndCollectionWindowImp
0x03a00003 0 1570 type40mark3 unity-launcher
0x03a00004 0 1570 type40mark3 unity-panel
0x03a00005 0 1570 type40mark3 unity-dash
0x03a00006 0 1570 type40mark3 Hud
0x02c0000a -1 302 type40mark3 Desktop
0x08a00003 0 8861 type40mark3 18.04 - Easy way to get process from window - Ask Ubuntu - Mozilla Firefox
0x08a00033 0 8861 type40mark3 Some other site in a different window - Mozilla Firefox
0x0840b72c 0 20705 type40mark3 bytecommander@type40mark3: ~
0x08800001 0 7389 type40mark3 New Tab - Chromium
You could then use this PID to get more info about the process, e.g. with ps aux -q YOUR_PID_HERE
:
$ ps aux -q 20705
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
bytecom+ 20705 0.0 0.2 676820 32268 ? Sl Jun28 1:58 /usr/lib/gnome-terminal/gnome-terminal-server
Thanks for sharing this command. I more like the other visual way. Sometimes a window doesn't have title bar or is boradless, I can't really tell from this list given by wmctrl.
– Gqqnbig
Jul 31 at 22:40
add a comment |
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:
$ wmctrl -lp
0x03a00002 0 1570 type40mark3 XdndCollectionWindowImp
0x03a00003 0 1570 type40mark3 unity-launcher
0x03a00004 0 1570 type40mark3 unity-panel
0x03a00005 0 1570 type40mark3 unity-dash
0x03a00006 0 1570 type40mark3 Hud
0x02c0000a -1 302 type40mark3 Desktop
0x08a00003 0 8861 type40mark3 18.04 - Easy way to get process from window - Ask Ubuntu - Mozilla Firefox
0x08a00033 0 8861 type40mark3 Some other site in a different window - Mozilla Firefox
0x0840b72c 0 20705 type40mark3 bytecommander@type40mark3: ~
0x08800001 0 7389 type40mark3 New Tab - Chromium
You could then use this PID to get more info about the process, e.g. with ps aux -q YOUR_PID_HERE
:
$ ps aux -q 20705
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
bytecom+ 20705 0.0 0.2 676820 32268 ? Sl Jun28 1:58 /usr/lib/gnome-terminal/gnome-terminal-server
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:
$ wmctrl -lp
0x03a00002 0 1570 type40mark3 XdndCollectionWindowImp
0x03a00003 0 1570 type40mark3 unity-launcher
0x03a00004 0 1570 type40mark3 unity-panel
0x03a00005 0 1570 type40mark3 unity-dash
0x03a00006 0 1570 type40mark3 Hud
0x02c0000a -1 302 type40mark3 Desktop
0x08a00003 0 8861 type40mark3 18.04 - Easy way to get process from window - Ask Ubuntu - Mozilla Firefox
0x08a00033 0 8861 type40mark3 Some other site in a different window - Mozilla Firefox
0x0840b72c 0 20705 type40mark3 bytecommander@type40mark3: ~
0x08800001 0 7389 type40mark3 New Tab - Chromium
You could then use this PID to get more info about the process, e.g. with ps aux -q YOUR_PID_HERE
:
$ ps aux -q 20705
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
bytecom+ 20705 0.0 0.2 676820 32268 ? Sl Jun28 1:58 /usr/lib/gnome-terminal/gnome-terminal-server
answered Jul 31 at 21:40
Byte Commander♦Byte Commander
71.2k27 gold badges193 silver badges326 bronze badges
71.2k27 gold badges193 silver badges326 bronze badges
Thanks for sharing this command. I more like the other visual way. Sometimes a window doesn't have title bar or is boradless, I can't really tell from this list given by wmctrl.
– Gqqnbig
Jul 31 at 22:40
add a comment |
Thanks for sharing this command. I more like the other visual way. Sometimes a window doesn't have title bar or is boradless, I can't really tell from this list given by wmctrl.
– Gqqnbig
Jul 31 at 22:40
Thanks for sharing this command. I more like the other visual way. Sometimes a window doesn't have title bar or is boradless, I can't really tell from this list given by wmctrl.
– Gqqnbig
Jul 31 at 22:40
Thanks for sharing this command. I more like the other visual way. Sometimes a window doesn't have title bar or is boradless, I can't really tell from this list given by wmctrl.
– Gqqnbig
Jul 31 at 22:40
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1162509%2feasy-way-to-get-process-information-from-a-window%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown