After installing a Linux Proot distribution with Termux, the next headache is how to display the desktop. The simplest way is a VNC Server, and now we also have the Termux X11 method of running XWayland.
But actually, an app called “XServer XSDL” has existed for a long time. It is an app that can run an X server on an Android phone.

1. What are the benefits of XSDL?#
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.
XSDL also has built-in PulseAudio audio playback, so you do not need to rely on Termux to play sound.
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.
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.
XSDL’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.
From this, XSDL can be understood as a compromise between VNC and Termux X11.
2. How to use XSDL + Termux#
Install a Proot distribution in Termux. For example, I installed Arch Linux.
Download the XSDL app. Open it and wait for this screen to appear:

Log in to the Proot distribution:
proot-distro login archlinux- Since we are running the XFCE desktop, enter the following commands:
export DISPLAY=localhost:0
# If PulseAudio has already been configured in Termux Proot, this line is unnecessary
export PULSE_SERVER=tcp:localhost:4713
xfce4-session &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.

If you have configured the PulseAudio server, audio will play normally.

To exit, close the XSDL app. After returning to Termux, the X server will terminate by itself.

