<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>X Window on Ivon's Blog</title><link>https://ivonblog.com/en-us/tags/x-window/</link><description>Recent content in X Window on Ivon's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</managingEditor><webMaster>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</webMaster><copyright>You are welcome to share articles of Ivon's Blog (ivonblog.com). Please include the original URL when citing articles, and abide by CC BY-NC-ND 4.0 license. For commercial use, please write an e-mail to me.</copyright><lastBuildDate>Mon, 26 Jan 2026 23:00:00 +0800</lastBuildDate><atom:link href="https://ivonblog.com/en-us/tags/x-window/index.xml" rel="self" type="application/rss+xml"/><item><title>Comparing X11 and Wayland. It Is 2026: Should You Switch to Wayland and Abandon the X Window System?</title><link>https://ivonblog.com/en-us/posts/should-you-switch-to-wayland/</link><pubDate>Mon, 26 Jan 2026 23:00:00 +0800</pubDate><author>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</author><guid>https://ivonblog.com/en-us/posts/should-you-switch-to-wayland/</guid><description>&lt;!-- Co-translated by ChatGPT --&gt;
&lt;p&gt;In this article, Ivon wants to discuss the development status of the &amp;ldquo;X Window System&amp;rdquo; and &amp;ldquo;Wayland&amp;rdquo; on Linux systems, talk about Wayland&amp;rsquo;s pros and cons, and help you decide whether you should switch to Wayland. At the end, I also list the Linux distributions that let you experience the newest Wayland technology the fastest.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/should-you-switch-to-wayland/images/title.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="1655"
 height="930"&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Things are changing. The Linux community often discusses whether we should abandon X11 and switch to a Wayland session. So, what is X11? What is Wayland?&lt;/p&gt;
&lt;p&gt;The X Window System is a set of software that determines how images are displayed on your Linux computer, but it is too old and has many problems. Now there is software that adopts the Wayland protocol, aiming to replace this old software with modern code. However, because Wayland has had problem after problem, even though more and more Linux distributions are adopting it, after more than a decade of development the X Window System still cannot be completely replaced.&lt;/p&gt;
&lt;p&gt;Below, let us examine the current state of X11 and Wayland.&lt;/p&gt;

&lt;h2 class="relative group"&gt;1. The Opportunity for Change: Comparing X11 and Wayland
 &lt;div id="1-the-opportunity-for-change-comparing-x11-and-wayland" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-the-opportunity-for-change-comparing-x11-and-wayland" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The X Window System and Wayland are both sets of software responsible for displaying graphics on Linux. As for comparing their underlying principles, I am too limited in learning to embarrass myself here; there are already plenty of resources online, and the &amp;ldquo;Further Reading&amp;rdquo; section at the end has many interesting articles you can read in detail. Here I will briefly summarize my personal understanding.&lt;/p&gt;
&lt;p&gt;The X Window System, abbreviated as X, was born earlier than Linux. The X Window System appeared in 1987 and was used to display graphical environments. That was still the age of Unix! By now it already has more than 30 years of history.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/should-you-switch-to-wayland/images/X11.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="256"
 height="256"&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Why does Linux need to &amp;ldquo;install&amp;rdquo; the X Window System before it has a graphical display? Because the Linux kernel really does not include software for displaying graphics.&lt;/p&gt;
