Getting a Linux graphical environment on Android is possible without rooting, but you have to meet a few prerequisites. Gather them first so the process runs smoothly.
If you prefer a visual backup of your data, create a regular ADB backup now – the process will not touch your personal files, but a backup is a good safety net.
Why F‑Droid? The Play Store version is often a few releases behind and may miss recent permission changes.
When you first launch XServer XSDL, it will ask for permission to draw over other apps – grant it.
pkg update && pkg upgrade -y
This ensures you have the latest proot and git tools, which are essential for the next steps.
pkg install proot-distro git wget curl tar -y
proot-distroTermux ships with proot-distro, a wrapper that downloads and configures popular Linux roots (Ubuntu, Debian, Alpine, etc.) without root privileges.
proot-distro list
proot-distro install ubuntu-22.04
The download will take a few minutes; you’ll see a progress bar.
proot-distro login ubuntu-22.04
You are now inside a regular Ubuntu shell. The prompt changes from ~ $ to something like root@ubuntu:/ #.
To run graphical applications, you need an X11 server (provided by XServer XSDL) and a few client libraries.
apt update
apt install -y x11-apps gimp
x11-apps gives you xclock and xeyes for quick testing.
xfce4-terminal if you prefer a lightweight terminal emulator inside the Linux session:
apt install -y xfce4-terminal
Linux GUI programs need to know where to send their graphical output. XServer XSDL runs on a TCP port that you can reach from the Ubuntu session.
127.0.0.1:0 (port 0).
If the address is different, write it down; you’ll need it in the next step.
DISPLAY variable to point to the XServer instance:
export DISPLAY=127.0.0.1:0
For convenience, add the line to ~/.bashrc so it persists across logins:
echo 'export DISPLAY=127.0.0.1:0' >> ~/.bashrc
xeyes
If XServer XSDL shows a pair of animated eyes following your cursor, the display link works.
Now that the X11 bridge is functional, you can start any graphical Linux program that respects the DISPLAY variable.
gimp
GIMP’s window will appear inside the XServer XSDL canvas. You can interact with it using your touchscreen or a connected mouse/keyboard.
Choosing a resolution that matches your device’s screen (e.g., 1080×2400) gives a near‑native feel.
Repeating the whole installation each time would be tedious. Follow these shortcuts:
proot-distro login ubuntu-22.04
DISPLAY variable is already set via ~/.bashrc, so any GUI app you start will automatically appear.For quick access, create a Termux shortcut on your home screen:
termux-open-url "termux://run?command=proot-distro%20login%20ubuntu-22.04"
This opens the Ubuntu shell with one tap.
echo $DISPLAY. It must match the address shown by XServer XSDL.192.168.1.101:0) instead of 127.0.0.1. You can find the IP with ip addr show wlan0 from the Termux prompt.libgl1-mesa-dri package inside Ubuntu to enable hardware acceleration (if your device’s GPU is exposed to Termux):
apt install -y libgl1-mesa-dri
DISPLAY accordingly.
termux-setup-storage and then mount /sdcard inside Ubuntu).Now that you have a working X11 bridge, the possibilities are wide open:
gnuplot or matplotlib for quick visualisations.Remember, the core idea is the same: Termux provides a Linux userland, proot-distro gives you a full distribution, and XServer XSDL renders the graphical output. With those three pieces in place, any Linux GUI program becomes accessible on your Android phone or tablet.









