-2

Does an X client process always have one or more GUI window(s)?

Conversely, if a process has one or more GUI window(s), is it an X client process?

Does an X client never have a controlling terminal? Does the concept of "controlling terminal" only apply to processes which have no GUI window?

Thanks.

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Tim
  • 101,790
  • 5
    An X client does not need to open a window; there are many utilities, e.g., xdpyinfo or xwininfo, which talk to the X server but don't open windows. A process which use a GUI window to interact with the user may or may not be an X client, depending on what mechanism is uses to use that window. For example, a shell uses a terminal emulator window to interact with the user, but it's not an X client. An X client may or may not have a controlling terminal; for example, run xclock from the command line in a terminal emulator, and press Ctrl-C to check whether xclock terminates or not. – AlexP Dec 05 '18 at 12:44
  • 4
    Not to mention that on some moderny Linux distributions there are many graphical programs which don't use X at all, because for example they use Wayland. – AlexP Dec 05 '18 at 12:47
  • @AlexP Thanks. I'd appreciate if you could also consider https://unix.stackexchange.com/questions/491161/does-a-x-client-necessarily-need-a-window-manager-to-work – Tim Dec 27 '18 at 16:37
  • No, a window manager is not needed; for example, Xterm works just fine without a window manager. A window manager is needed if you want to have a uniform way to move and resize windows. In the old days, when things were simple, it was quite common to see, for example, an Xterm window with no decoration. – AlexP Dec 27 '18 at 16:54
  • Thanks. @AlexP Another question: are X clients and GUI programs the same concept? While a X client doesn't necessarily have a window, a GUI program process seems to me must have at least one window because "G" stands for "graphical", correct or wrong? Also see https://unix.stackexchange.com/q/491209/674 – Tim Dec 27 '18 at 23:34
  • Some Linux (and, in general, Unix-like) systems use other means of displaying graphics. Wayland is gaining popularity, for instance; a program can use the Wayland protocol and never talk to an X sever. Small embedded systems may use the Direct Rendering Manager kernel subsystem. Not to mention that Graphical User Interfaces exist on operating systems, such as Windows or Mac OS, which have nothing to do with X; that is, the term GUI is much more general. – AlexP Dec 28 '18 at 00:03
  • G just means graphical, not window, even with kernel-implemented tty, you can still operate framebuffer to display video files, using ffmpeg, do you consider that as GUI program?

    While X client is a process who connect to an X server(locally or remotely), which is much more clearly defined.

    The key point is, the concept of "window" depends on the window system, including waylang server, Xorg, xvnc, window system of OS X or MS Windows.

    – 炸鱼薯条德里克 Dec 28 '18 at 01:58

1 Answers1

2

AlexP commented:

An X client does not need to open a window; there are many utilities, e.g., xdpyinfo or xwininfo, which talk to the X server but don't open windows. A process which use a GUI window to interact with the user may or may not be an X client, depending on what mechanism is uses to use that window. For example, a shell uses a terminal emulator window to interact with the user, but it's not an X client. An X client may or may not have a controlling terminal; for example, run xclock from the command line in a terminal emulator, and press Ctrl-C to check whether xclock terminates or not.

Not to mention that on some moderny Linux distributions there are many graphical programs which don't use X at all, because for example they use Wayland.

Tim
  • 101,790
  • Not a quite good example to mention shell, because it doesn't really involve or know the concept of window, it uses psuedo-terminal devices, which is quite different from the common window concept of human cognition. [Things on MS Windows is much more different, where console is an actual window mananged by the window system(and conhost.exe)] – 炸鱼薯条德里克 Dec 28 '18 at 02:10