LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-09-2021, 06:37 AM   #1
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369
Blog Entries: 1

Rep: Reputation: 49
To what process does this window belong to ?


Dear LQ,

I was looking at xprop. Sometimes, it prints WM_COMMAND and I can figure out what process a window belongs to, but sometimes WM_COMMAND isn't printed (tried with libreoffice and firefox).

Is there a more consistent way to determine to which process a desktop window belongs to ?
 
Old 03-09-2021, 07:19 AM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Hi.
Code:
xwininfo
Quote:
...
If you just have a window in front of you and don't know its ID yet — it's easy to find it out. Just open a terminal next to the window in question, run xwininfo there and click on that window. xwininfo will show you the window-id.

So let's assume you know a window-id, e.g. 0x1600045, and want to find, what's the process owning it.

The easiest way to check who that window belongs to is to run XKillClient for it i.e.:
...
Code:
xkill -id 0x1600045
--https://unix.stackexchange.com/quest...his-x11-window

Just a quick search example: linux window process info if I had my laptop I'd try it and see, you're on Debian-KDE?

Add: some process managers (like top for example or GUI ones) have a lot of extra tweaks...

Last edited by jamison20000e; 03-09-2021 at 07:35 AM. Reason: Link and added
 
1 members found this post helpful.
Old 03-09-2021, 07:22 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,996

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
this is the first hit: https://kb.froglogic.com/misc/find-process-for-window/
 
Old 03-10-2021, 12:40 AM   #4
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369

Original Poster
Blog Entries: 1

Rep: Reputation: 49
Quote:
Originally Posted by jamison20000e View Post
you're on Debian-KDE?
Mint KDE
 
Old 03-10-2021, 12:51 AM   #5
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369

Original Poster
Blog Entries: 1

Rep: Reputation: 49
Quote:
Originally Posted by jamison20000e View Post
Hi.
Code:
xwininfo
Code:
xkill -id 0x1600045
--https://unix.stackexchange.com/quest...his-x11-window
You forgot to quote the next sentence

Quote:
and see which process just died. But only if you don't mind killing it of course!
 
1 members found this post helpful.
Old 03-10-2021, 01:14 AM   #6
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369

Original Poster
Blog Entries: 1

Rep: Reputation: 49
The ID reported by xprop for vlc doesn't match that by xlsclient

xprop

Quote:
ychaouche#ychaouche-PC 08:00:07 ~ $ xprop
_NET_WM_USER_TIME(CARDINAL) = 2231305
_NET_WM_ICON_GEOMETRY(CARDINAL) = 1275, 1029, 200, 51
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 2, 2, 23, 4
_NET_FRAME_EXTENTS(CARDINAL) = 2, 2, 23, 4
_NET_WM_DESKTOP(CARDINAL) = 1
_KDE_NET_WM_ACTIVITIES(STRING) = "a7148778-9688-49c4-8b04-9bdea396fbbc"
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 71303208
_NET_WM_ICON(CARDINAL) = Icon (48 x 48):

░░░
░░░░░░
▒░░░░▒
▒░░░░▒
░░░░░░▒░
▒░░░░░░▒
▒░░░░░░▒
░ ░

░ ░

░ ░ ░
░ ░

░░ ░ ░
▒░░ ░░▒▒
▒▒░░░░░░░░░▒▒▒
░▒▒░░░░░░░░░░▒▒░
▒▒▒░░░░░░░░░░▒▒░
▒▒▒░░░░░░░░░░▒▒▒
░▒▒░░░░░░░░░░░▒▒▒
▒▒▒░░░░░░░░░░░▒▒▒░
▒▒▒░░░░░░░░░░░▒▒▒▒
▒▒▒░░░░░░░░░░░░▒▒▒
░ ░░░░░░░░░░░░░░▒░░
░░ ░ ░░░░░░░░░░░ ░ ░
░ ░ ░ ░░
░ ░ ░ ░ ░
░░ ░ ░ ░ ░
░░▒░░ ░ ░ ░ ░░▒▒▒▒
░░░▒▒ ░ ░ ░ ░ ░▒▒▒▒░
░░▒▒▒▒ ░ ░ ░ ░▒▒▒▒▒▒
░░▒▒▒▒░ ░ ░ ░▒▒▒▒▒▒▒
░░░░▒▒▒▒▒░░ ░░░▒▒▒▒▒▒▒▒░
░░░░▒▒▒▒▒▒▒░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒░
░░░░▒▒▒▒▒▒▒░░▒▒░░░░░░░░░▒▒▒▒▒▒▒▒▒░
░░░░░▒▒▒▒▒▒▒░▒▒▒░░░░░░░░░▒▒▒▒▒▒░░░░
░░░░░░▒▒▒▒▒▒░▒▒▒░░░░░░░░░▒▒▒▒▒░░░░░░
░░░░░░░░▒▒▒▒▒▒▒▒░░░░░░░░░░▒▒░░░░░░░░
░░░░░░░░░░░░▒▒▒▒▒░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░ ░░░░░░░░░░░░
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░


