termux/termux-x11
DevOps & Self-hostingAn X server add-on app that lets Termux users on Android run full Linux graphical desktops and X11 applications.
What it is
Termux:X11 is an Android X server built with the Android NDK and tuned for Termux. It lets graphical Linux software running inside Termux—a full desktop environment or individual X11 applications—render into an Android window instead of a headless shell. It is meant for Android users who already use Termux and want to work with a real X session on a phone or tablet.
It is distributed as two pieces: an Android app and a companion Termux package. Both must be installed, and Android 7 or later is required.
Setup
- Install the Android app from the
nightlyrelease tag, usingtermux-x11-universal-debug.apk(nightly release). - In Termux, enable the graphical repository and install the companion package:
pkg i x11-repo && pkg i termux-x11-nightly
- Optionally install a desktop environment, for example XFCE with
pkg i xfce. - Start a display and a session, e.g.:
termux-x11 :1 -xstartup "dbus-launch --exit-with-session xfce4-session"
Alternatively export TERMUX_X11_XSTARTUP="xfce4-session" and run termux-x11 :1, or launch the server with & and set DISPLAY=:1 before starting the session manually. If dbus-launch fails, start with -xstartup "xfce4-session" directly. Exit the Android activity from its notification drawer; the termux-x11 server process keeps running and has to be stopped separately with pkill -f termux-x11. Use am broadcast -a com.termux.x11.ACTION_STOP -p com.termux.x11 to close the activity from the command line.
Device quirks and options
Some devices show only a black screen with a cursor; start with -legacy-drawing in that case. Others show swapped colors, which the -force-bgra option addresses. DPI or font scaling that looks too large can be adjusted in the desktop's appearance settings or by passing -dpi <value> to termux-x11.
To run multiple displays as separate Android windows, pass -tag <name> per display; re-running a tag brings the existing window to the front rather than duplicating it.
Containers and third-party use
With proot or proot-distro, start termux-x11 from a Termux shell and launch the container with --shared-tmp (or set TMPDIR to the directory mapping to /tmp inside the container). With chroot or unshare, run as root, point TMPDIR at the container's tmp, set XKB_CONFIG_ROOT to the container's /usr/share/X11/xkb, and start the server through app_process as documented; the README notes SELinux must be disabled in that setup. Third-party apps can integrate by following shell-loader/src/main/java/com/termux/x11/Loader.java.
Constraints
- Android 7+ is required, and both the app and Termux package must be installed.
- The sharedUid variant reduces CPU throttling when Termux is in the background, but only works when Termux itself was installed from GitHub, not F-Droid or Google Play, because signatures must match.
- On Android 13+, notification permission must be granted for the notification controls to appear.
- The project uses git submodules, so clone with
--recurse-submodulesor rungit submodule update --init --recursive. - The source is GPL-3.0 licensed. The nightly release and CI builds are debug builds, not a stable release channel.
HotRepo's take
The project sits at the boundary between Android and Linux desktop tooling, and it appeared on the Java daily list on 2026-11-08 at rank 8 with 7 stars gained that day, against a total of 5,100 stars and 817 forks. That is a single snapshot, so it only shows the repository was still moving on that day rather than establishing a trend. The practical weight here is in the container and multi-display paths: the README documents proot, chroot, tagged windows, and a preference CLI, which suggests mature operational use rather than a demo app.
Written by AI from the project's README, updated . The project's own docs are the source of truth.