Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When i run xprop -id <wid> on a given windows id for an opengl application (Ubuntu 12.04) i get a bunch of properties, but i don't see _NET_WM_PID;

$ xprop -id 0x4a00002 
_NET_WM_ICON_GEOMETRY(CARDINAL) = 0, 488, 64, 65
XKLAVIER_STATE(INTEGER) = 0, 0
_NET_WM_FULLSCREEN_MONITORS(CARDINAL) = 4294967295, 1852143205, 19456, 1645412352
_NET_WM_STATE(ATOM) = 
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
_NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 28, 1
_NET_WM_DESKTOP(CARDINAL) = 0
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
WM_LOCALE_NAME(STRING) = "C"
WM_HINTS(WM_HINTS):
        Initial state is Normal State.
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        user specified location: 50, 50
        user specified size: 640 by 480
WM_CLIENT_MACHINE(STRING) = "gliese-581h"
WM_ICON_NAME(STRING) = "Full-Screen & Windowed Mode"
WM_NAME(STRING) = "Full-Screen & Windowed Mode"

how do i access the process pid associated to the window id?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

It's there for windows which support it:

$ xprop -id 0x0540019c| grep _NET_WM_PID
_NET_WM_PID(CARDINAL) = 25685

But not all do:

$ xprop -id 0x2000006| grep _NET_WM_PID
$

As far as I know there is no way to access the PID for such a window.

share|improve this answer
    
fair enough. What is the cause of the difference? the application in question is a freeglut sample. Is there something api-wise that a good linux citizen application needs to do in order to have its PID set? Is there something i can do at application-launch so that the PID is set? like setting the x property by an external process? –  lurscher Nov 23 '12 at 21:59
    
I don't know. From some short tests it seems that all OpenGL windows don't support _NET_WM_PID. –  Florian Diesch Nov 23 '12 at 22:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.