Language Selection

English French German Italian Portuguese Spanish

X Factor - understanding the X window system

Filed under

X was originally created in the mid-80s by a research group from MIT. Its goal was to create a windowing system quite unlike any that had been conceived before. Thus X's design differs greatly from that of other windowing systems, having designed-in support for many elements which are unique ­ features which in fact are nowadays often being hacked into other windowing systems.

More often than not, such attempts are kludgy and don't work well, because they lack the ground-up desig X offers.

X went through a number of iterations because the original releases were not under a copyleft license. Every Unix developer created his own version, usually only modifying small parts, resulting in divergence into many incompatible versions, most of which fell under proprietary licences.

As a result, a standards body was eventually created to oversee the development of X. This body, known as the X Consortium, includes amongt its members IBM, Hewlett Packard and even Microsoft.

The X server has two important functions. Firstly, it speaks to the hardware; this means the X server needs to contain the driver for your graphics card, mouse, keyboard etc. Secondly, it speaks to X clients (every X program, from xterm to is an X client). Thus no X client ever talks directly to the hardware.

The most common channel is Unix Domain Sockets (UDS, a very fast mechanism for interprocess communication on Unix) which provides the highest speeds for local usage (for example where the X server and X clients are on the same machine). However it can also run over several network protocols, such as TCP/IP, allowing you to use your local X server to run a program on a distant machine over the Internet.

Luckily, working directly with the X protocol is seldom needed because X also provides xlib. Xlib is essentially a library of standard X tasks, such as basic drawing primitives and event handling. Xlib is written in C (with wrappers to many languages) and it in turn speaks to the X protocol for you. Xlib takes care of the low-level detail part of using the X protocol, such as establishing a connection over the appropriate channel and talking to the server.

Today the two most important widget sets in the Linux world are GTK and QT respectively. Their importance is greatly enhanced by the fact that these are the two toolkits on which the Gnome and KDE desktops are respectively built. Many other widget sets exist, and although none are as feature-rich as GTK or QT, they are still often used.

The two most important desktop environments today are of course KDE and Gnome, as most new Linux applications are built for one or the other. Currently KDE and Gnome basically match each other for features and which one a user prefers tend to be a matter of taste rather than a technical decision. Almost all Linux users use one of these two. Old-time Unix users and programmers often shun them however, preferring minimalist desktops.

Full Article.

More in Tux Machines

Leftovers: OSS

  • Video: PBS Pro Workload Manager Goes Open Source
  • Turris Omnia: high-security, high-performance, open-source router
    An Indigogo campaign was recently launched for the Turis Omnia, promising backers a high-security, high-performance, open-source router. “With powerful hardware, Turris Omnia can handle gigabit traffic and still be able to do much more,” the company said. “You can use it as a home server, NAS, printserver, and it even has a virtual server built-in.”
  • IBM SystemML Machine Learning Technology Goes Open-Source
  • PuppetLabs Introduces Application Orchestration
    Everybody loves Puppet! Or at the very least, an awful lot of people USE Puppet and in the IT world, “love” is often best expressed by the opening of one’s wallet. I know, in the FOSS world wallets are unnecessary, and Puppet does indeed have an Open Source version. However, once one gets to enterprise-level computing, a tool designed for enterprise scale is preferable and usually there is a cost associated. Puppet was originally started as an open source project by Luke Kanies in 2005, essentially out of frustration with the other configuration management products available at the time. Their first commercial product was released in 2011, and today it is the most widely used configuration management tool in the world with about 30,000 companies running it. According to our own surveys, better than 60% of Linux Journal readers use some form of Puppet already and you must like it too as it regularly finishes at or near the top in Readers’ Choice awards.

today's howtos

Ubuntu 16.04 LTS Continues To Focus On The Linux 4.4 Kernel

Ubuntu's kernel team continues to be focused on having Linux 4.4 for Ubuntu 16.04. Linux 4.4 is their target for the "Xenial Xerus" since Ubuntu 16.04 is to be a Long-Term Support release and the upstream 4.4 kernel is also being maintained as a long-term release too. Additionally, Linux 4.5 would come too close to the April debut of Ubuntu 16.04 that the developers wouldn't feel comfortable, particularly for an LTS release. Read more

Will Steam Machine Solve Linux’s Gaming Woes?

The Steam machine is now publicly on sale as of last week, but it’s not off to the best start. A couple of weeks ago, Ars Technica compared the performance of games when running on Valve’s Linux based SteamOS and Windows 10. Six Valve games were tested on a single machine and results showed a 21 to 58 percent frame rate drop when running on Linux. While only six games were tested out of an entire collection of around 1,800 available titles, the games used Valve’s own Source engine, which is designed for Linux and SteamOS. Valve had previously stated that Steam games run faster on Linux, so it was expected that any of Valve’s own Source engine games would run smoothly. Read more