Skip to content

Instantly share code, notes, and snippets.

@brccabral
Last active February 19, 2023 09:53
Show Gist options
  • Save brccabral/ccca0da7d53c53c9e0792208b0202853 to your computer and use it in GitHub Desktop.
Save brccabral/ccca0da7d53c53c9e0792208b0202853 to your computer and use it in GitHub Desktop.
Xwayland XFCE Android Termux-X11, no VNCserver

Xwayland XFCE Android Termux-X11, no VNCserver

Instructions from Technical Bot Xwayland on Android without Root | Termux-X11

  1. Install F-Droid
  1. Install Termux from F-Droid
  1. Update Termux
apt update && apt upgrade -y
  1. Set up Termux storage
termux-setup-storage
  1. Install X11-repo, wget and xfce
pkg install x11-repo wget
pkg install xfce4 xfce4-goodies xorg-xrandr xorg-xhost
  1. Edit termux.properties, uncomment allow-external-apps
nano .termux/termux.properties

allow-external-apps = true
  1. Download Termux-X11
  • https://github.com/termux/termux-x11
  • Go to Actions, then Build, then select the latest run, then scrolldown to the Artifacts, and download the zip file.
  • Inside it will contain the .apk and .deb files.
mv storage/downloads/termux-x11.zip $HOME
unzip termux-x11.zip
apt install xwayland
apt --fix-broken install
dpkg --install termux-x11.deb
cp app-debug.apk storage/downloads
  1. Go back to Downloads folder and install app-debug.apk
  • Run the app Termux-X11 and allow permissions.
  • Pull the top bar to show Termux-X11 notifications. Unfold the notification to show more options, select Preferences.
  • In the preferences you may want to check Show additional keyboard, in Touchscreen input mode I prefer Emulate touchpad
  • Force close the app.
  1. This command below will open Termux-X11 but with black screen.
export XDG_RUNTIME_DIR=${TMPDIR}
termux-x11 :1 &
  1. Run this to start XFCE session
env DISPLAY=:1 xfce4-session
  1. Go back to Termux-X11 to see the environment.
  2. While in Termux-X11, click with two fingers to perform a right-click. Select your phone's back button to open virtual keyboard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment