diff --git a/Documentation/chroot/ubuntu_chroot.md b/Documentation/chroot/ubuntu_chroot.md
index d0f0f52..4bd6b1d 100644
--- a/Documentation/chroot/ubuntu_chroot.md
+++ b/Documentation/chroot/ubuntu_chroot.md
@@ -23,13 +23,13 @@
1. First you need to have your device rooted.
-2. You need to flash [Busybox NDK](https://github.com/Magisk-Modules-Repo/busybox-ndk) with Magisk.
+2. You need to flash [Busybox NDK](https://github.com/Magisk-Modules-Repo/busybox-ndk) with Magisk or if you use kernelSU you may use it's bundled busybox binary.
3. Then you need to install the following packages in Termux:
```
pkg update \
&& pkg install x11-repo root-repo \
-&& pkg install termux-x11-nightly sudo pulseaudio
+&& pkg install termux-x11-nightly sudo pulseaudio wget
```
@@ -48,35 +48,37 @@ These steps are from Ivon's blog but I've modified some of the lines. These are
su
```
-2. Create a directory at `/data/local/tmp` for chroot environment
+2. Create a directory at `/data/local` for chroot environment and fix potential permission issues
```
-mkdir /data/local/tmp/chrootubuntu
-cd /data/local/tmp/chrootubuntu
+mkdir -p /data/local/chroot/ubuntu
+chmod 755 /data/local/chroot/ubuntu
+chown root:root /data/local/chroot/ubuntu
+cd /data/local/chroot/ubuntu
```
3. Download [Ubuntu 24.04 LTS](https://cdimage.ubuntu.com/ubuntu-base/releases/24.04/release/) rootfs:
```
-curl https://cdimage.ubuntu.com/ubuntu-base/releases/24.04/release/ubuntu-base-24.04.3-base-arm64.tar.gz -o ubuntu.tar.gz
+curl https://cdimage.ubuntu.com/ubuntu-base/releases/24.04/release/ubuntu-base-24.04.4-base-arm64.tar.gz -o ubuntu.tar.gz
```
4. Extract the downloaded file and create sdcard folder
```
tar xpvf ubuntu.tar.gz --numeric-owner
-mkdir sdcard
+mkdir -p sdcard
```
5. Create startup script:
```
cd ..
-vi start_ubuntu.sh
+busybox vi start_ubuntu.sh
```
Copy and paste the following:
```
#!/bin/sh
# The path of Ubuntu rootfs
-UBUNTUPATH="/data/local/tmp/chrootubuntu"
+UBUNTUPATH="/data/local/chroot/ubuntu"
# Fix setuid issue
busybox mount -o remount,dev,suid /data
@@ -106,7 +108,8 @@ sh start_ubuntu.sh
7. The prompt will change to `root@localhost`. If you need to return to Termux just write `exit`. Let's perform some fixes:
```
echo "nameserver 8.8.8.8" > /etc/resolv.conf
-echo "127.0.0.1 localhost" > /etc/hosts
+echo "127.0.0.1 localhost
+::1 localhost" > /etc/hosts
groupadd -g 3003 aid_inet
groupadd -g 3004 aid_net_raw
@@ -119,7 +122,7 @@ apt update && apt upgrade
apt install nano vim net-tools sudo git
```
-8. Set timezone the interactive shell should prompt you to select your timezone if it doesn't run this:
+8. Set timezone. The interactive shell should prompt you to select your timezone if it doesn't run this:
```
dpkg-reconfigure tzdata
```
@@ -177,7 +180,7 @@ EOF
14. Exit chroot and modify the `start_ubuntu.sh` script created on step `5`:
```
-vi /data/local/tmp/start_ubuntu.sh
+vi /data/local/chroot/start_ubuntu.sh
```
Comment the last line `busybox chroot $UBUNTUPATH /bin/su - root` and write the following line under it:
```
@@ -187,7 +190,7 @@ If you've installed a different Desktop Environment you need to replace `startxf
15. Let's run the Desktop Environment. Exit chroot environment and download the script with wget and start it on Termux (you can close everything and reopen Termux to be sure you are outside chroot).
```
-wget https://raw.githubusercontent.com/LinuxDroidMaster/Termux-Desktops/main/scripts/chroot/ubuntu/startxfce4_chrootubuntu.sh
+wget https://raw.githubusercontent.com/LinuxDroidMaster/Termux-Desktops/refs/heads/main/scripts/chroot/ubuntu/startxfce4_chrootubuntu.sh
chmod +x startxfce4_chrootubuntu.sh
./startxfce4_chrootubuntu.sh
@@ -201,11 +204,11 @@ chmod +x startxfce4_chrootubuntu.sh
* Download Ubuntu 24.04 rootfs:
```
-curl https://cdimage.ubuntu.com/ubuntu-base/releases/24.04/release/ubuntu-base-24.04.3-base-arm64.tar.gz -o ubuntu.tar.gz
+curl https://cdimage.ubuntu.com/ubuntu-base/releases/24.04/release/ubuntu-base-24.04.4-base-arm64.tar.gz -o ubuntu.tar.gz
```
---
-A note if you want to use firefox use the apt repository it's recommended [Firefox](https://support.mozilla.org/en-US/kb/install-firefox-linux).
+* Note if you want to use firefox use the apt repository it's recommended [Firefox](https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions-recommended).
## 🎨 Customizations (Nerdfonts, XFCE4 terminal color palettes, etc)
diff --git a/Documentation/proot/ubuntu_proot.md b/Documentation/proot/ubuntu_proot.md
index 357a526..c6be66c 100644
--- a/Documentation/proot/ubuntu_proot.md
+++ b/Documentation/proot/ubuntu_proot.md
@@ -2,7 +2,7 @@
## PROOT-DISTRO (🟠 UBUNTU)
* 🏁 [First steps](#first-steps-ubuntu-proot)
-* ⬇️ [Download scripts to run the desktops](#easy-download-ubuntu-proot)
+* ⬇️ [Download scripts to run the desktops](#script-download-ubuntu-proot)
* ⚙️ [Installing Desktops](#installing-desktops-ubuntu-proot)
@@ -15,7 +15,7 @@
## 🏁 First steps
> [!NOTE]
-> All the process is described in more detail in this [video](https://www.youtube.com/watch?v=_vxhzSG2zVQ) (ourdated).
+> All the process is described in more detail in this [video](https://www.youtube.com/watch?v=_vxhzSG2zVQ) (outdated).
First you need to install the following packages in Termux:
```
@@ -33,58 +33,94 @@ proot-distro login ubuntu
Update repositories and install any package you want:
```
apt update && apt upgrade
-
apt install sudo vim -y
```
----
-
+---
+
+
+## ⬇️ Download launch scripts:
-## ⬇️ Download scripts easily:
-* startgnome_ubuntu.sh
-```
-wget https://raw.githubusercontent.com/LinuxDroidMaster/Termux-Desktops/main/scripts/proot_ubuntu/startgnome_ubuntu.sh
-```
* startxfce4_ubuntu.sh
+
```
wget https://raw.githubusercontent.com/LinuxDroidMaster/Termux-Desktops/main/scripts/proot_ubuntu/startxfce4_ubuntu.sh
```
+* startplasma_ubuntu.sh
+
+```
+wget https://raw.githubusercontent.com/LinuxDroidMaster/Termux-Desktops/main/scripts/proot_ubuntu/startplasma_ubuntu.sh
+```
+
---
# ⚙️ Installing Desktops
-I have use the following [post](https://ivonblog.com/en-us/posts/termux-proot-distro-ubuntu/) from Ivon's blog as a reference for some steps.
+I have use the following [post](https://ivonblog.com/en-us/posts/termux-proot-distro-ubuntu/) from Ivon's blog as a reference for some steps.
-
+## ️️🖥️ Desktop environments
-
- GNOME
+1. Remove PPA:
-
+```
+# install ppa-purge
+apt install ppa-purge
-> [!NOTE]
-> All the process is described in more detail in this [video](https://www.youtube.com/watch?v=_vxhzSG2zVQ).
+# remove mozilla team ppa
+ppa-purge ppa:mozillateam/ppa
+```
-
+Remove preference files so it doesn't use the ppa:
+```
+# use ppa-purge
+ppa-purge ppa:mozillateam/ppa
+# remove ppa-purge
+apt autopurge ppa-purge
```
-# Commands:
-proot-distro login ubuntu --user droidmaster
+
+2. Create a new user and switch to the newly created user:
+
```
+adduser droidmaster
+su - droidmaster
```
-sudo apt install dbus-x11 ubuntu-desktop -y
+
+3. Install the desktop environment:
+
+* XFCE4
+
```
-Run this command after it finishes:
+apt install xubuntu-desktop -y
```
-for file in $(find /usr -type f -iname "*login1*"); do rm -rf $file
-done
+
+* Remove snap it cannot be used inside termux without a specialized setup.
+
```
-Disable snapd as it doesn't work on Termux
+cat <
-
+## 🦊 Install Firefox
+Note I used the official Mozilla [support page](https://support.mozilla.or/g/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions-recommended) for the content below.
-
- Other desktosp (XFCE4, Mate, LXDE, etc)
-
+* Import the Mozilla APT repository signing key:
+
+```
+wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
+```
-Follow the same [installation steps](https://github.com/LinuxDroidMaster/Termux-Desktops/blob/main/Documentation/proot/debian_proot.md#installing-desktops) as for Debian.
+* Next, add the Mozilla APT repository to your sources.list:
+```
+cat <
+* Configure APT to prioritize packages from the Mozilla repository:
----
-
+```
+echo '
+Package: *
+Pin: origin packages.mozilla.org
+Pin-Priority: 1000
+' | sudo tee /etc/apt/preferences.d/mozilla
+```
+---
diff --git a/README_old.md b/README_old.md
index 057f223..f82c783 100644
--- a/README_old.md
+++ b/README_old.md
@@ -14,7 +14,7 @@ Collection of scripts to launch Desktops with audio in Termux X11. You have also
### PROOT-DISTRO (🟠 UBUNTU)
* 🏁 [First steps](#first-steps-ubuntu-proot)
* ⚙️ [Installing Desktops](#installing-desktops-ubuntu-proot)
-* ⬇️ [Download scripts to run the desktops](#easy-download-ubuntu-proot)
+* ⬇️ [Download scripts to run the desktops](#script-download-ubuntu-proot)
### PROOT-DISTRO (🔼 ARCH)
* 🏁 [First steps](#first-steps-arch)
@@ -268,7 +268,7 @@ apt install sudo nano adduser -y
---
-## ⬇️ Download scripts easily:
+## ⬇️ Download scripts easily:
* startgnome_ubuntu.sh
```
wget https://raw.githubusercontent.com/LinuxDroidMaster/Termux-Desktops/main/scripts/proot_ubuntu/startgnome_ubuntu.sh
diff --git a/scripts/chroot/ubuntu/start_ubunut.sh b/scripts/chroot/ubuntu/start_ubunut.sh
index e225931..9896a13 100644
--- a/scripts/chroot/ubuntu/start_ubunut.sh
+++ b/scripts/chroot/ubuntu/start_ubunut.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Ubuntu rootfs path
-UBUNTUPATH="/data/local/tmp/chrootubuntu"
+UBUNTUPATH="/data/local/chroot/ubuntu"
# Fix setuid issue
busybox mount -o remount,dev,suid /data
diff --git a/scripts/chroot/ubuntu/startxfce4_chrootUbuntu.sh b/scripts/chroot/ubuntu/startxfce4_chrootubuntu.sh
similarity index 80%
rename from scripts/chroot/ubuntu/startxfce4_chrootUbuntu.sh
rename to scripts/chroot/ubuntu/startxfce4_chrootubuntu.sh
index 28fc89f..becc5f2 100644
--- a/scripts/chroot/ubuntu/startxfce4_chrootUbuntu.sh
+++ b/scripts/chroot/ubuntu/startxfce4_chrootubuntu.sh
@@ -7,8 +7,8 @@ killall -9 termux-x11 Xwayland pulseaudio virgl_test_server_android termux-wake-
# Start Termux-X11
am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity
-sudo mkdir -p /data/local/tmp/chrootubuntu/tmp
-sudo busybox mount --bind $PREFIX/tmp /data/local/tmp/chrootubuntu/tmp
+sudo mkdir -p /data/local/chroot/ubuntu/tmp
+sudo busybox mount --bind $PREFIX/tmp /data/local/chroot/ubuntu/tmp
XDG_RUNTIME_DIR=${TMPDIR} termux-x11 :0 -ac &
@@ -22,4 +22,4 @@ pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymou
#virgl_test_server_android &
# Execute chroot Ubuntu script
-su -c "sh /data/local/tmp/start_ubuntu.sh"
+su -c "sh /data/local/chroot/start_ubuntu.sh"
diff --git a/scripts/proot_ubuntu/startplasma_ubuntu.sh b/scripts/proot_ubuntu/startplasma_ubuntu.sh
new file mode 100644
index 0000000..273b435
--- /dev/null
+++ b/scripts/proot_ubuntu/startplasma_ubuntu.sh
@@ -0,0 +1,27 @@
+#!/data/data/com.termux/files/usr/bin/bash
+
+# Kill open X11 processes
+kill -9 $(pgrep -f "termux.x11") 2>/dev/null
+
+# Enable PulseAudio over Network
+pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1
+
+# Prepare termux-x11 session
+export XDG_RUNTIME_DIR=${TMPDIR}
+termux-x11 :0 >/dev/null &
+
+# Wait a bit until termux-x11 gets started.
+sleep 3
+
+# Launch Termux X11 main activity
+am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity > /dev/null 2>&1
+sleep 1
+
+# Login in PRoot Environment. Do some initialization for PulseAudio, /tmp directory
+# and run XFCE4 as user droidmaster.
+# See also: https://github.com/termux/proot-distro
+# Argument -- acts as terminator of proot-distro login options processing.
+# All arguments behind it would not be treated as options of PRoot Distro.
+proot-distro login ubuntu --shared-tmp -- /bin/bash -c 'export PULSE_SERVER=127.0.0.1 && export XDG_RUNTIME_DIR=${TMPDIR} && su - droidmaster -c "env DISPLAY=:0 dbus-startup --exit-with-session startplasma-x11"'
+
+exit 0