&lt;p&gt;The desktop environments Linux users see, such as GNOME, KDE Plasma, and XFCE, do not directly control the screen. Instead, they are built on top of the graphical display mechanism provided by the X Window System. The X Window System is responsible for the lowest-level window display and input events, while the desktop environment is responsible for the user interface and operating experience.&lt;/p&gt;
&lt;p&gt;Here, the X Window System became the common low-level standard followed by various desktop environments.&lt;/p&gt;
&lt;p&gt;At the beginning, the designers only defined the X communication protocol standard; they did not specify X&amp;rsquo;s implementation in detail, so different X window software projects appeared. Around 2000, the X.org software developed by the X.org organization replaced XFree86 and gradually became the accepted standard. APIs and the like were all defined by them. X.org was therefore adopted by major desktop environments. Because the X protocol adopted by X.Org is version X11, the X server they developed is also called X11.&lt;/p&gt;
&lt;p&gt;The reason the X Window System is called a server is that it can accept simultaneous connections from multiple X clients. This is a &amp;ldquo;client-server architecture,&amp;rdquo; echoing the needs of the old mainframe era, and it communicates through Network Transparency. See the diagram below for the principle.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/should-you-switch-to-wayland/images/x-architecture.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="533"
 height="507"&gt;&lt;/figure&gt;&lt;/p&gt;</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://ivonblog.com/en-us/posts/should-you-switch-to-wayland/featured.webp"/></item><item><title>XLibre Intends to Replace X.Org X Server. Why Has It Caused Controversy?</title><link>https://ivonblog.com/en-us/posts/xlibre-x-server-introduction/</link><pubDate>Mon, 26 Jan 2026 04:00:00 +0800</pubDate><author>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</author><guid>https://ivonblog.com/en-us/posts/xlibre-x-server-introduction/</guid><description>&lt;!-- Co-translated by ChatGPT --&gt;
&lt;p&gt;XLibre is an X Server project that intends to replace X.Org.&lt;/p&gt;
&lt;p&gt;Generally speaking, in recent years we have often heard that Wayland is about to replace X.Org X Server and become the new generation standard for Linux graphical environments. But what if someone wants to extend the life of X Server, rather than tear everything down and rebuild it?&lt;/p&gt;
&lt;p&gt;How should we install this brand-new X.Org fork and extend the life of X Server? What controversy has this caused behind the scenes?&lt;/p&gt;
&lt;p&gt;Artix Linux running XLibre + KDE X11
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/xlibre-x-server-introduction/images/desktop.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="1440"
 height="900"&gt;&lt;/figure&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;1. Why Does XLibre Intend to Replace X.Org?
 &lt;div id="1-why-does-xlibre-intend-to-replace-xorg" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-why-does-xlibre-intend-to-replace-xorg" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;First, some historical context.&lt;/p&gt;
&lt;p&gt;X Window, also called X Server, is a set of software for displaying graphical interfaces. It defines how to interact with underlying hardware, and is responsible for low-level graphics drawing and mouse event management. It can be said to be indispensable software for displaying a GUI. But users do not directly operate X Server; they interact with the desktop environment. How did desktop environments come about? Because X Server handled the low-level communication with hardware, software developers could develop complete desktop environments on top of the X Server architecture, such as GNOME and KDE Plasma, and then users could operate the operating system.&lt;/p&gt;
&lt;p&gt;Since its birth at Bell Labs in 1987, X Server has been used to this day, becoming a standard dependency for desktop environments on many Unix-like systems (Linux, BSD, Solaris).&lt;/p&gt;
&lt;p&gt;The original X Server developers only defined the X communication specifications and did not specify concrete software implementations, so an implementation of X Server was needed for users to install. X Server has many versions implemented by developers, such as XFree86 X Server released in 1992. It was once mainstream, but because commercialization triggered community controversy, a group of developers forked it in 2004 into X.Org X Server, which became the most popular X Server implementation.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/xlibre-x-server-introduction/images/xorg.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="200"
 height="160"&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Now in 2026, the open source community still most commonly uses X.Org X Server. Because the X protocol it uses is version 11, it is also called &amp;ldquo;X11.&amp;rdquo; Most people use the names &amp;ldquo;X.Org&amp;rdquo; or &amp;ldquo;X11&amp;rdquo; to refer to this X Server.&lt;/p&gt;
&lt;p&gt;However, because the architecture of X.Org X Server is too old and its mountain of shit code is hard to maintain, it has produced many security concerns. For example, communication between X Client and X Server is not encrypted, so it can easily be intercepted by keyloggers.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/xlibre-x-server-introduction/images/inm1.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="533"
 height="507"&gt;&lt;figcaption&gt;Hey! When I was typing into Firefox just now, you peeked, didn&amp;rsquo;t you?&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;In 2008, some X.Org X Server developers started the &amp;ldquo;Wayland&amp;rdquo; project, intending to replace X.Org with a more modern graphical system.&lt;/p&gt;
&lt;p&gt;Related article: &lt;a href="https://ivonblog.com/en-us/posts/should-you-switch-to-wayland/" target="_blank" rel="noreferrer"&gt;Should you switch to Wayland desktop?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After that, mainstream Linux distributions began migrating toward Wayland and gradually abandoning X.Org support. For example, the GNOME desktop began providing Wayland sessions. But due to various factors, Wayland could not immediately replace X.Org, and the two existed in parallel for a long time.&lt;/p&gt;</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://ivonblog.com/en-us/posts/xlibre-x-server-introduction/featured.webp"/></item><item><title>Launch X11 graphical programs from proot-distro on Termux's XFCE desktop</title><link>https://ivonblog.com/en-us/posts/termux-desktop-with-proot-distro/</link><pubDate>Fri, 11 Apr 2025 01:00:00 +0800</pubDate><author>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</author><guid>https://ivonblog.com/en-us/posts/termux-desktop-with-proot-distro/</guid><description>&lt;!-- Co-translated by ChatGPT --&gt;
&lt;p&gt;Allow apps in proot-distro to draw windows on XFCE desktop in Termux. Integrate X11 GUI apps in proot-distro with Termux host desktop environment.&lt;/p&gt;
&lt;p&gt;By default, use Termux&amp;rsquo;s native packages to run the XFCE desktop environment, and through X11 network transparency, allow X11 program windows inside proot-distro to be displayed on the XFCE desktop.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/termux-desktop-with-proot-distro/images/tt.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="1080"
 height="607"&gt;&lt;figcaption&gt;This image shows Termux and the proot-distro environment running at the same time. The XFCE desktop runs directly in Termux, while LibreOffice starts from inside proot-distro&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Here, the side responsible for running native XFCE programs can be called the Termux host for now, while proot-distro is naturally the container. The process is shown below:
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/termux-desktop-with-proot-distro/images/mermaid-1744306451038.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="1024"
 height="942"&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;This usage is a bit like the Linux desktop container tool &lt;a href="https://ivonblog.com/posts/distrobox-usage/" target="_blank" rel="noreferrer"&gt;Distrobox&lt;/a&gt;. It allows X11 graphical programs inside Docker to be displayed on the host desktop.&lt;/p&gt;
&lt;p&gt;You might think: why not just start XFCE directly from proot-distro? Why use Termux&amp;rsquo;s XFCE packages?&lt;/p&gt;
&lt;p&gt;Because it is faster. Processes inside proot are emulated with ptrace, so they are inherently slower than programs compiled natively for Termux. Termux now has more and more packages, even the Chromium browser (included in TUR Repo), so in the future there is less need to let the guest usurp the host by running the desktop environment in proot-distro. If most commonly used programs can run as Termux native versions, there is no need to use proot-distro; only start proot-distro when necessary to run programs that are only included in Debian repositories.&lt;/p&gt;

&lt;h2 class="relative group"&gt;1. Install a desktop environment for Termux
 &lt;div id="1-install-a-desktop-environment-for-termux" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-install-a-desktop-environment-for-termux" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;See &lt;a href="https://ivonblog.com/en-us/posts/termux-desktop-environment/" target="_blank" rel="noreferrer"&gt;Termux Install XFCE4&lt;/a&gt;. For graphical display, either Termux X11 or VNC is fine.&lt;/p&gt;
&lt;p&gt;Here we also need to add one extra package, used to control X client permissions for connecting to the X server:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pkg install xorg-xhost&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Test whether the Termux desktop environment can start.&lt;/p&gt;
&lt;p&gt;In addition, we can open XFCE&amp;rsquo;s file manager, open the &lt;code&gt;storage/shared&lt;/code&gt; directory, and read files from Android internal storage.&lt;/p&gt;

&lt;h2 class="relative group"&gt;2. Configure proot-distro
 &lt;div id="2-configure-proot-distro" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#2-configure-proot-distro" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I installed &lt;a href="https://ivonblog.com/en-us/posts/termux-proot-distro-debian/" target="_blank" rel="noreferrer"&gt;proot Debian&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is recommended to add a normal user and configure Chinese localization inside proot-distro.&lt;/p&gt;
&lt;p&gt;Termux lacks the &lt;code&gt;locales&lt;/code&gt; package and cannot configure Chinese.&lt;/p&gt;
&lt;p&gt;Also install graphical programs inside proot-distro, such as LibreOffice:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install libreoffice&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;3. Launch programs inside proot-distro from the Termux desktop
 &lt;div id="3-launch-programs-inside-proot-distro-from-the-termux-desktop" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#3-launch-programs-inside-proot-distro-from-the-termux-desktop" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;First run &lt;code&gt;xhost&lt;/code&gt; to allow programs inside proot-distro to draw windows on the X server of the Termux desktop. Because proot processes are started by the Termux user, use the &lt;code&gt;whoami&lt;/code&gt; command to pass in the current username and allow this user to connect.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;xhost +SI:localuser:&lt;span class="k"&gt;$(&lt;/span&gt;whoami&lt;span class="k"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Log in to proot-distro. You must use &lt;code&gt;--shared-tmp&lt;/code&gt; to share X server resources, and add &lt;code&gt;--termux-home&lt;/code&gt; to mount Termux&amp;rsquo;s home directory as well (if you do not want files to be messed up by programs inside proot, you can skip mounting it)&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;proot-distro login debian --user user --shared-tmp --termux-home&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Specify the &lt;code&gt;DISPLAY&lt;/code&gt; environment variable. The value should be the address of the Termux X server, generally &lt;code&gt;:0&lt;/code&gt;. Then run a program, such as LibreOffice:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;DISPLAY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;:0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;libreoffice&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="4"&gt;
&lt;li&gt;
&lt;p&gt;You will then see the LibreOffice window start.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/termux-desktop-with-proot-distro/images/Screenshot_20250411_005538.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="1357"
 height="767"&gt;&lt;/figure&gt;&lt;/p&gt;</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://ivonblog.com/en-us/posts/termux-desktop-with-proot-distro/featured.webp"/></item><item><title>Install a graphical desktop environment and audio output in Termux</title><link>https://ivonblog.com/en-us/posts/termux-desktop-environment/</link><pubDate>Sun, 25 Aug 2024 13:00:00 +0800</pubDate><author>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</author><guid>https://ivonblog.com/en-us/posts/termux-desktop-environment/</guid><description>&lt;!-- Co-translated by ChatGPT --&gt;
&lt;p&gt;Note: because the Termux filesystem differs from ordinary Linux and has fewer packages, I tend to install a &lt;a href="https://ivonblog.com/en-us/posts/termux-proot-distro/" target="_blank" rel="noreferrer"&gt;Linux proot container&lt;/a&gt; and run the desktop environment there. Although it is slower, the experience is better.&lt;/p&gt;
&lt;p&gt;By default, Termux only has a text interface. Users can install a desktop environment themselves, then connect through VNC or Termux X11 to get a desktop-computer-like experience.&lt;/p&gt;
&lt;p&gt;At present, desktop environments included in the Termux package repository include XFCE, LXQT, MATE, OpenBox, i3wm, Weston, and so on.&lt;/p&gt;
&lt;p&gt;Termux can also use Android GELS to output audio, so we can run a PulseAudio server for audio output in the desktop environment.&lt;/p&gt;
&lt;p&gt;This article explains how to install the XFCE desktop and configure the PulseAudio server.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/termux-desktop-environment/images/Screenshot_20240825-133543.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="1080"
 height="462"&gt;&lt;figcaption&gt;Termux running the XFCE desktop environment and desktop Firefox browser&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;1. Prerequisites
 &lt;div id="1-prerequisites" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-prerequisites" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;To run a desktop environment, I recommend a phone with at least 6GB RAM.&lt;/p&gt;
&lt;p&gt;Please install &lt;a href="https://ivonblog.com/en-us/posts/how-to-use-termux/" target="_blank" rel="noreferrer"&gt;Termux&lt;/a&gt; first, and remember to disable Phantom Process Killing to prevent Termux from being terminated by the system in the background.&lt;/p&gt;

