Termux and Ubuntu Setup Guide

June 10, 2024

Пример установки Linux на смартфоне:

Termux and Ubuntu Setup Guide

Installation and Setup

1. Install Ubuntu via Termux

pkg install proot-distro
proot-distro install ubuntu
proot-distro login ubuntu

2. Install Necessary Packages

apt update
apt install tigervnc-standalone-server
apt install xfce4 xfce4-goodies  # Install XFCE desktop environment
apt install novnc websockify     # Install noVNC and Websockify

3. Configure VNC Server

tigervncserver :3 -localhost no

After starting the VNC server, use the websockify command to proxy VNC to WebSocket:

websockify --web /usr/share/novnc 6080 localhost:5903 &

Running Applications in Background

To run a command in the background, add & at the end of the command:

nohup websockify --web /usr/share/novnc 6080 localhost:5903 &

Installing and Running TigerVNC via Termux

pkg update
pkg upgrade
pkg install tigervnc

Using proot to Launch Ubuntu

proot -r ~/ubuntu/ /bin/bash

If the folder ~/ubuntu/ does not exist, create it:

mkdir -p ~/ubuntu
proot -r ~/ubuntu/ /bin/bash

Checking and Setting Up Permissions

termux-setup-storage

Moving Files to Accessible Folders

cp ~/yourfile /storage/emulated/0/Download/

Now the file yourfile will be available in the Download folder on your device.

Conclusion

If you encounter any issues, try reinstalling Termux and all necessary packages to ensure all dependencies and correct versions of programs are installed.

и вот ещё пример для требовательных parserposter.ru/noVNC/