linux, android, terminal, tutorial,

Install Ubuntu on Termux with XFCE Easily

Agampreet Singh Agampreet Singh Follow Mar 07, 2022 · 2 mins read
Install Ubuntu on Termux with XFCE Easily
Share this

Today I’ll show you how to install Ubuntu on Termux with a desktop environment XFCE. No Root required. Before starting, I would like to tell that this was possible by a guy called tuanpham-dev on GitHub. According to the repository:

This installs Ubuntu 20 with xfce4 desktop on Termux. All scripts are from Andronix, I just compose and edit them to make the installer easier and smoother. It includes:
- Ubuntu 20
- XFCE4 Desktop
- TigerVNC Server
- Non-root Account Creation
- Audio Support
- Chromium Browser

So, Let’s Start:

  • First, install Termux from F-Droid - Download Here
  • Now, install the required packages needed for installing Ubuntu.
    pkg update -y; pkg install git wget curl nano -y
  • Next, run this script (from tuanpham-dev/termux-ubuntu to start the installation:
    pkg install wget curl proot tar -y && wget https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/ubuntu.sh && chmod +x ubuntu.sh && bash ubuntu.sh
    It will ask you for some things like timezone, local, a non-root username and password and some more stuff. And Ubuntu with XFCE will be installed and you’ll be in the Ubuntu shell.
  • (Optional) Update and install recommended packages: sudo apt update; sudo apt upgrade -y; sudo apt install git nano curl wget build-essential -y
  • Now, to access XFCE, you need to install a VNC Viewer. I personally like the VNC Viewer by RealVnc but you can go with any app.
  • Though VNC Server will be automatically started when installed, you can use the command vncserver-start to start VNC server on Ubuntu.
  • Now, open the VNC Viewer app of your choice and connect to the desktop with localhost:1 or your device ip with port 1. And you’ll get the XFCE Desktop Environment 🎉
  • Now, to stop the VNC Server, run the command vncserver-stop
  • You can exit Ubuntu now. Run exit. (Don’t forget to stop the vnc server before exiting)

And Tada! We now have Ubuntu with XFCE Installed on Termux!

If you want to login to Ubuntu again, open Termux, and “in termux”, run ./start-ubuntu20.sh. VNC Server will be started automatically upon launch.
Note: You can’t use systemd in Ubuntu on Termux.

Thanks for Reading. If you have any doubts/feedback, you can comment below.
Bye! See you later! 👋

(Fun Fact: This post was also written on Ubuntu on Termux 😜)

Agampreet Singh
Written by Agampreet Singh Follow
A student who is also a Tech Enthusiast. Founder of this Blog Website