Many Android power users reach a point where they need a real Linux desktop – perhaps to run vim, git, or a graphical IDE that simply isn’t available as an Android app. Rooting would open many possibilities, but it also voids warranties and introduces security risks. This tutorial shows how to achieve a full‑featured Linux desktop on any Android device **without rooting**, using only free, open‑source tools: Termux, proot-distro, and a VNC server.
execve support for proot.proot-distro and pull a Linux distribution (Ubuntu 22.04 LTS is used in this guide).pkg update && pkg upgrade -y
pkg install proot-distro wget curl tar git -y
vim or nano for in‑terminal editing.
pkg install vim nano -y
Why these steps matter: updating ensures you get the latest security patches, and installing proot-distro gives you a simple wrapper to download and manage Linux rootfs images without needing root privileges.
proot-distroproot-distro list
You’ll see entries like ubuntu-22.04, debian-bullseye, etc.
proot-distro install ubuntu-22.04
The command downloads a compressed rootfs (~300 MB) and extracts it under ~/.local/share/proot-distro/ubuntu-22.04.
proot-distro login ubuntu-22.04
You should see a prompt like root@ubuntu:/#. Type exit to return to Termux.
If the download fails, check your Wi‑Fi connection or try a different mirror by setting the PROOT_DISTRO_MIRROR environment variable before running the install command.
proot-distro login ubuntu-22.04
apt update && apt upgrade -y
apt install xfce4 xfce4-goodies tightvncserver -y
vncserver for the first time to set a password:
vncserver :1
You’ll be prompted for a view‑only password – you can skip it by pressing n.
vncserver -kill :1
twm:
nano ~/.vnc/xstartup
Replace its contents with:
#!/bin/sh
xrdb $HOME/.Xresources
startxfce4 &
Save (Ctrl+O) and exit (Ctrl+X). Make the script executable:
chmod +x ~/.vnc/xstartup
vncserver :1 -geometry 1080x1920 -depth 24
You should see a message like New 'X' desktop is ubuntu:1.
exit
Why XFCE? It’s lightweight (≈150 MB RAM) yet fully functional, making it ideal for devices with limited resources.
Several free VNC clients exist on the Play Store and F‑Droid. For this guide we’ll use VNC Viewer (RealVNC) because it’s straightforward and supports password authentication.
127.0.0.1:5901. The :5901 part corresponds to VNC display :1 (5900 + display number).If the connection fails, double‑check that the VNC server is still running inside Ubuntu (ps aux | grep Xtightvnc) and that you used the correct display number.
Now that you have a desktop, you can install any GUI package available in Ubuntu’s repositories.
proot-distro login ubuntu-22.04
apt update
gedit (a simple text editor):
apt install gedit -y
Alt+F2 and type xfce4-terminal.gedit &
The & detaches the process so the terminal remains usable.firefox, thunderbird, code for VS Code). Keep in mind that heavy browsers may be sluggish on low‑end hardware.Tip: Create a desktop shortcut for frequently used apps by right‑clicking the XFCE desktop, choosing “Create Launcher”, and filling in the command (e.g., gedit).
By default, the VNC server stops when you close Termux or reboot the phone. To make it start automatically:
~/start-vnc.sh):
#!/bin/sh
vncserver :1 -geometry 1080x1920 -depth 24
chmod +x ~/start-vnc.sh
.bashrc (or .zshrc) so it runs each time you log into the distro:
echo "~/start-vnc.sh" >> ~/.bashrc
proot-distro login ubuntu-22.04, the VNC server will start automatically.Warning: Leaving a VNC server running all the time can drain battery. Consider disabling the auto‑start script if you only need occasional access.
xstartup script is executable and contains startxfce4 &.~/.vnc/*.log) for error messages.ps aux | grep Xtightvnc. If not, start it again.127.0.0.1:5901 – the loopback address is required because the server runs inside the same Android process.termux-wifi-connect to create a local hotspot and connect via the device’s IP address (e.g., 192.168.43.1:5901).openbox if XFCE feels heavy.stunnel to add TLS encryption.proot, it has limited access to the Android kernel. Nevertheless, treat it as a regular Linux system: keep packages updated (apt upgrade) and avoid running untrusted binaries.Some modern Linux apps require Wayland. While proot-distro primarily supports X11, you can install weston and forward its socket over VNC using xwayland. This is an advanced setup and beyond the scope of this tutorial, but the principle is the same: start a Wayland compositor, then run an X server that captures its output for VNC.
Termux stores its files under /data/data/com.termux/files/home. To make those files accessible to Android apps (e.g., a file manager), enable Termux’s storage access:
termux-setup-storage
Then create a symbolic link inside the Linux distro:
ln -s /data/data/com.termux/files/home/storage/shared ~/shared
Now you can open ~/shared from the Linux desktop and see the same files that Android apps see.
If you later decide you no longer need the Linux environment:
vncserver -kill :1 (run inside the distro).proot-distro remove ubuntu-22.04.pkg uninstall proot-distro wget curl).This frees up the storage you allocated earlier.
By following these steps you now have a fully functional Linux desktop accessible from any Android device, without needing root access. You can develop software, run scientific tools, or simply enjoy a familiar Linux workflow on the go. Because everything runs inside Termux, you retain the safety of Android’s sandbox while gaining the flexibility of a full Linux environment.









