termux android fedora
start-fedora.sh
#!/data/data/com.termux/files/usr/bin/bash
cd $(dirname $0)
## unset LD_PRELOAD in case termux-exec is installed
unset LD_PRELOAD
command="proot"
command+=" --kill-on-exit"
command+=" --link2symlink"
command+=" -0"
command+=" -r fedora-fs"
if [ -n "$(ls -A fedora-binds)" ]; then
for f in fedora-binds/* ;do
. $f
done
fi
command+=" -b /dev"
command+=" -b /proc"
command+=" -b fedora-fs/root:/dev/shm"
#command+=" -b /data/data/com.termux/files/home:/root"
command+=" -b /sdcard"
command+=" -w /root"
command+=" /usr/bin/env -i"
command+=" HOME=/root"
command+=" PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games"
command+=" TERM=$TERM"
command+=" LANG=ru_RU.UTF-8"
#command+=" LANG=C.UTF-8"
command+=" /bin/bash --login"
com="$@"
if [ -z "$1" ];then
exec $command
else
$command -c "$com"
fi
start_vnc.sh
#! /bin/bash
rm -f /tmp/.X1-lock &&
rm -f /tmp/.X11-unix/X1 &&
vncserver :1 -geometry 1280x1280
#800x800
#1024x768
start_vnc_keyboard.sh
#! /bin/bash
rm -f /tmp/.X1-lock &&
rm -f /tmp/.X11-unix/X1 &&
vncserver :1 -geometry 2000x1024
#800x800
#1024x768
vncpasswd
127.0.0.1:5901