Everything you need to know about Termux-X11



Termux-X11 is an add-on to Termux which uses Wayland display protocol instead of Xorg. It runs much faster than VNC. So In this article we will see how we can install and use it.


Prerequisite:

Termux





Installation:


First we need to install X11-repo, execute following to install it


pkg update ; pkg install x11-repo


Now install Wayland


pkg install xwayland


Next we need to get Termux-X11 zip file from its Github actions, But before downloading it you will need a Github account as it is not released for public yet.


After downloading it, we need to copy it to Termux, But before that we need to give storage access to it. execute following in Termux.


termux-setup-storage

cp /sdcard/Download/termux-x11.zip .


Now extract it


unzip termux-x11.zip


Next we need to install termux-x11 package


dpkg -i --force-depends termux-x11.deb


After it is installed, extract the termux-x11 zip file in your file manager and install .apk file.


After you installed it, Go back to Termux and allow external apps


echo "allow-external-apps = true" >> ~/.termux/termux.properties


Now we are done with installation process,

You can directly use it for Termux-desktop


termux-x11 :1

DISPLAY=:1 xfce4-session


If you want to use it with proot-distro, then first start termux-x11


termux-x11 :1


Then login to your distro with --shared-tmp flag, this will share termux's tmp directory with proot. We need to do this because by default wayland socket is stored in Termux's  tmp directory. (Here I am using Ubuntu, You can use any you want)


proot-distro login ubuntu --shared-tmp 


After you logged in, just export DISPLAY environment variable.


export DISPLAY=:1 


Now start your desktop environment (Here I am using xfce)


xfce4-session


That's enjoy using it !





Post a Comment (0)
Previous Post Next Post