Icon (32 x 32):

░░░
░░░▒
░░░░
░░░░░░
░░░░░░



░ ░

░▒░░░░░░▒░
▒▒░░░░░░▒▒
▒░░░░░░░▒▒
░▒░░░░░░░▒▒░
▒▒░░░░░░░░▒▒
░▒░░░░░░░░▒▒
░ ░░░░░░░░░░
░ ░ ░░
░░ ░░░░░
░▒▒░ ░ ░ ░░▒▒▒
░▒▒░░ ░ ░▒▒▒░
░░▒▒▒░░ ░░░▒▒▒▒░
░░▒▒▒▒▒░░░░░░░░░▒▒▒▒▒▒
░░▒▒▒▒▒░▒▒░░░░░░▒▒▒▒░░
░░░░▒▒▒▒▒▒▒░░░░░░▒▒░░░░
░░░░░░░▒▒▒▒▒░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░ ░
░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░



_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 1736264
XdndAware(ATOM) = BITMAP
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
_NET_WM_NAME(UTF8_STRING) = "Track02.mp3 - VLC media player"
WM_CLIENT_LEADER(WINDOW): window id # 0x4400005
WM_WINDOW_ROLE(STRING) = "vlc-main"
_NET_WM_PID(CARDINAL) = 6907
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NAME(STRING) = "Track02.mp3 - VLC media player"
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLASS(STRING) = "vlc", "Vlc"
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0x4400017
window id # of group leader: 0x4400005
WM_NORMAL_HINTS(WM_SIZE_HINTS):
user specified location: -2, 0
program specified location: -2, 0
user specified size: 1466 by 996
program specified size: 1466 by 996
program specified minimum size: 472 by 404
window gravity: NorthWest
WM_CLIENT_MACHINE(STRING) = "ychaouche-PC"
WM_COMMAND(STRING) = { "vlc" }
ychaouche#ychaouche-PC 08:10:35 ~ $

xlsclients -l

