Termux :Desktop devlog#3 — the big script cleanup
tl;dr
had two separate startup scripts doing almost the same thing and it was bothering me
merged everything into one unified launcher with a proper menu (A / B / C)
termux:x11 is now option A and actually works cleanly alongside the vnc stuff
script auto-detects usb tethering vs wifi so you don’t have to think about it
xrdp falls back to novnc automatically if usb isn’t connected (so it doesn’t just die)
updated the readme to actually reflect what the project does now
github: Tanmay-1122/Termux-desktop
what i changed
the big merge (two scripts → one)
before this i had termux11start.sh for termux:x11 and start-desktop.sh for the vnc/xrdp stuff. they were basically doing the same cleanup and xfce setup steps just slightly differently. every time i wanted to fix something i had to do it twice which was annoying so i just merged them.
now there’s one script that shows a menu when you run it:
A) Termux:X11 — hardware-accelerated ⚡
B) noVNC — browser access (wifi) 🌐
C) xRDP — windows rdp via usb 🪟
pick your mode, it handles the rest.
network detection up front
script now checks for usb tethering (rndis0 / usb0) and wifi (wlan0) before showing the menu
both ips are shown at the top so you know what’s available before you even pick a mode
option C shows a warning in the menu itself if usb isn’t detected instead of letting you pick it and then failing
shared helper function
pulled the .xsession and .Xclients setup into one setup_xsession() function
termux:x11 mode doesn’t need this at all (it runs on :0 not :1) so it skips it entirely
vnc and xrdp both call it — no more copy-pasted code
termux:x11 mode (option A)
pulled the logic from termux11start.sh and cleaned it up a bit:
starts pulseaudio with tcp auth so audio actually works
launches termux-x11 :0 in background, waits 3 seconds
calls am start to bring the x11 app to the foreground automatically
sets PULSE_SERVER=127.0.0.1 and DISPLAY=:0 then launches xfce4
xrdp fallback
if you pick option C but usb isn’t connected, instead of crashing or doing nothing it prints a message and automatically falls back to novnc mode after 3 seconds. small thing but made it way less frustrating to use.
readme rewrite
the old readme only talked about termux:x11. rewrote it to cover all three modes with:
a comparison table so people can pick the right mode for their situation
separate install instructions for novnc and xrdp (tigervnc, websockify, xrdp packages)
a preview of what the launcher menu actually looks like
connection instructions for each mode (what url to open, what app to use, etc.)
Comments 1
Wow this wery cool would like to try it.
Sign in to join the conversation.