Ubuntu 22.04 Jammy on Fresh Termux App with GUI
Step 1: Set Up Termux App
Download and install the latest Termux app for Android.
Enable allow-external-apps in ~/.termux/termux.properties:
echo 'allow-external-apps = true' >> ~/.termux/termux.properties
Step 2: Install Essential Packages
Install Git and update packages:
pkg install git
apt update
apt upgrade
Step 3: Set Up Storage Access
Configure Termux storage access:
termux-setup-storage
Step 4: Install Udroid
Clone and install Udroid:
git clone https://github.com/RandomCoderOrg/fs-manager-udroid
cd fs-manager-udroid
bash install.sh
Step 5: Install Proot
pkg install proot
Step 6: Install Ubuntu 22.04 Jammy
Install the Jammy distro:
udroid --suite jammy -i raw
Step 7: Login to Jammy Distro
Login and update the system:
proot-distro login udroid-jammy-raw
apt update
apt upgrade
Step 8: Create a Non-Root User
Create user v8 and configure sudo:
pkg install sudo
adduser v8
_user=v8
echo $_user ALL=\(root\) ALL > /etc/sudoers.d/$_user
chmod 0440 /etc/sudoers.d/$_user
Step 9: Edit Sudoers File
Install nano and edit sudoers:
sudo apt install nano -y
sudo nano /etc/sudoers
Add under # User privilege specification:
v8 ALL=(ALL:ALL) ALL
Step 10: Login as User
login v8
Step 11: Install XFCE4 Desktop
Install XFCE4 desktop environment:
sudo apt update && sudo apt upgrade -y
sudo apt install xfce4
sudo apt install xfce4-goodies
Optional (not recommended due to Snap):
sudo apt install xubuntu-desktop
Step 12: Configure Termux-X11
Exit to Termux and install X11 repo and XWayland:
exit
exit
pkg install x11-repo -y
pkg install xwayland -y
Download and install Termux-X11 app and .deb from:
https://github.com/termux/termux-x11/releases
Navigate to the download directory and install:
cd storage/shared/Download
dpkg -i termux-x11.deb
git clone https://github.com/termux/x11-packages.git
Final Configuration
echo 'allow-external-apps = true' >> ~/.termux/termux.properties
termux-x11 > /dev/null &
pulseaudio --start \
--load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" \
--exit-idle-time=-1
proot-distro login udroid-jammy-raw --shared-tmp
login v8
DISPLAY=:0 xfce4-session
Troubleshooting Firefox on Ubuntu 22.04
Remove Snapd
sudo apt remove --purge --assume-yes snapd gnome-software-plugin-snap
rm -rf ~/snap/
sudo rm -rf /var/cache/snapd/
Prevent Snapd Reinstallation
sudo nano /etc/apt/preferences.d/nosnap.pref
Paste:
Package: snapd
Pin: release a=*
Pin-Priority: -10
Install Firefox Without Snap
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:mozillateam/ppa
sudo apt install -t 'o=LP-PPA-mozillateam' firefox
Or install ESR version:
sudo apt install firefox-esr -y
Set Higher Priority for Firefox
sudo nano /etc/apt/preferences.d/mozillateamppa
Paste:
Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501
Update packages:
sudo apt update
Alternative: Install Chromium
curl -L -o chromium-install.sh https://raw.githubusercontent.com/RandomCoderOrg/udroid-app-ports/main/chromium/install.sh
sudo bash chromium-install.sh
Proot Tools (Run as root)
git clone https://github.com/RandomCoderOrg/udroid-extra-tool-proot
cd udroid-extra-tool-proot
bash install.sh