-
Notifications
You must be signed in to change notification settings - Fork 61
/
install.sh
91 lines (75 loc) · 2.27 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
# Unofficial Bash Strict Mode
set -euo pipefail
IFS=$'\n\t'
finish() {
local ret=$?
if [ ${ret} -ne 0 ] && [ ${ret} -ne 130 ]; then
echo
echo "ERROR: Failed to setup XFCE on Termux."
echo "Please refer to the error message(s) above"
fi
}
trap finish EXIT
clear
echo ""
echo "This script will install XFCE Desktop in Termux along with a Debian proot"
echo ""
read -r -p "Please enter username for proot installation: " username </dev/tty
termux-change-repo
pkg update -y -o Dpkg::Options::="--force-confold"
pkg upgrade -y -o Dpkg::Options::="--force-confold"
sed -i '12s/^#//' $HOME/.termux/termux.properties
# Display a message
clear -x
echo ""
echo "Setting up Termux Storage access."
# Wait for a single character input
echo ""
read -n 1 -s -r -p "Press any key to continue..."
termux-setup-storage
pkgs=('wget' 'ncurses-utils' 'dbus' 'proot-distro' 'x11-repo' 'tur-repo' 'pulseaudio')
pkg uninstall dbus -y
pkg update
pkg install "${pkgs[@]}" -y -o Dpkg::Options::="--force-confold"
#Create default directories
mkdir -p Desktop
mkdir -p Downloads
#Download required install scripts
wget https://github.com/phoenixbyrd/Termux_XFCE/raw/main/xfce.sh
wget https://github.com/phoenixbyrd/Termux_XFCE/raw/main/proot.sh
wget https://github.com/phoenixbyrd/Termux_XFCE/raw/main/utils.sh
chmod +x *.sh
./xfce.sh "$username"
./proot.sh "$username"
./utils.sh
# Display a message
clear -x
echo ""
echo "Installing Termux-X11 APK"
# Wait for a single character input
echo ""
read -n 1 -s -r -p "Press any key to continue..."
wget https://github.com/termux/termux-x11/releases/download/nightly/app-arm64-v8a-debug.apk
mv app-arm64-v8a-debug.apk $HOME/storage/downloads/
termux-open $HOME/storage/downloads/app-arm64-v8a-debug.apk
source $PREFIX/etc/bash.bashrc
termux-reload-settings
clear -x
echo ""
echo ""
echo "Setup completed successfully!"
echo ""
echo "You can now connect to your Termux XFCE4 Desktop to open the desktop use the command start"
echo ""
echo "This will start the termux-x11 server in termux and start the XFCE Desktop and then open the installed Termux-X11 app."
echo ""
echo "To exit, double click the Kill Termux X11 icon on the panel."
echo ""
echo "Enjoy your Termux XFCE4 Desktop experience!"
echo ""
echo ""
rm xfce.sh
rm proot.sh
rm utils.sh
rm install.sh