.. title: #8 How to find which process is behind a linux windows
.. slug: 8-how-to-find-which-process-is-behind-a-linux-windows
.. date: 2023-03-12 11:52:45 UTC+01:00
.. tags: linux, bash, howto
.. category: 
.. link: 
.. description: 
.. type: text

How to find which process is running behind a windows ?
=========================================================

..    include:: <isonum.txt>

.. image:: /images/uni-legowelt-interlakenM.jpg

painting made by Legowelt


.. media:: https://www.youtube.com/watch?v=ZFywZyiwrw4

First get PID of the window with **xprop** - property displayer for X ::

    `xprop _NET_WM_PID | sed 's/_NET_WM_PID(CARDINAL) = //'`

Then use this command as parameter of "ps -q" :

:: 

    # ps eaux -q `xprop _NET_WM_PID | sed 's/_NET_WM_PID(CARDINAL) = //'` 


    USER         PID   %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    nafofella    4100  0.0  0.1 640560 61180 ?        Sl   09:17   0:07 xfce4-terminal LANGUAGE=en_US USER=nafofella LC_TIME=en_US.UTF-8
    

