A portable Linux environment for Android designed to overcome mobile OS limitations.
Download and run the setup script directly from GitHub in Termux:
curl -sL https://raw.githubusercontent.com/arinadi/DroidDesk/main/setup-proot-xfce.sh -o ~/setup-proot-xfce.sh
chmod +x ~/setup-proot-xfce.sh
bash ~/setup-proot-xfce.shNote
This script installs XFCE inside an Ubuntu proot and creates specialized launcher scripts for Termux:X11 and PulseAudio.
After the main installation, you can install Browsers (Firefox), AI Tools, and Development IDEs using the interactive package installer:
curl -sL https://raw.githubusercontent.com/arinadi/DroidDesk/main/install-tui-packages.sh | bashDroidDesk isn't just a terminal; it's a complete Linux workstation in your pocket. It solves the two biggest pain points of mobile productivity:
- Overcoming Android Sleep Limits: Native Android browsers (Chrome/Firefox) aggressively sleep background tabs when the screen is off. By running a full desktop browser inside a proot Linux session, you can keep complex web apps alive.
- Usecase: Running Google Colab as a background backend for a Telegram bot or long-running scripts that must not sleep.
- Native Developer Tooling: Mobile apps are limited. DroidDesk provides standard
glibcenvironments for the tools you actually use.- Usecase: A full Web Development IDE (VS Code, Geany) with native Node.js, Python, and Git, allowing you to code anywhere with a desktop-class experience.
While you can install XFCE natively in Termux, running the entire desktop inside a proot Ubuntu environment offers a much smoother "daily-driver" experience:
- 📦 Standard
glibcbinaries: Termux usesbionic(Android's libc), which breaks many standard Linux apps. Ubuntu proot uses standardglibc, ensuring maximum compatibility. - 📂 Android Storage Integration: DroidDesk bridges the gap between mobile and desktop files. It bind-mounts your internal storage to
/sdcardand creates native-style symlinks:~/Downloads→ Android'sDownloadfolder.~/Pictures→ Android'sDCIM/Camerafolder.~/Android_Internal→ Full/sdcardaccess.
- 🔗 Seamless App Integration: Setting proot apps as defaults in native Termux XFCE is difficult. By putting the entire XFCE desktop inside Ubuntu, apps like
firefox-esr"Just Work" as the system browser. - 🛡️ Better App Stability: Apps run exactly as they would on a standard desktop. Firefox ESR, for example, handles complex JavaScript and Google logins perfectly inside proot.
- 🐧 Why Ubuntu? Ubuntu provides superior binary support and PPA availability for ARM64 compared to Debian or Fedora ARM ports in proot environments.
- Installs Termux-required packages (
x11-repo,termux-x11-nightly,proot-distro). - Sets up an Ubuntu proot distro.
- Installs XFCE and basic GUI tooling (thunar, settings, audio utils).
- Android Storage Integration: Automatically mounts your phone's internal storage to
/sdcardand creates symlinks in the Ubuntu home directory (~/Downloads,~/Pictures,~/Android_Internal). - Android Hardware Control: Built-in bridge for Termux:API. Control your phone's battery, notifications, and sensors directly from the XFCE terminal.
- Generates 6 focused launcher scripts in
~/.shortcuts/(with symlinks to~/):- 🟢
start-x11.sh— Start Termux:X11 and PulseAudio (Host). - 🟢
start-xfce.sh— Start XFCE session (Proot). - 🔴
kill-x11.sh— Stop X11 and PulseAudio (cleans sockets). - 🔴
kill-proot.sh— Stop all XFCE processes and clean session cache. - 🔴
kill-all.sh— Stop everything with one command. - 🔄
update-droiddesk.sh— Safely update these scripts from GitHub.
- 🟢
To keep the environment lightning-fast and prevent storage bloat, this script avoids "kitchen-sink" meta-packages. Instead, we use a highly curated, modular list:
1. Termux Host Packages:
termux-setup-storage: Grants Termux access to your phone's internal memory.termux-api: Enables communication between the Linux desktop and Android hardware.x11-repo&tur-repo: Required for high-performance X11 and Termux User Repository packages.termux-x11-nightly: The best, highest-performance X server for Android.proot-distro: The safest way to manage Linux containers in Termux.pulseaudio&xorg-xrandr: Essential for audio forwarding and display scaling.
2. Ubuntu Proot Packages (--no-install-recommends):
dbus-x11: Crucial for Inter-Process Communication (IPC).xfce4-session,xfwm4,xfce4-panel: Bare minimum to render a working desktop.xfdesktop4,thunar,xfce4-settings,xfce4-terminal: Desktop background, file manager, GUI settings, and terminal.libgl1,mesa-utils: OpenGL rendering support.
- Android phone (ARM64)
- Termux (installed from F-Droid, NOT Play Store)
- Termux:X11 Android app (Nightly release)
- Termux:API Android app (installed from F-Droid)
- Termux:Widget (Optional, but recommended for 1-tap launchers)
DroidDesk comes with an optimized XFCE configuration (64px panel, high DPI, black wallpaper) designed for mobile screens.
To apply the pre-set theme inside your Proot environment:
curl -sL https://raw.githubusercontent.com/arinadi/DroidDesk/main/apply-xfce-config.sh | bashNote: Restart your XFCE session after applying.
If your Termux session crashes with [Process completed (signal 9) - press Enter], Android's Phantom Process Killer has terminated your desktop.
To fix this permanently:
- Android 14+:
- Enable Developer Options in Android Settings.
- Find "Disable child process restrictions" and turn it ON.
- Android 12 & 13:
You must use ADB (from a PC or via Wireless Debugging) to run:
adb shell "/system/bin/device_config put activity_manager max_phantom_processes 2147483647" adb shell settings put global settings_enable_monitor_phantom_procs false
Warning
Without this fix, your Proot XFCE session will crash repeatedly during heavy usage (e.g., browsing the web).
If you have Termux:Widget installed, the setup script automatically makes launchers available on your homescreen! Start or stop sessions with a single tap.
For terminal usage, run the symlinks in your home directory:
bash ~/start-x11.sh(Starts Termux:X11 and PulseAudio server)
bash ~/start-xfce.sh(Launches the XFCE session inside the proot container)
bash ~/kill-all.sh(Securely kills all desktop processes, audio servers, and cleans socket files)
You can control your phone directly from the Ubuntu terminal using the tapi bridge or built-in aliases:
termux-battery-status— Check phone battery level.termux-toast "Hello from Ubuntu!"— Show a toast message on Android.termux-vibrate— Make the phone vibrate.tapi termux-camera-info— Get camera specifications.
Tip
Workflow: Always run the kill scripts before starting a new session to ensure a clean slate and avoid "X server already running" or missing cursor errors!
start-xfce.shmust be run only afterstart-x11.shis already running.- The session runs via
dbus-launch --exit-with-session startxfce4. - If display is unstable, try adding
-legacy-drawingor-force-bgrato thestart-x11.shscript.
To update your launcher and kill scripts without losing your Linux installation or personal files, run the update script:
bash ~/update-droiddesk.shThis will download the newest scripts, update missing packages, and overwrite your old shortcuts automatically.
To free up space and start completely fresh:
- Go to Android Settings > Apps > Termux.
- Tap Storage > Clear Data.
Caution
This will permanently wipe your proot distro and all Linux files inside Termux.
Released under the GPLv3 license.