Quote:
ychaouche#ychaouche-PC 08:13:00 ~ $ xlsclients -l
Window 0x1000002:
Machine: ychaouche-PC
Name: kded4
Command: kded4
Instance/Class: kded4/Kded4
Window 0x100000a:
Machine: ychaouche-PC
Name: kded4
Command: kded4
Instance/Class: kded4/Kded4
Window 0x1400002:
Machine: ychaouche-PC
Name: kglobalaccel
Command: /usr/bin/kglobalaccel
Instance/Class: kglobalaccel/Kglobalaccel
Window 0x140000a:
Machine: ychaouche-PC
Name: kglobalaccel
Command: /usr/bin/kglobalaccel
Instance/Class: kglobalaccel/Kglobalaccel
Window 0x1000014:
Machine: ychaouche-PC
Name: kded4
Command: kded4
Instance/Class: kded4/Kded4
Window 0x1a00002:
Machine: ychaouche-PC
Name: Qt-subapplication
Command: ksmserver
Instance/Class: Qt-subapplication/Ksmserver
Window 0x1a0000a:
Machine: ychaouche-PC
Name: Qt-subapplication
Command: ksmserver
Instance/Class: Qt-subapplication/Ksmserver
Window 0x1200002:
Machine: ychaouche-PC
Name: kactivitymanagerd
Command: /usr/bin/kactivitymanagerd
Instance/Class: kactivitymanagerd/Kactivitymanagerd
Window 0x120000a:
Machine: ychaouche-PC
Name: kactivitymanagerd
Command: /usr/bin/kactivitymanagerd
Instance/Class: kactivitymanagerd/Kactivitymanagerd
Window 0x1200012:
Machine: ychaouche-PC
Name: kactivitymanagerd
Command: /usr/bin/kactivitymanagerd
Instance/Class: kactivitymanagerd/Kactivitymanagerd
Window 0x1e00002:
Machine: ychaouche-PC
Name: kdeconnectd
Command: /usr/lib/kde4/libexec/kdeconnectd
Instance/Class: kdeconnectd/Kdeconnectd
Window 0x1e0000a:
Machine: ychaouche-PC
Name: kdeconnectd
Command: /usr/lib/kde4/libexec/kdeconnectd
Instance/Class: kdeconnectd/Kdeconnectd
Window 0x2200002:
Machine: ychaouche-PC
Name: kwin
Command: kwin
Instance/Class: kwin/Kwin
Window 0x2200009:
Machine: ychaouche-PC
Name: kwin
Command: kwin
Instance/Class: kwin/Kwin
Window 0x220001e:
Machine: ychaouche-PC
Name: kwin
Command: kwin
Instance/Class: kwin/Kwin
Window 0x2600002:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x260000a:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x260001a:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x220002a:
Machine: ychaouche-PC
Name: kwin
Command: kwin
Instance/Class: kwin/Kwin
Window 0x2600023:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x260002b:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x2600042:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x260004a:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x2600052:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x260005a:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x2600062:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x260006a:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x2600072:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x260007e:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x1c00002:
Machine: ychaouche-PC
Name: knotify4
Command: /usr/bin/knotify4
Instance/Class: knotify4/Knotify4
Window 0x1c0000a:
Machine: ychaouche-PC
Name: knotify4
Command: /usr/bin/knotify4
Instance/Class: knotify4/Knotify4
Window 0x260008a:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x2600096:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x26000a4:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x26000b6:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x26000c1:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x2800002:
Machine: ychaouche-PC
Name: kuiserver
Command: /usr/bin/kuiserver
Instance/Class: kuiserver/Kuiserver
Window 0x280000a:
Machine: ychaouche-PC
Name: kuiserver
Command: /usr/bin/kuiserver
Instance/Class: kuiserver/Kuiserver
Window 0x26000d6:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x260013c:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x3000007:
Machine: ychaouche-PC
Name: kmix
Command: /usr/bin/kmix
Instance/Class: kmix/Kmix
Window 0xc00034:
Machine: ychaouche-PC
Name: krunner
Command: /usr/bin/krunner
Instance/Class: krunner/Krunner
Window 0xc000b0:
Machine: ychaouche-PC
Name: Run Command
Command: /usr/bin/krunner
Instance/Class: krunner/krunner
Window 0x3000020:
Machine: ychaouche-PC
Name: kmix
Command: /usr/bin/kmix
Instance/Class: kmix/Kmix
Window 0x3000024:
Machine: ychaouche-PC
Name: kmix
Command: /usr/bin/kmix
Instance/Class: kmix/Kmix
Window 0x3000030:
Machine: ychaouche-PC
Name: <unknown type COMPOUND_TEXT (363) or format 8>
Command: /usr/bin/kmix
Instance/Class: kmix/Kmix
Window 0x2400002:
Machine: ychaouche-PC
Name: konsole
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Window 0x240000a:
Machine: ychaouche-PC
Name: konsole
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Window 0x2400012:
Machine: ychaouche-PC
Name: konsole
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Window 0x4e00001:
'' Command: /opt/libreoffice7.0/program/soffice
Window 0x26000a1:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Quote:
Window 0x4400058:
Machine: ychaouche-PC
Name: vlc
Command: vlc
Instance/Class: vlc/Vlc
Window 0x2600487:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: plasma-desktop/Plasma-desktop
Window 0x3000014:
Machine: ychaouche-PC
Name: kmix
Command: /usr/bin/kmix
Instance/Class: kmix/Kmix
Window 0x1800001:
Machine: ychaouche-PC
Name: Firefox
Icon Name: firefox
Command: firefox
Instance/Class: firefox/Firefox
Window 0x3200001:
Machine: ychaouche-PC
Name: Thunderbird
Icon Name: thunderbird
Command: thunderbird
Instance/Class: thunderbird/Thunderbird
Window 0x1600001:
Machine: ychaouche-PC
Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Icon Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Command: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Instance/Class: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin//home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Window 0x3400001:
Machine: ychaouche-PC
Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Icon Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Command: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Instance/Class: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin//home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Window 0x3e00001:
Machine: ychaouche-PC
Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Icon Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Command: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Instance/Class: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin//home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Window 0x4a00001:
Machine: ychaouche-PC
Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Icon Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Command: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Instance/Class: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin//home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Window 0x3c00001:
Machine: ychaouche-PC
Name: emacs
Icon Name: emacs
Command: emacs
Instance/Class: emacs/Emacs
Window 0x4200001:
Machine: ychaouche-PC
Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Icon Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Command: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Instance/Class: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin//home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Window 0x4800001:
Machine: ychaouche-PC
Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Icon Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Command: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Instance/Class: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin//home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Window 0x4c00001:
Machine: ychaouche-PC
Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Icon Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Command: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Instance/Class: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin//home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Window 0x3600001:
Machine: ychaouche-PC
Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Icon Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Command: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Instance/Class: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin//home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Window 0x3a00001:
Machine: ychaouche-PC
Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Icon Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Command: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Instance/Class: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin//home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Window 0x4000001:
Machine: ychaouche-PC
Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Icon Name: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Command: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Instance/Class: /home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin//home/ychaouche/DOWNLOADS/APPS/firefox/firefox-bin
Window 0x2400050:
Machine: ychaouche-PC
Name: <unknown type COMPOUND_TEXT (363) or format 8>
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Window 0x240006d:
Machine: ychaouche-PC
Name: <unknown type COMPOUND_TEXT (363) or format 8>
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Window 0x2400047:
Machine: ychaouche-PC
Name: <unknown type COMPOUND_TEXT (363) or format 8>
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Window 0x2400064:
Machine: ychaouche-PC
Name: <unknown type COMPOUND_TEXT (363) or format 8>
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Window 0x240005b:
Machine: ychaouche-PC
Name: <unknown type COMPOUND_TEXT (363) or format 8>
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Window 0x240003d:
Machine: ychaouche-PC
Name: <unknown type COMPOUND_TEXT (363) or format 8>
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Window 0x2400079:
Machine: ychaouche-PC
Name: <unknown type COMPOUND_TEXT (363) or format 8>
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Quote:
Window 0x4400011:
Machine: ychaouche-PC
Name: Track10.mp3 - VLC media player
Command: vlc
Instance/Class: vlc/Vlc
Window 0x260012b:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: Plasma/Plasma
Window 0x240001d:
Machine: ychaouche-PC
Name: <unknown type COMPOUND_TEXT (363) or format 8>
Command: /usr/bin/konsole
Instance/Class: konsole/Konsole
Window 0x2600122:
Machine: ychaouche-PC
Name: plasma-desktop
Command: /usr/bin/plasma-desktop
Instance/Class: Plasma/Plasma
Window 0x3000028:
Machine: ychaouche-PC
Name: KDE Mixer - Playback Devices
Command: /usr/bin/kmix
Instance/Class: kmix/Kmix
ychaouche#ychaouche-PC 08:13:04 ~ $
 
