Frontend: Lightweight Desktops (Cinnamon, LXDE)
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
The Termux-Desktops project provides a framework for running full Linux desktop environments on Android devices using Termux and Termux:X11. Cinnamon and LXDE represent two "Lightweight" frontend options within this ecosystem, primarily deployed through PRoot (no-root) or Chroot (root required) environments. While Cinnamon offers a more modern, traditional desktop experience, LXDE is positioned as a high-efficiency alternative for devices with limited resources.
These desktop environments are integrated into the project via automated installation commands and specialized startup scripts that manage display (X11) and audio (Pulseaudio) routing from the Linux container to the Android host application. Sources: Documentation/proot/debian_proot.md:14-18, README_old.md:12-16
Architecture and Environment Integration
The project utilizes PRoot-distro to facilitate the execution of these desktops without requiring administrative (root) privileges on the Android device. The architecture relies on three primary components: Termux (terminal emulator), Termux:X11 (X server), and Pulseaudio (sound server).
Deployment Workflow
The following diagram illustrates the initialization flow from a clean Termux installation to a running Cinnamon or LXDE session.
The workflow ensures that system dependencies such as dbus-x11 are present to handle session management within the containerized environment. Sources: Documentation/proot/debian_proot.md:77-101, scripts/chroot/debian/chroot_debian_installer.sh:163-176
Cinnamon Desktop Environment
Cinnamon is supported primarily on Debian and Ubuntu PRoot environments. It is characterized as a "complete Linux environment" providing a traditional user interface.
Installation and Execution
Installation is performed through the standard APT package manager after logging into the PRoot distribution.
| Environment | Installation Command | Startup Script |
|---|---|---|
| Debian PRoot | sudo apt install cinnamon -y | startcinnamon_debian.sh |
| Debian Chroot | apt install cinnamon | Managed by installer |
Sources: Documentation/proot/debian_proot.md:95-101, scripts/chroot/debian/chroot_debian_installer.sh:169-172
Session Initialization Logic
The startup script for Cinnamon must export specific environment variables to bridge the container to the Android X11 server.
# Example logic derived from environment requirements
export DISPLAY=:0
export PULSE_SERVER=tcp:127.0.0.1:4713
dbus-launch --exit-with-session cinnamon-session
Sources: Documentation/chroot/debian_chroot.md:128-131, Documentation/proot/debian_proot.md:115-120
LXDE Desktop Environment
LXDE (Lightweight X11 Desktop Environment) is the most resource-efficient option provided, designed for high performance on older or lower-end Android hardware.
Component Breakdown
LXDE installation via the project's scripts typically includes dbus-x11 to prevent session bus errors during GUI initialization.
| Feature | Description | File Reference |
|---|---|---|
| Package Name | lxde | debian_proot.md |
| Sudo Access | Required for installation | README_old.md |
| User Profile | Default: "droidmaster" | startlxde_debian.sh |
| Audio Support | Pulseaudio via TCP | debian_proot.md |
Sources: Documentation/proot/debian_proot.md:89-93, scripts/chroot/debian/chroot_debian_installer.sh:174-177
Connection Flow
The sequence below describes how the LXDE frontend communicates with Termux services.
Configuration and Management
User Privileges
Both desktops require a user with sudo privileges to operate correctly. The project defaults to a user named droidmaster. Scripts must be modified if a different username is used.
# Adding the user to sudoers
adduser droidmaster
echo "droidmaster ALL=(ALL:ALL) ALL" >> /etc/sudoers
Sources: Documentation/proot/debian_proot.md:55-68, scripts/chroot/debian/chroot_debian_installer.sh:137-142
Automated Installer Support
The chroot_debian_installer.sh script provides an interactive menu for setting up these frontends in a rooted environment, though it notes some options as "not ready" in certain versions, requiring manual package installation.
# Selection logic in installer
echo "1. XFCE4"
echo "4. LXDE - not ready"
read DE_OPTION
Sources: scripts/chroot/debian/chroot_debian_installer.sh:146-155
Summary
The Cinnamon and LXDE frontends provide versatile UI options for the Termux-Desktops project. Cinnamon is preferred for users seeking a feature-rich desktop experience, while LXDE serves as the lightweight baseline for performance-oriented setups. Both rely on a standardized stack of PRoot/Chroot, Termux:X11, and Pulseaudio to function on the Android platform.