5,107
stars
+4
820
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions
README
Termux:X11 A Termux X11 server add-on app. About Termux:X11 is a fully fledged X server. It is built with Android NDK and optimized to be used with Termux. Submodules caveat This repo uses submodules. Use git clone --recurse-submodules https://github.com/termux/termux-x11 or git clone https://github.com/termux/termux-x11 cd termux-x11 git submodule update --init --recursive How does it work? Just like any other X server. Setup Instructions Termux:X11 requires Android 7 or later. It consists of an Android app and a companion termux package, and you must install both. The Android app is available via the nightly release tag of this repository. Download and install termux-x11-universal-debug.apk. The companion termux package is available from the termux graphical repository. You can ensure it's enabled and install this package with pkg i x11-repo && pkg i termux-x11-nightly. If you need to, you can also download a .deb or .tar.xz from the same nightly release tag as above. Avoiding slowdowns Android gives less CPU time to apps that aren't on screen — install the sharedUid APK to avoid this Android gives less CPU time to apps that aren't on screen. Once Termux:X11 opens, Android treats Termux itself as no longer being on screen, so things running inside Termux (like your desktop apps) can slow down. To avoid this, install termux-x11-universal-sharedUid-debug.apk instead of the regular one (same nightly release tag or CI artifacts). This variant runs as part of Termux itself, so Android keeps treating it as one app and doesn't slow it down. This variant only works with the Termux app installed from GitHub, not F-Droid or Google Play — those are signed with different keys, and a shared UID requires matching signatures. Finally, most people will want to use a desktop environment with Termux:X11. If you don't know what that means or don't know which one to pick, run pkg i xfce (also from x11-repo) to install a good one to start with. The rest of these instructions will assume that your goal is to run an XFCE desktop, or that you can modify the instructions as you follow them for your actual goal. Running Graphical Applications You can start your desired graphical application by doing: termux-x11 :1 -xstartup "dbus-launch --exit-with-session xfce4-session" or termux-x11 :1 -- dbus-launch --exit-with-session xfce4-session or termux-x11 :1 & env DISPLAY=:1 dbus-launch --exit-with-session xfce4-session You may replace xfce4-session if you use other than Xfce dbus-launch does not work for some users so you can start session with termux-x11 :1 -xstartup "xfce4-session" Also you can do export TERMUX_X11_XSTARTUP="xfce4-session" termux-x11 :1 In this case you can save TERMUX_X11_XSTARTUP somewhere in .bashrc or other script and not type it every time you invoke termux-x11. If you're done using Termux:X11 just simply exit it through its notification drawer by expanding the Termux:X11 notification then "Exit" But yo