Skip to main content

What is Wayland?

To understand how your Linux desktop appears on screen in ADL, you need to understand display protocols -- the systems that let applications draw windows, buttons, and text on your display. This page explains what display protocols are, compares the two main ones (X11 and Wayland), and clarifies why ADL uses X11 despite the name "Termux:X11."

What is a Display Protocol?โ€‹

A display protocol is a set of rules that governs how applications communicate with the display server -- the software responsible for putting pixels on your screen.

Think of it this way:

  • Applications are people who want to put up posters
  • The display server is the person who controls the bulletin board
  • The display protocol is the language they use to communicate ("put my poster here," "make it this size," "someone clicked on my poster")

Without a display protocol and a display server, your applications would have no way to show anything visual. The terminal would be all you have.

RoleWhat It DoesADL Example
ApplicationWants to display a windowFirefox, Thunar, Mousepad
Display protocolRules for communicationX11 (used by ADL)
Display serverManages the screen and inputTermux:X11
Window managerArranges and decorates windowsxfwm4 (part of XFCE)

X11: The Established Standardโ€‹

X11 (also called the X Window System, or simply X) is a display protocol created in 1984 at MIT. It has been the standard way to display graphical applications on Linux for nearly four decades.

How X11 Worksโ€‹

X11 uses a client-server model:

  1. The X server runs on the machine with the display (in ADL, this is Termux:X11)
  2. X clients (applications) connect to the X server and send drawing commands
  3. The X server renders everything on screen and sends input events (keyboard, mouse) back to the applications

Strengths of X11โ€‹

  • Mature and stable -- nearly 40 years of development and bug fixes
  • Widely supported -- virtually every Linux application supports X11
  • Network transparency -- applications can run on one machine and display on another
  • Well-understood -- extensive documentation and tooling

Weaknesses of X11โ€‹

  • Security model is outdated -- any X11 application can see and interact with any other application's windows (keylogging, screenshot capture)
  • Complex codebase -- decades of features have made the protocol large and complex
  • Compositing is bolted on -- visual effects like transparency and shadows were added later, not designed in
  • Screen tearing -- synchronizing display updates can be inconsistent

Wayland: The Modern Replacementโ€‹

Wayland is a newer display protocol started in 2008, designed from scratch to replace X11. It addresses many of X11's architectural problems.

How Wayland Differsโ€‹

AspectX11Wayland
Age19842008
ArchitectureSeparate server and compositorServer and compositor combined
SecurityApps can see other apps' windowsApps are isolated from each other
PerformanceGood, with some overheadBetter, more direct rendering
Screen tearingPossibleEliminated by design
Network transparencyBuilt inNot built in (requires extra tools)
Application supportUniversalGrowing (most major apps support it)
ComplexityVery complex protocolSimpler, more modern design

Where Wayland Stands Todayโ€‹

On desktop Linux PCs, Wayland is becoming the default. GNOME and KDE Plasma on recent versions of Ubuntu, Fedora, and other distributions use Wayland by default. However, some applications and tools still work better with X11, and the transition is ongoing.

Why ADL Uses X11โ€‹

Here is where it gets confusing: the ADL display app is called Termux:X11, and it uses the X11 protocol. This might seem backward when Wayland is the newer technology, but there are good reasons.

Reason 1: Compatibilityโ€‹

X11 has near-universal application support. Every Linux desktop application, old or new, supports X11. Wayland support is widespread but not complete. Using X11 means you will never encounter an application that refuses to display.

Reason 2: Architecture Fitโ€‹

Termux:X11 works by running an X11 server inside an Android app. Applications running in the proot Ubuntu environment connect to this server to display their windows. This client-server model maps naturally to the ADL architecture, where the display (Android) and the applications (Ubuntu in proot) are in separate environments.

Reason 3: Maturity in prootโ€‹

Wayland compositors have specific kernel requirements (DRM/KMS access for direct rendering) that are not available inside a proot environment. X11's user-space rendering model works within proot's constraints without needing special kernel features.

โ„น๏ธNote

The name "Termux:X11" accurately describes what the app does -- it is an X11 server that runs as a Termux companion app. Despite Wayland being the future direction for desktop Linux, X11 remains the practical choice for the ADL use case. You do not need to worry about missing out on Wayland features. The desktop experience through Termux:X11 is complete and functional.

The DISPLAY Variableโ€‹

When you launch the ADL desktop, an environment variable called DISPLAY is set. This tells applications where to find the X11 server.

In ADL, this is typically set to:

$export DISPLAY=:0

This means "connect to the X11 server on display number 0 on the local machine." Termux:X11 listens on this display, and all graphical applications use it to show their windows.

If your desktop is not appearing, the DISPLAY variable being unset or wrong is one of the most common causes.

๐ŸšซCommon Mistake

If you see errors like "cannot open display" or "no display specified," it usually means the DISPLAY environment variable is not set or Termux:X11 is not running. Make sure Termux:X11 is open on your phone and that your launch script sets the DISPLAY variable before starting the desktop environment.

VNC as an Alternativeโ€‹

Some ADL users use VNC (Virtual Network Computing) instead of Termux:X11. VNC is a different approach:

FeatureTermux:X11VNC
PerformanceBetter (shared memory)Slower (network-based, even locally)
Input handlingNative Android inputTranslated through VNC client
ResolutionMatches device/monitorConfigurable, may need manual setup
Setup complexitySimpler with ADL scriptsMore configuration required
SoundSeparate (PulseAudio)Separate (PulseAudio)

For most users, Termux:X11 provides the better experience.

โ“Frequently Asked Questions
Should I switch to Wayland?
No. In the ADL environment, X11 through Termux:X11 is the supported and recommended display method. Wayland compositors have requirements that are difficult to meet inside proot. Stick with X11 for a reliable experience.
Will Termux:X11 be replaced by a Wayland solution?
There is ongoing experimentation with Wayland in the Termux ecosystem, but there is no production-ready replacement for Termux:X11 at this time. If a Wayland solution becomes viable, the ADL documentation will cover the transition.
Is X11 insecure?
X11's security model allows applications to observe each other, which is a concern on shared or public systems. In the ADL context, all applications are running in your personal proot environment on your own phone, so this is not a practical security issue. You control everything running on the display.

Summaryโ€‹

Display protocols are the communication systems that let applications show graphics on your screen. X11 is the established protocol with decades of support, while Wayland is the modern replacement gaining adoption on desktop Linux. ADL uses X11 through the Termux:X11 app because it offers universal compatibility, fits naturally into the proot architecture, and works reliably without special kernel features. For ADL users, X11 provides a complete, functional desktop display.

Next: Learn about PulseAudio, which handles audio routing between your Linux desktop and your phone.

For detailed Termux:X11 setup and configuration, see the Termux:X11 guide.