&lt;h2 class="relative group"&gt;2. Install the XFCE desktop environment
 &lt;div id="2-install-the-xfce-desktop-environment" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#2-install-the-xfce-desktop-environment" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Termux does not package many desktop environments, so choose XFCE, which is lightweight but still sufficiently functional.&lt;/p&gt;
&lt;p&gt;Install XFCE4, the Firefox browser, and the VIM editor:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pkg install x11-repo
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pkg install xfce xfce4-goodies pulseaudio pavucontrol vim firefox&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;3. Connect to the graphical interface
 &lt;div id="3-connect-to-the-graphical-interface" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#3-connect-to-the-graphical-interface" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Choose one of the two; they can coexist. I recommend Termux X11, which performs better than VNC, but is less convenient for remote connections.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Termux X11
 &lt;div id="termux-x11" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#termux-x11" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Configure &lt;a href="https://ivonblog.com/en-us/posts/termux-x11/" target="_blank" rel="noreferrer"&gt;Termux X11&lt;/a&gt; and &lt;a href="https://ivonblog.com/en-us/posts/termux-virglrenderer/" target="_blank" rel="noreferrer"&gt;virglrenderer&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To make starting the desktop environment easier later, add a script&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vim ~/startxfce4.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Fill in the following content:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Start GPU acceleration&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;virgl_test_server_android &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Start audio server&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pulseaudio --start --exit-idle-time&lt;span class="o"&gt;=&lt;/span&gt;-1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pacmd load-module module-native-protocol-tcp auth-ip-acl&lt;span class="o"&gt;=&lt;/span&gt;127.0.0.1 auth-anonymous&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Start desktop environment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;termux-x11 :0 -xstartup &lt;span class="s2"&gt;&amp;#34;dbus-launch --exit-with-session xfce4-session&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Grant execute permission&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chmod +x ~/startxfce4.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Exit Termux.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;exit&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="6"&gt;
&lt;li&gt;
&lt;p&gt;Start the Termux X11 app&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Return to Termux and start the desktop environment. The XFCE4 desktop will appear in the Termux X11 app screen.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./startxfce4.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;VNC server
 &lt;div id="vnc-server" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#vnc-server" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install the &lt;a href="https://github.com/gujjwal00/avnc" target="_blank" rel="noreferrer"&gt;AVNC&lt;/a&gt; client on the phone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the TigerVNC package. The current version is 1.13.0.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pkg install tigervnc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Set the VNC server password&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vncpasswd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Add the program to execute after the VNC server starts by editing &lt;code&gt;~/.vnc/xstartup&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mkdir ~/.vnc/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vim ~/.vnc/xstartup&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Fill in the following content&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;unset&lt;/span&gt; SESSION_MANAGER
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;unset&lt;/span&gt; DBUS_SESSION_BUS_ADRESS
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Start the PulseAudio sound server; audio will come out from Termux&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pulseaudio --start --exit-idle-time&lt;span class="o"&gt;=&lt;/span&gt;-1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pacmd load-module module-native-protocol-tcp auth-ip-acl&lt;span class="o"&gt;=&lt;/span&gt;127.0.0.1 auth-anonymous&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Run the desktop environment, XFCE here&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;exec&lt;/span&gt; startxfce4&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="6"&gt;
&lt;li&gt;Grant execute permission to xstartup&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chmod +x ~/.vnc/xstartup&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="7"&gt;
&lt;li&gt;Define the VNC server configuration file. Edit &lt;code&gt;~/.vnc/tigervnc.conf&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vim ~/.vnc/tigervnc.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="8"&gt;
&lt;li&gt;Fill in the following content:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Current session XFCE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$session&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;xfce-session&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Resolution; higher values use more bandwidth&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$geometry&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;1920x1080&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Bit depth, values are 8/16/24/32; larger numbers look better but use more bandwidth&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$depth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;32&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Allow external networks to connect&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$localhost&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;no&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="9"&gt;
&lt;li&gt;
&lt;p&gt;Enter the &lt;code&gt;tigervncserver&lt;/code&gt; or &lt;code&gt;vncserver&lt;/code&gt; command in Termux to start the VNC server. Observe the port number output on the screen; it usually starts from 1. Since VNC server ports count from 5900, the port here is 5901.&lt;/p&gt;</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://ivonblog.com/en-us/posts/termux-desktop-environment/featured.webp"/></item><item><title>Should You Switch to Wayland and Abandon the X Window System? (2024 Edition)</title><link>https://ivonblog.com/en-us/posts/should-you-switch-to-wayland-in-2024/</link><pubDate>Sat, 23 Mar 2024 18:00:00 +0800</pubDate><author>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</author><guid>https://ivonblog.com/en-us/posts/should-you-switch-to-wayland-in-2024/</guid><description>&lt;!-- Co-translated by ChatGPT --&gt;
&lt;p&gt;In this article, Ivon wants to discuss the development status of the &amp;ldquo;X Window System&amp;rdquo; and &amp;ldquo;Wayland&amp;rdquo; on Linux systems, talk about Wayland&amp;rsquo;s pros and cons, and help you decide whether you should switch to Wayland. At the end, I also list the Linux distributions that let you experience the newest Wayland technology the fastest.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/should-you-switch-to-wayland-in-2024/images/title.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="1655"
 height="930"&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Things are changing. The Linux community often discusses whether we should abandon X11 and switch to a Wayland session. So, what is X11? What is Wayland?&lt;/p&gt;
