36

I'm reading Wikipedia about X11 and it says that:

In its standard distribution it is a complete, albeit simple, display and interface solution which delivers a standard toolkit and protocol stack for building graphical user interfaces on most Unix-like operating systems...

But later it says that:

X primarily defines protocol and graphics primitives - it deliberately contains no specification for application user-interface design, such as button, menu, or window title-bar styles.

So, does X11 provide widgets like a button or a window panel/frame, etc or not? What is a graphic primitive? What does X11 provide exactly?

It is also stated that:

X does not mandate the user interface; individual client programs handle this. Programs may use X's graphical abilities with no user interface.

What does this mean?

Hidden
  • 547
  • 7
    I think you should probably go to the conversation page corresponding to that page in Wikipedia and start a conversation aiming for the authors to clarify their article. – RealSkeptic Apr 13 '16 at 12:47
  • 1
    Wikipedia is great, but it caters "power-users" first and tend to give detailed information first instead of short and concise answers first, then detailed informations. – X.LINK Jun 29 '21 at 12:04
  • 1
    X11 is also a OSI level 7 protocol ie the format of the datastream over the network and its semantics. An application can be programmed using libX11 or libxcb directly (a basic low level programming API for a GUI.) libX11 uses the network format to communicate with a server ie a program having command of a screen and access to a data stream from keyboard(s) and mouse(s.) libXt is a library which together with a number of widgets implements a more high-level API. The older versions of Gtk replaces libXt but depends on libX11 - it doesn't communicate directly with the server. – Stefan Skoglund Jun 29 '21 at 18:39
  • @Stefan Skoglund But if an application does what you say - using libX11 or libxcb - then aren't they simply using X's internal fallback libraries to build their user interface ? The statement Programs may use X's graphical abilities with no user interface clearly implies the absurd scenario of an app without any user interface seeking to use X . . . – Trunk Jul 15 '21 at 13:03
  • I've edited the absurd sentence in the Wikipedia page. Feel free to improve it. – Trunk Jul 15 '21 at 13:12
  • @Trunk: xset is a cli program to modify the behaviour of the server so is xmodmap. xev is another only CLI program but it allows a user/programmer to see what events/messages is sent to a client process from the server (in OSI terms level 7 in the stack. Level 6 could then be negotiation of encryption and or bit order etc. xset and xmodmap is the simplest programs possible to correctly thru entry point (functions) in libX11 (an API for sending and receiving messages to and from the server) to generate a correct X11 datastrem to the server. – Stefan Skoglund Jul 19 '21 at 12:56
  • @Stefan Skoglund You restored the absurd sentence to how it was. That's just great, Skoglund. Don't sort anything out - just shore it up. – Trunk Jul 19 '21 at 13:12
  • My point is that some programs written using the X11 datastream protocol isn't long running. They do one thing only and then its good and done. xkill is another such program (though the window to be destroyed can selected using a mouse.) Though you are right that xset/xmodmap doesn't use graphical contexts ie environments/resources which is necessary to create graphics in any way. xkill can need graphical contexts. – Stefan Skoglund Jul 19 '21 at 13:18
  • Graphical contexts is in X11 the resource(s) which is necessary to generate graphics. – Stefan Skoglund Jul 19 '21 at 13:19
  • xset and xmodmap only needs a connection and the authorization to use it. Then its only a few packets. – Stefan Skoglund Jul 19 '21 at 13:20
  • Though, which wiki page ? – Stefan Skoglund Jul 19 '21 at 13:21
  • IN the summary i added an link to MVS and a link in the references to IBM's description of communications services in z/OS (YES it is entirely possible to build emacs (or other x11 applications) on z/OS and allow them to connect with a server.) Could you help me getting the MVS as a note into the ref ? – Stefan Skoglund Jul 19 '21 at 13:36

4 Answers4

44

Like many words, “X11” can have multiple meanings.

“X11” is, strictly speaking, a communication protocol. In the sentences “X primarily defines protocol and graphics primitives …” and “X does not mandate the user interface …”, that's what X refers to. X is a family of protocols, X11 is the 11th version and the only one that's been in use in the last 25 years or so.

The first sentence in your question refers to a software distribution which is the reference implementation of the X11 protocol. The full name of this software distribution is “the X Window System”. This distribution includes programs that act as servers in the X11 protocol, programs that act as clients in the X11 protocol, code libraries that contain code that makes use of the X11 protocol, associated documentation, resources such as fonts and keyboard layouts that can be used with the aforementioned programs and libraries, etc. Historically, this software distribution was made by MIT; today it is maintained by the X.Org Foundation.

The X11 protocol allows applications to create objects such as windows and use basic drawing primitives (e.g. fill a rectangle, display some text). Widgets like buttons, menus, etc. are made by client libraries. The X Window System includes a basic library (the Athena widget set) but most applications use fancier libraries such as GTK+, Qt, Motif, etc.

Some X11 programs don't have a graphical user interface at all, for example command line tools such as xset, xsel and xdotool, key binding programs such as xbindkeys, etc. Most X11 programs do of course have a GUI.

  • xset is just a CLI command to set mouse, screen and sound parameters for the X Window System. xsel and xdotool are not installed by default and just seem to do on the CLI what is usually done via GUI. I doubt if these are what the Wikipedia page author had in mind when they wrote the absurd sentence.To me, it's more likely to refer to the internal X Athena library and applications that build a basic GUI with this. Though not proprietary, this is still a user interface and will therefore need X. So the sentence - not unusually for IT documentation - remains absurd ! – Trunk Jul 15 '21 at 13:38
  • @Trunk Do you mean, "Programs may use X's graphical abilities with no user interface."? I think this may refer to e.g. the fact that programs can just draw directly into a window without using a toolkit library (Athena, GTK+, Qt, etc.). A classic example is Xeyes. There are also programs that draw on the root window (although for various reasons, that no longer has a visible effect with some modern desktop environments). Depending on whether you still count those as having a UI, the sentence may or may not be reasonable. – ddawson Jul 19 '21 at 13:51
8

X11, aka X.org Foundation Windowing is basically used by other desktop environments like KDE and GNOME, among many others, to provide the abstract interface to managing a GUI. Without relying on X, KDE/GNOME/others would have to write the code to do low-level coding things themselves. Instead, KDE/GNOME communicate back and forth with X (it runs as a server process that 'clients' connect to).

  • 2
    Also this help explain it, as well as provide some insight into why Wayland and other X replacements are being built: http://www.art.net/~hopkins/Don/unix-haters/x-windows/disaster.html – cmaceachern Apr 13 '16 at 13:42
  • 1
    That is a rant. – Stefan Skoglund Feb 29 '20 at 21:02
  • And it also in another way explains Ken Olsen's characterization of UNIX as snake oil peddler's products, but that IS capitalism ! The claim is design for MOTIF and run everywhere, nowadays it's more like design for MS windows and run everywhere (this a monopoly not a market.) Ken Olsen knew very well that design-for-MOTIF and run-on-everything is not in the producers interest - ergo it won't really happen. – Stefan Skoglund Feb 29 '20 at 21:06
  • Unfortunately this answer starts by conflating concepts: "X11, a.k.a. X.org Foundation Windowing". Gilles' answer explains how they're different from each other, which is the core of the question. – Quasímodo Apr 30 '21 at 22:09
4

Some concepts:
- X Windows System Windowsing system. (make it possible for moving windows on display device and interacting with mouse and keyboard)
- X.Org Server An open-source implementation of X Windows System by X.Org Foundation.
- xterm terminal emulator for X Windows System.
- X Client: an application runs on an X server. X windows system requires the clients and server to operate separately. Applications, such QT, GTK and other X clients need the cooperation from X server to work successfully.

Previously, I also feel very confused on this problem. Initially, I installed linux system aside with windows, for many times I encountered issues with Xorg errors.
Recently, I use xclip on remote server. The software needs an environment variable DISPLAY to be set, which is not the case in my remote server. There is no monitor, mouse or keyboard, and the variable is managed by X server.

1

The X11 window system's different server programs (the process controlling the device ie the screen(s) with kbd(s) and mouse(s)) can support extensions to the normal X11 on the wire format. Wire format: my wording for the different types of messages which can be transported over IP (nothing prevents transporting X11 messages over IBM's SNA for example) between a client process running on a machine and the server program.

One extension to an X11 server program is DisplayPostScript.

The usage of DisplayPostscript in NeWS (Sun/Sony) meant that the server had a complete and rather nice (Display)Postscript support built in. This support could be expoloited by a client program to run postscript programs directly inside the server.

This could be employed by for example oil exploration programs to with the same API as if the device were a high-end photosetter/printer, display results on the scientist's display (CRT)

Adobe hasn't erased DisplayPostScript (July 2021) from its systems so read :

Stefan Skoglund
  • 453
  • 3
  • 5