Your pocket is hiding a surprisingly powerful computer. Let's unlock it.
Most people use Termux to run a few scripts or compile some code. But what if you could run a full XFCE4 desktop environment — with a taskbar, app launcher, file manager, browser, and VS Code — right on your Android phone? No root. No hacks. Just pure Linux power in your palm.
This is exactly what the GourangaDasSamrat/dotfiles repo makes effortlessly possible. Let's set it up step by step.
🧠 What You'll End Up With
A real, working Linux desktop on Android featuring:
- XFCE4 — a fast, lightweight desktop environment
- Firefox — full desktop browser
- VS Code (code-oss) — your favourite editor, on your phone
-
Rofi app launcher — blazing-fast app search with
Ctrl+Space - PulseAudio — actual working audio
- A Debian container (via proot) for running any Linux software
🛠️ What You Need Before Starting
- An Android phone (Android 7+)
- Termux — install from F-Droid (NOT the Play Store version)
- Termux:X11 — the display server app
- A stable internet connection for the initial setup
- ~3–4 GB of free storage
Pro tip: Install both Termux and Termux:X11 from F-Droid or GitHub releases. The Play Store versions are outdated and will cause problems.
📦 Step 1 — Grant Storage & Update Termux
Open Termux and run:
termux-setup-storage
Tap Allow when Android asks for storage permission. Then update your packages:
pkg update && pkg upgrade -y
Grab a coffee — this takes a few minutes the first time. ☕
🔧 Step 2 — Install the Desktop Stack
Now install everything you need in one go. This installs git first, then X11 support, XFCE4, PulseAudio, and a bunch of useful apps:
# Add required repos and core packages (git is installed here first!)
pkg install git curl wget x11-repo tur-repo termux-x11-nightly pulseaudio -y
# Apps: browser, editor, image viewer, calculator
apt install firefox code-oss mousepad eog galculator pinentry-gnome3 -y
# XFCE4 and all the good plugins
apt install xfce4 xfce4-whiskermenu-plugin xfce4-clipman-plugin \
xfce4-screenshooter xfce4-docklike-plugin xfce4-panel-profiles \
xfce4-taskmanager -y
This installs quite a lot, so be patient and keep Termux open. If anything fails, re-run the same command — it picks up where it left off.
📥 Step 3 — Clone the Dotfiles Repo
Now that git is installed, grab the dotfiles:
git clone https://github.com/GourangaDasSamrat/dotfiles ~/dotfiles
This repo contains everything pre-configured — startup scripts, XFCE4 settings, tmux config, and desktop launch logic. You don't have to figure out any of it from scratch.
🚀 Step 4 — Set Up the Startup Script
The dotfiles repo includes a ready-made startup script that handles everything: killing old X11 processes, starting PulseAudio, launching Termux:X11, and booting XFCE4.
cp ~/dotfiles/docs/termux/native-desktop-start.sh ~/start.sh
chmod +x ~/start.sh
🖥️ Step 5 — Launch Your Desktop!
This is the moment. Run:
./start.sh
The script will:
- Start PulseAudio for audio support
- Fire up the Termux:X11 display server
- Open the Termux:X11 app automatically
- Launch a full XFCE4 desktop session
Switch to the Termux:X11 app — and there's your desktop. 🎉
⌨️ Keyboard Shortcuts Worth Memorising
Once you're in the desktop, these shortcuts will make your life much easier:
| Action | Shortcut |
|---|---|
| Open App Launcher (Rofi) | Ctrl + Space |
| Open Whisker Menu | Super |
| Open Clipboard History | Super + Alt + V |
🐧 Bonus: Add a Full Debian Container (Optional but Awesome)
Want to apt install literally anything from the Debian repos? Add a proot Debian container:
pkg install proot-distro -y
proot-distro install debian
Then log in with:
proot-distro login debian
Inside, you can install packages, set up users, configure your timezone, and run server software — all from within your Android:
# Inside Debian container
apt update && apt upgrade -y
apt install sudo git curl wget -y
# Set timezone (example: Asia/Dhaka)
ln -sf /usr/share/zoneinfo/Asia/Dhaka /etc/localtime
You can even symlink your Debian home folder to Termux's filesystem for easy file sharing:
ln -s /data/data/com.termux/files/usr/var/lib/proot-distro/installed-rootfs/debian/home/YOUR_USER ~/Developer
🎨 Personalise Your Setup
Change the Termux Welcome Message
nano $PREFIX/etc/motd
Write anything you want — a quote, ASCII art, a dashboard. It shows every time you open Termux.
Configure GPG for Git Signing
nano ~/.gnupg/gpg-agent.conf
Add:
pinentry-program /data/data/com.termux/files/usr/bin/pinentry-gnome3
🔁 Every Time You Want to Start the Desktop
Just open Termux and run:
./start.sh
That's it. Your full desktop spins up in seconds.
🤔 Why XFCE4?
XFCE4 is the perfect choice for mobile hardware. It's:
- Lightweight — won't make your phone lag or overheat
- Stable — rock solid, no random crashes
- Highly customisable — themes, panels, plugins, everything
- Familiar — feels like a real desktop OS immediately
Compared to heavier alternatives like GNOME or KDE, XFCE4 runs smoothly even on mid-range phones.
💡 Pro Tips
- Keep Termux awake: Go to Android settings → Battery → Termux → set to "Unrestricted" to prevent the OS from killing your session.
- Use a Bluetooth keyboard & mouse for the full desktop experience — it genuinely feels like a real computer.
- External display? Some phones support video output via USB-C. Connect to a monitor and you've got a proper Linux workstation.
-
Tmux inside the terminal: The dotfiles also include a full tmux config (
~/.tmux.conf) with mouse support, sensible shortcuts, and a clean status bar — great for running multiple terminal sessions inside the desktop.
📁 Everything Is in the Dotfiles Repo
All the configs, scripts, and docs used in this guide live in one clean, well-organised repository:
👉 github.com/GourangaDasSamrat/dotfiles
It includes:
- The native desktop startup script
- Tmux configuration
- VS Code extension list for Termux
- PRoot Debian setup guide
- GPG & Git configuration templates
Star it, fork it, and make it your own. 🌟
🏁 Final Thoughts
A full Linux desktop on Android sounds like a geek fantasy — but with Termux, Termux:X11, and a solid dotfiles setup, it's completely real and surprisingly usable. Whether you're coding on the go, running a local server, or just geeking out, this setup delivers.
Your phone is now also a computer. Go build something cool. 💻📱
Found this useful? Give the dotfiles repo a ⭐ on GitHub!
Top comments (0)