Old 03-10-2021, 01:26 AM   #7
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369

Original Poster
Blog Entries: 1

Rep: Reputation: 49
I found the solution given in the question itself (using _NET_WM_PID)
to work pretty well so far. Tested it on konsole, vlc, emacs, systemconfig,
libreoffice and firefox. All reported their PID. Until I find an exception,
I'll probably stick with that !

Thanks for the links guys
 
Old 03-10-2021, 02:10 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,996

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
that was what I posted.....
anyway, this is finally solved.
 
Old 03-10-2021, 03:32 AM   #9
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369

Original Poster
Blog Entries: 1

Rep: Reputation: 49
Quote:
Originally Posted by pan64 View Post
that was what I posted.....
anyway, this is finally solved.
Thank you pan64 I saw your post and link. The stackexchange link
mentioned that the author didn't want to rely on _NET_WM_PID
though, because he thinks some apps might not set.

It's always interesting to see the many ways you can implement the
solution based on the same data. Here's what I came up with :

Code:
alias wid='xprop | (pid=$(command grep PID); echo ${pid##*=}) | xargs ps'
usage :
Code:
ychaouche#ychaouche-PC 10:31:11 ~ $ wid <click>
  PID TTY      STAT   TIME COMMAND
 9531 ?        Sl     0:26 /usr/bin/xchat
ychaouche#ychaouche-PC 10:31:16 ~ $
 
Old 07-21-2022, 08:00 AM   #10
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369

Original Poster
Blog Entries: 1

Rep: Reputation: 49
Arrow

Quote:
Originally Posted by ychaouche View Post
Code:
alias wid='xprop | (pid=$(command grep PID); echo ${pid##*=}) | xargs ps'
I shouldn't need that xargs, what do you guys think of

Code:
ps $(xprop | (pid=$(command grep PID); echo ${pid##*=}))
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does root belong to all groups - Permissions Question Cocytus1 Linux - Newbie 4 04-26-2008 03:50 PM
SMP system :how to know which CPU a process belong to ? hhshr825 Linux - Newbie 4 01-11-2008 02:04 AM
does this question belong here? usrlinux Linux - Newbie 6 03-19-2007 06:22 AM
what package does a program belong to? eantoranz Ubuntu 4 08-11-2005 03:28 PM
What the hell??? The directory /home does not belong to you! raid517 Linux - Software 2 04-23-2005 05:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration