Distingushing X process in all the system processes - Xwindows

This is a discussion on Distingushing X process in all the system processes - Xwindows ; Hello, How can I distinguish the X related proccesses (X server or X clients) among the all processes in the system? For example, I think the follows are some candidate to distinguish the X related processes: 1) They use specific ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Distingushing X process in all the system processes

  1. Distingushing X process in all the system processes

    Hello,

    How can I distinguish the X related proccesses (X server or
    X clients) among the all processes in the system?

    For example, I think the follows are some candidate to distinguish
    the X related processes:

    1) They use specific system calls to manupulate the display.
    (Ex: XFlush to flush out the request buffer in X client.)
    2) Specific network port number(or UNIX domain sockets) is
    used to communicate between X server and X clients.
    3) They refer specific environmental variables such as DISPLAY.

    What do you think of this?

    Any ideas?


  2. Re: Distingushing X process in all the system processes

    On 13 Dec 2006 00:08:07 -0800, "Seongsu Lee" wrote:

    >Hello,
    >
    >How can I distinguish the X related proccesses (X server or
    >X clients) among the all processes in the system?
    >
    >For example, I think the follows are some candidate to distinguish
    >the X related processes:
    >
    > 1) They use specific system calls to manupulate the display.
    > (Ex: XFlush to flush out the request buffer in X client.)


    No, XFlush is not a system call proper.

    > 2) Specific network port number(or UNIX domain sockets) is
    > used to communicate between X server and X clients.


    No, a client could communicate with the server over ssh.

    > 3) They refer specific environmental variables such as DISPLAY.


    No, DISPLAY is a facility, but can well be not set, in which case the
    applications have to use -display. Or whatever.

    >
    >What do you think of this?
    >
    >Any ideas?


    Most modern 'nix systems use shared libs, so any process mapping to
    libX11.so is likely to be a potential X client - but it just might not
    be connected (eg a movieplayer that is both vga and X11 capable).

    Identifying the X server is a little trickier because it does NOT
    dynaload libX11 (at least on Linux). But if you are on Linux, the
    directory /proc//fd will contain a symlink 0 ->
    /var/log/XFree86.0.log or something similar.

+ Reply to Thread