&lt;p&gt;The X Window System is a set of software that determines how images are displayed on your Linux computer, but it is too old and has many problems. Now there is software that adopts the Wayland protocol, aiming to replace this old software with modern code. However, because Wayland has had problem after problem, even though more and more Linux systems are adopting it, after 10 years of development the X Window System still cannot be completely replaced. Below, let us examine why.&lt;/p&gt;

&lt;h2 class="relative group"&gt;1. The Opportunity for Change: Comparing X11 and Wayland
 &lt;div id="1-the-opportunity-for-change-comparing-x11-and-wayland" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-the-opportunity-for-change-comparing-x11-and-wayland" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The X Window System and Wayland are both sets of software responsible for displaying graphics on Linux. As for comparing their underlying principles, I am too limited in learning to embarrass myself here; there are already plenty of resources online, and the &amp;ldquo;Further Reading&amp;rdquo; section at the end has many interesting articles you can read in detail. Here I will briefly summarize my personal understanding.&lt;/p&gt;
&lt;p&gt;The X Window System, abbreviated as X, was born earlier than Linux. The X Window System appeared in 1987 and was used to display graphical environments. That was still the age of Unix! By now it already has more than 30 years of history.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/should-you-switch-to-wayland-in-2024/images/X11.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="256"
 height="256"&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Why does Linux need to &amp;ldquo;install&amp;rdquo; the X Window System before it has a graphical display? Because the Linux kernel really does not include software for displaying graphics.&lt;/p&gt;
&lt;p&gt;The desktop environments Linux users see, such as GNOME, KDE Plasma, and XFCE, do not directly control the screen. Instead, they are built on top of the graphical display mechanism provided by the X Window System. The X Window System is responsible for the lowest-level window display and input events, while the desktop environment is responsible for the user interface and operating experience.&lt;/p&gt;
&lt;p&gt;Here, the X Window System became the common low-level standard followed by various desktop environments.&lt;/p&gt;
&lt;p&gt;At the beginning, the designers only defined the X communication protocol standard; they did not specify X&amp;rsquo;s implementation in detail, so different X window software projects appeared. Around 2000, the X.org software developed by the X.org organization replaced XFree86 and gradually became the accepted standard. APIs and the like were all defined by them. X.org was therefore adopted by major desktop environments. Because the X protocol adopted by X.org is version X11, the X server they developed is also called X11.&lt;/p&gt;
&lt;p&gt;The reason the X Window System is called a server is that it can accept simultaneous connections from multiple X clients. This is a &amp;ldquo;client-server architecture,&amp;rdquo; echoing the needs of the old mainframe era, and it communicates through Network Transparency. See the diagram below for the principle.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/should-you-switch-to-wayland-in-2024/images/x-architecture.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="533"
 height="507"&gt;&lt;/figure&gt;&lt;/p&gt;</description></item><item><title>Run an X server on your phone: Termux + XSDL tutorial</title><link>https://ivonblog.com/en-us/posts/android-xserver-xsdl/</link><pubDate>Sun, 27 Nov 2022 02:41:00 +0800</pubDate><author>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</author><guid>https://ivonblog.com/en-us/posts/android-xserver-xsdl/</guid><description>&lt;!-- Co-translated by ChatGPT --&gt;
