Upload desktop.sh
Browse files- desktop.sh +14 -7
desktop.sh
CHANGED
@@ -1,19 +1,22 @@
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
-
echo "Script By
|
4 |
-
echo "This script will install LXDE or Fluxbox and set up ngrok for tunnel and access it using
|
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 |
-
|
|
|
17 |
echo "1. LXDE"
|
18 |
echo "2. Fluxbox"
|
19 |
read -p "Enter your choice (1 or 2): " choice
|
@@ -33,19 +36,23 @@ case $choice in
|
|
33 |
;;
|
34 |
esac
|
35 |
|
36 |
-
|
|
|
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 |
-
|
45 |
-
|
|
|
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
|
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
+
echo "Script By zendy"
|
4 |
+
echo "This script will install LXDE or Fluxbox and set up ngrok for tunnel and access it using VNC viewer."
|
5 |
|
6 |
+
# Function to install LXDE
|
7 |
install_lxde() {
|
8 |
apt update
|
9 |
apt install lxde x11vnc xvfb wget -y
|
10 |
}
|
11 |
|
12 |
+
# Function to install Fluxbox
|
13 |
install_fluxbox() {
|
14 |
apt update
|
15 |
apt install fluxbox x11vnc xvfb wget -y
|
16 |
}
|
17 |
|
18 |
+
# Main script
|
19 |
+
echo "Choose desktop environment to install:"
|
20 |
echo "1. LXDE"
|
21 |
echo "2. Fluxbox"
|
22 |
read -p "Enter your choice (1 or 2): " choice
|
|
|
36 |
;;
|
37 |
esac
|
38 |
|
39 |
+
# Download and setup ngrok
|
40 |
+
echo "Downloading ngrok..."
|
41 |
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
|
42 |
tar xf ngrok*
|
43 |
rm ngrok-*
|
44 |
|
45 |
+
# Set ngrok auth token
|
46 |
read -p "Enter your ngrok auth token: " authtoken
|
47 |
./ngrok authtoken $authtoken
|
48 |
|
49 |
+
# Set custom ngrok port
|
50 |
+
read -p "Enter custom ngrok port (default 23): " ngrok_port
|
51 |
+
nohup ./ngrok tcp ${ngrok_port:-23} &
|
52 |
|
53 |
+
# Export display and start Xvfb and VNC
|
54 |
export DISPLAY=:1
|
55 |
Xvfb $DISPLAY -screen 0 1024x768x16 &
|
56 |
$start_command &
|
57 |
|
58 |
+
x11vnc -display $DISPLAY -bg -forever -nopw -quiet -listen localhost -xkb -rfbport ${ngrok_port:-23}
|