Install kde-plasma-desktop and ubuntu on android (chroot)
Install kde-plasma-desktop and ubuntu on android (chroot)
REQUIRES ROOTED DEVICE
Requires at least 5 GB of storage, approx <1.5 GB of network data

Backup and rename your /sdcard/linux.img if you have one
Ubuntuusernamepasswordusername+ icon on top right > Source : /sdcard Target : /sdcard⋮ icon in Linux Deploy > Install . It needs a stable Internet connection, otherwise it might fail at some step. Proceed to next step only after installation is complete.START button in Linux Deploy.apt updateapt install -y openssh e2fsprogs pulseaudioecho "pkill pulseaudio;pulseaudio --start --exit-idle-time=-1 && pacmd load-module module-native-protocol-tcp auth-anonymous=1" > $PREFIX/etc/profile.d/pulseaudio.shchmod +x $PREFIX/etc/profile.d/pulseaudio.sh$PREFIX/etc/profile.d/pulseaudio.shtermux-setup-storage (Allow termux to access storage)e2fsck -f /sdcard/linux.img (Press enter on all prompts. Recommended to stop linux deploy before this step and start after resizing!)resize2fs /sdcard/linux.img 5G (This step will change size of linux.img to 5G. You can change it anytime required.)ssh-keygen (Press Enter on all prompts. If it asks for overwrite type ‘y’ and press Enter)ssh-copy-id -i ~/.ssh/id_rsa username@localhost (Type “yes” to accept fingerprint. On prompt for password type password you set in Linux Deploy)ssh username@localhostwhoami or sudo apt install -y neofetch && neofetch and it should display your username.sudo passwd (Set root user password. Enter your password 2 times. This is root user password, the password set in Linux Deploy was username user password)sudo su -c 'grep -qxF "deb http://ports.ubuntu.com/ bionic-updates main restricted" /etc/apt/sources.list || echo "deb http://ports.ubuntu.com/ bionic-updates main restricted" >> /etc/apt/sources.list' sudo apt updatesudo DEBIAN_FRONTEND='noninteractive' apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' dist-upgradesudo apt install -y ubuntu-release-upgrader-coresudo do-release-upgrade -f DistUpgradeViewNonInteractive (Press ‘Enter’ key on any prompt. Upgrades from ubuntu bionic 18.04 to focal 20.04. Takes long time)sudo sed -i 's/Prompt=lts/Prompt=normal/g' /etc/update-manager/release-upgradessudo do-release-upgrade -f DistUpgradeViewNonInteractive (Press ‘Enter’ key on any prompt. Upgrades from ubuntu focal 20.04 to hirsute 21.04. Takes long time)sudo do-release-upgrade -f DistUpgradeViewNonInteractive (Press ‘Enter’ key on any prompt. Upgrades from ubuntu hirsute 21.04 to Impish Indri 21.10. Takes long time)sudo apt install -y kde-plasma-desktop (Press ‘Enter’ key on any prompt. Installs plasma kde desktop. apprx 600 Mb. download)sudo apt remove -y tightvncserver && sudo apt install -y --install-suggests tigervnc-standalone-server dbus-x11 net-toolssudo service dbus startsudo bash -c 'mkdir -p /etc/rc.local && echo -e "#!/bin/bash \n [[ -z "\$PULSE_SERVER" ]] && export PULSE_SERVER=127.0.0.1 \n sudo rm -rf /etc/profile.d/pulse.sh \n vncserver -kill :1 \n sudo rm /tmp/.X11-unix/X1 /tmp/.X1-lock \n dbus-launch tigervncserver -localhost no -geometry 1366x768 -xstartup /usr/bin/startplasma-x11 -listen tcp :1" > /etc/rc.local/init'sudo bash -c 'echo -e "#!/bin/bash \n [[ ! -z "\$XDG_CURRENT_DESKTOP" ]] &&echo "Execute this command from termux after logging in to ubuntu via ssh" && exit \n export PULSE_SERVER=\$1 \n vncserver -kill :1 \n /etc/rc.local/init">/bin/audioserver 'sudo chmod +x /etc/rc.local/init /bin/audioservervncpasswd (Here set your VNC password to be used in vnc viewer. Enter n when it asks for “Would you like to enter a view-only password”.)sudo mv /etc/apt/apt.conf.d/20packagekit /etc/apt/apt.conf.d/20packagekit.disabled (Fix the “Error connecting: Could not connect: Connection refused” bug with apt)Now simply restart linux container. Linux Deploy>STOP. Linux Deploy>START.
locahost:5901as address. Set Picture Quality to “High”.sudo apt install -y --install-suggests remmina remmina-plugin-vncifconfig in Termux. You will see a screen similiar to below image. Get the inet of wlan0 or wlan1 whichever represents your common network. This is the address you will use in VNC viewer. Lets call it internal_ip


This section includes some customisations to make life easier. ;-). These steps are completely voluntary, and my personal preference. Login to ubuntu via termux or vnc viewer (and open konsole). Also restart linux container after customisation to take effect.
sudo apt install -y firefoxsudo apt install -y zsh && sudo chsh $(which zsh)sudo apt install -y curl git && sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"plugins=(git command-not-found zsh-autosuggesitions zsh-syntax-highlighting) . Note that zsh-syntax-highlighting should be the last plugin.e2fsck -f /sdcard/linux.img (Press enter on all prompts.)resize2fs /sdcard/linux.img 10G (Replace 10G with the amount of storage u want linux to have)xdpyinfo | grep 'dimensions:' to find resolution.
sudo bash -c 'echo -e "#!/bin/bash \n [[ -z "\$PULSE_SERVER" ]] && export PULSE_SERVER=127.0.0.1 \n sudo rm -rf /etc/profile.d/pulse.sh \n vncserver -kill :1 \n sudo rm /tmp/.X11-unix/X1 /tmp/.X1-lock \n dbus-launch tigervncserver -localhost no -geometry 1366x768 -xstartup /usr/bin/startplasma-x11 -listen tcp :1" > /etc/rc.local/init'pacmd load-module module-native-protocol-tcp auth-anonymous=1 (You can also add it to your .profile file, so it will run on startup from next boot.)ifconfig (and get the inet address. Lets call it internal_ip)
audioserver internal_ip (Replace internal_ip with the inet address you got from linux pc. After this command vncserver will restart and you have to reconnect to vnc with audio output to your linux pc ip address.)sudo apt install -y kde-full (approx 1000 Mb).