&lt;p&gt;After installing a Linux Proot distribution with Termux, the next headache is how to display the desktop. The simplest way is a &lt;a href="https://ivonblog.com/en-us/posts/vncserver-termux/" target="_blank" rel="noreferrer"&gt;VNC Server&lt;/a&gt;, and now we also have the &lt;a href="https://ivonblog.com/en-us/posts/termux-x11/" target="_blank" rel="noreferrer"&gt;Termux X11&lt;/a&gt; method of running XWayland.&lt;/p&gt;
&lt;p&gt;But actually, an app called &amp;ldquo;XServer XSDL&amp;rdquo; has existed for a long time. It is an app that can run an X server on an Android phone.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://i.imgur.com/Yu4T6LH.png"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 &gt;&lt;/figure&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;1. What are the benefits of XSDL?
 &lt;div id="1-what-are-the-benefits-of-xsdl" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-what-are-the-benefits-of-xsdl" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;XSDL performs better than VNC, is more stable than Termux X11, and can be used with chroot-based Linux Deploy in addition to Termux Proot.&lt;/p&gt;
&lt;p&gt;XSDL also has built-in PulseAudio audio playback, so you do not need to rely on Termux to play sound.&lt;/p&gt;
&lt;p&gt;XSDL itself is an independent X server. Programs do not need to integrate with Termux X11 code in order to display a graphical environment on it.&lt;/p&gt;
&lt;p&gt;And because it is an X server itself, in theory you can do X11 Forwarding, transmitting the X server display from a Linux computer on the same network to the phone and using it as an alternative remote desktop.&lt;/p&gt;
&lt;p&gt;XSDL&amp;rsquo;s only drawback is that it has no GPU acceleration. Termux X11 at least supports part of OpenGL, so game performance under XSDL will be poor; at most, you can use a browser to watch videos.&lt;/p&gt;
&lt;p&gt;From this, XSDL can be understood as a compromise between VNC and Termux X11.&lt;/p&gt;

&lt;h2 class="relative group"&gt;2. How to use XSDL + Termux
 &lt;div id="2-how-to-use-xsdl--termux" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#2-how-to-use-xsdl--termux" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://ivonblog.com/en-us/posts/termux-proot-distro/" target="_blank" rel="noreferrer"&gt;Install a Proot distribution&lt;/a&gt; in Termux. For example, I installed Arch Linux.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="https://play.google.com/store/apps/details?id=x.org.server" target="_blank" rel="noreferrer"&gt;XSDL&lt;/a&gt; app. Open it and wait for this screen to appear:
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://i.imgur.com/v2oK55t.png"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 &gt;&lt;/figure&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Log in to the Proot distribution:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;proot-distro login archlinux&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Since we are running the XFCE desktop, enter the following commands:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;DISPLAY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;localhost:0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# If PulseAudio has already been configured in Termux Proot, this line is unnecessary&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;PULSE_SERVER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;tcp:localhost:4713
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;xfce4-session &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="5"&gt;
&lt;li&gt;
&lt;p&gt;Open the XSDL app and you will see the XFCE desktop. A virtual mouse will appear: two-finger tap for right click, two-finger scroll to scroll the screen, and long-press to drag. Press Back to bring up the phone keyboard.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://i.imgur.com/wyhcUlY.png"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 &gt;&lt;/figure&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you have configured the PulseAudio server, audio will play normally.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://i.imgur.com/LaRC39T.png"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 &gt;&lt;/figure&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To exit, close the XSDL app. After returning to Termux, the X server will terminate by itself.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item></channel></rss>