<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>X Server on Ivon's Blog</title><link>https://ivonblog.com/en-us/tags/x-server/</link><description>Recent content in X Server 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>Fri, 17 Apr 2026 13:00:00 +0800</lastBuildDate><atom:link href="https://ivonblog.com/en-us/tags/x-server/index.xml" rel="self" type="application/rss+xml"/><item><title>How to use Termux X11 - The X Server for Android Phone</title><link>https://ivonblog.com/en-us/posts/termux-x11/</link><pubDate>Fri, 17 Apr 2026 13:00:00 +0800</pubDate><author>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</author><guid>https://ivonblog.com/en-us/posts/termux-x11/</guid><description>&lt;p&gt;Termux X11 is an app that can run X servers on Android phones. What does this mean? It means it can be used to execute Linux programs that rely on the X11 display, such as Firefox, Chromium, GIMP, Blender, Visual Studio Code, and more. Although Android is based on the Linux kernel, its graphics protocol differs from that used by most Linux distributions. Most Linux program toolkits are designed for X11 or Wayland, so Android cannot run Linux programs. Termux X11 provides an X server that runs on Android, allowing Termux&amp;rsquo;s Linux programs to display a graphical interface within it.&lt;/p&gt;
&lt;p&gt;In addition, you can also achieve 3D hardware acceleration through the experimental VirGL server (virglrenderer) in Termux.
&lt;img src="images/termux-x11.webp" width=300 alt="" loading="lazy"&gt;&lt;/p&gt;
&lt;p&gt;This is how the X Server works on a GNU/Linux PC.
&lt;img src="images/d1.webp" width=300 alt="" loading="lazy"&gt;&lt;/p&gt;
&lt;p&gt;Termux X11 developers ported the X Server to Android, enabling X11 apps to output screens on Android.
&lt;img src="images/d2.webp" width=300 alt="" loading="lazy"&gt;&lt;/p&gt;
&lt;p&gt;Termux X11 can be used with mouse and keyboard, or with touching gestures. Just setting the appropriate desktop resolution so you could interact with the desktop environment using your phone&amp;rsquo;s keyboard.
&lt;img src="images/termux-x11-gimp.webp" width=300 alt="" loading="lazy"&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;1. Install Termux X11
 &lt;div id="1-install-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="#1-install-termux-x11" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Termux X11 was inspired by &lt;a href="https://forum.xda-developers.com/t/guide-running-linux-on-android-with-3d-acceleration-opengl-root-required.4093343/" target="_blank" rel="noreferrer"&gt;Sparkle&lt;/a&gt;, and was initially implemented using XWayland, but was later replaced by XCB.&lt;/p&gt;
&lt;p&gt;Currently, Termux X11 requires devices running Android 8 or later.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install &lt;a href="https://ivonblog.com/en-us/posts/how-to-use-termux/" target="_blank" rel="noreferrer"&gt;Termux&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Download latest Termux-x11 APK from &lt;a href="https://github.com/termux/termux-x11/releases" target="_blank" rel="noreferrer"&gt;Github Releases&lt;/a&gt;. Download the Termux X11 APK. For most devices, choose the &lt;code&gt;arm64-v8a&lt;/code&gt; variant.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the Termux-x11 apk.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Launch Termux, install x11-repo. Then install termux-x11-nightly&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 update
&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 upgrade
&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 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 termux-x11-nightly&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;2. Usage 1: Run X11 apps in Termux
 &lt;div id="2-usage-1-run-x11-apps-in-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-usage-1-run-x11-apps-in-termux" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Personally, I recommended you to use Termux X11 with proot-distro because Termux has fewer package than proot-distros.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open Termux X11 APP and you will see this
&lt;img src="images/termux-x11-app.webp" width=300 alt="" loading="lazy"&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go back to Termux. Install XFCE4 and GIMP&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 xfce gimp&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;Launch XFCE4 with dbus-launch&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;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&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If you encounter &lt;code&gt;Make sure an X server isn't already running(EE)&lt;/code&gt; error, close Termux, then &amp;ldquo;Force stop&amp;rdquo; and &amp;ldquo;Clear cache&amp;rdquo; Termux and Termux X11 App in Android system settings.&lt;/p&gt;
&lt;ol start="4"&gt;
&lt;li&gt;
&lt;p&gt;Now you should see XFCE4 running in Termux X11.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You could change Touchscreen input mode in Termux X11 preferences in notification bar.
&lt;img src="images/termux-x11-touch.webp" width=300 alt="" loading="lazy"&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the font is too big, open System settings → Appearance → check Cutsom DPI. You can also set display resolution in Preferences of Termux X11 APP.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press &lt;code&gt;CTRL+C&lt;/code&gt; in Termux to stop XFCE4.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 class="relative group"&gt;3. Usage 2: Run X11 apps in Proot-distro
 &lt;div id="3-usage-2-run-x11-apps-in-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="#3-usage-2-run-x11-apps-in-proot-distro" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install a proot-distro. For example &lt;a href="https://ivonblog.com/en-us/posts/termux-proot-distro-debian/" target="_blank" rel="noreferrer"&gt;Debian proot&lt;/a&gt; or &lt;a href="https://ivonblog.com/en-us/posts/termux-proot-distro-archlinux/" target="_blank" rel="noreferrer"&gt;Arch Linux proot&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open Termux X11 app. Then go back to Termux.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Log in to the installed Proot-distro using the regular account &lt;code&gt;user&lt;/code&gt;. When logging in to proot here, you must add the &lt;code&gt;--shared-tmp&lt;/code&gt; parameter, which means mounting the Termux &lt;code&gt;$TMPDIR&lt;/code&gt; directory to the proot &lt;code&gt;/tmp&lt;/code&gt; directory.&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 --user user debian --shared-tmp&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;Launch desktop environment. For example, XFCE4&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;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&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;While in Termux X11, you can activate phone keyboard by pressing back button. I suggest you to install &lt;a href="https://github.com/klausw/hackerskeyboard" target="_blank" rel="noreferrer"&gt;Hacker&amp;rsquo;s Keyboard&lt;/a&gt; for using desktop shortcuts.&lt;/p&gt;</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://ivonblog.com/en-us/posts/termux-x11/featured.webp"/></item></channel></rss>