-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.

  • 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 5 '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 5 '18 at 12:47
  • @AlexP Thanks. I'd appreciate if you could also consider unix.stackexchange.com/questions/491161/… – 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 unix.stackexchange.com/q/491209/674 – Tim Dec 27 '18 at 23:34
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.

  • 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 2:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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