Upload desktop.sh
Browse files- desktop.sh +51 -0
desktop.sh
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
echo "Script By zendy_4062"
|
4 |
+
echo "This script will install LXDE or Fluxbox and set up ngrok for tunnel and access it using vnc viewer"
|
5 |
+
|
6 |
+
install_lxde() {
|
7 |
+
apt update
|
8 |
+
apt install lxde x11vnc xvfb wget -y
|
9 |
+
}
|
10 |
+
|
11 |
+
install_fluxbox() {
|
12 |
+
apt update
|
13 |
+
apt install fluxbox x11vnc xvfb wget -y
|
14 |
+
}
|
15 |
+
|
16 |
+
echo "Choose desktop to install:"
|
17 |
+
echo "1. LXDE"
|
18 |
+
echo "2. Fluxbox"
|
19 |
+
read -p "Enter your choice (1 or 2): " choice
|
20 |
+
|
21 |
+
case $choice in
|
22 |
+
1)
|
23 |
+
install_lxde
|
24 |
+
start_command="startlxde"
|
25 |
+
;;
|
26 |
+
2)
|
27 |
+
install_fluxbox
|
28 |
+
start_command="startfluxbox"
|
29 |
+
;;
|
30 |
+
*)
|
31 |
+
echo "Invalid choice. Exiting."
|
32 |
+
exit 1
|
33 |
+
;;
|
34 |
+
esac
|
35 |
+
|
36 |
+
echo Downloading ngrok Please wait
|
37 |
+
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
|
38 |
+
tar xf ngrok*
|
39 |
+
rm ngrok-*
|
40 |
+
|
41 |
+
read -p "Enter your ngrok auth token: " authtoken
|
42 |
+
./ngrok authtoken $authtoken
|
43 |
+
|
44 |
+
read -p "Enter Your ngrok port (default 23): " ngrok_port
|
45 |
+
nohup ./ngrok tcp $ngrok_port &
|
46 |
+
|
47 |
+
export DISPLAY=:1
|
48 |
+
Xvfb $DISPLAY -screen 0 1024x768x16 &
|
49 |
+
$start_command &
|
50 |
+
|
51 |
+
x11vnc -display $DISPLAY -bg -forever -nopw -quiet -listen localhost -xkb -rfbport $ngrok_port
|