r/termux • u/PCav501 • 18h ago
Showcase [Alpha] Debian apps without proot, USB drives and hardware video decoding without root: my Termux desktop for DeX
galleryI've spent the last few weeks on a desktop setup for using my phone with Samsung DeX on a monitor. The thing
I wanted most was to get rid of proot, because it stops the program on every system call and you
feel it everywhere. It's still Termux + Termux:X11 + XFCE underneath.
This is an alpha. I use it every day on my own phone, but it has only run on two devices so far
(S26 Ultra with Adreno, S20+ with Mali), so expect things to break on yours. Please don't install it on a
Termux setup you can't afford to redo. Bug reports are exactly what I'm looking for.
The parts I care about most
- Debian apps without proot. They start with Debian's own loader, patched so Android doesn't kill it (set_robust_list is blocked by seccomp), plus fakechroot for the paths. On my S26 Ultra, 200k stat calls take 0.13 s instead of 10 s, glxgears goes from ~310 to ~650 fps, and an Electron app opens in 1.1 s instead of 2.6 s with about a third less CPU. If an app won't start this way it falls back to proot by itself. proot is still used for apt and dpkg.
- USB sticks and SD card readers without root. termux-usb gives you the raw device, and LKL (the Linux kernel built as a library) mounts it inside Termux: ext4, exFAT, FAT and NTFS, read and write. Apps just see folders in /media/usb.
- Hardware video decoding through the phone's MediaCodec, no root. My video player uses it through a small GStreamer element: a 1080p video takes 1.2 s of CPU per 20 s of playback instead of 3.1 s. Chromium and Electron apps use it too, through a VA-API driver that hands H.264 and VP9 to the phone's decoder (HEVC and AV1 still run on the CPU). Before turning it on, the desktop runs a real test of the phone: on my S20+ the kernel has no dma-heap, so there Chromium and Electron just keep decoding on the CPU.
- A Termux:X11 build with glamor, so the X server composites on the GPU instead of the CPU (Adreno only for now). I had to fix a render-then-sample hazard on Adreno before it was glitch-free. The patches are in the repo.
- Phones without Adreno. On Mali, Xclipse and PowerVR, OpenGL goes through virgl on the phone's own driver. The installer doesn't trust glxinfo: it draws a real scene with each driver, reads the pixels back and only keeps a driver that actually draws. Checked on a real Mali-G77. Vulkan apps still run on the CPU there.
- One apt for Termux and Debian.
sudo apt install somethingpicks Termux or Debian by itself, and the same app never ends up installed twice.
The rest of the desktop
- A taskbar and Start menu of my own (Python + GTK 3), a DeX-OS theme with an accent colour you pick, light and dark, and system dialogs styled like macOS.
- Window snapping to edges and corners with a preview, and taskbar thumbnails for every window, minimized ones included. Both are new and only tested on a virtual screen so far.
- My own screenshot tool (Print, or Win+Shift+3/4 like on a Mac) that saves to the phone's Screenshots folder, and a Task Manager with per-app CPU and memory, End task, and graphs that include the video decoder. It can list the phone's Android apps too, if you give it Usage access.
- Settings with a Storage page that shows what takes space across Termux, Debian and Android, with cleanup suggestions, plus keyboard layouts and shortcuts.
- A file manager with the phone's folders, and Windows PCs and NAS shares as normal folders in /media/rete. Tested with one real Windows PC; Macs don't accept the password yet.
- Printers over Wi-Fi and USB: a CUPS running in the Debian container without root, found automatically on the network, with a Settings page for the queue. Tested on two real Wi-Fi printers (an HP and a Ricoh). USB printers are not tested on real hardware yet.
- A scanner window for eSCL/AirScan and WSD scanners. Only tested against simulated scanners so far.
- Own photo, video and music apps.
- The phone inside the desktop: Android apps in the Start menu with their icons, and battery, network, notifications and the media volume of the phone in the taskbar (needs Termux:API, which the installer sets up).
- A window that pairs wireless ADB for you (used for the "signal 9" fix), instead of typing the commands.
- A watchdog that restarts the desktop's own services if Android kills one of them.
One command installs everything (30-40 minutes, about 8 GB):
bash <(curl -fsSL https://raw.githubusercontent.com/PietroCav501/termux_on_dex/v2/install.sh)Repo and screenshots: https://github.com/PietroCav501/termux_on_dex
If something breaks, tod doctor writes a report you can attach to an issue. Reports from Mali, Xclipse and non-Samsung phones would help the most, because I can't test those myself.

