File size: 1,194 Bytes
0752ce7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

echo "Script By zendy_4062"
echo "This script will install LXDE or Fluxbox and set up ngrok for tunnel and access it using vnc viewer"

install_lxde() {
    apt update
    apt install lxde x11vnc xvfb wget -y
}

install_fluxbox() {
    apt update
    apt install fluxbox x11vnc xvfb wget -y
}

echo "Choose desktop to install:"
echo "1. LXDE"
echo "2. Fluxbox"
read -p "Enter your choice (1 or 2): " choice

case $choice in
    1)
        install_lxde
        start_command="startlxde"
        ;;
    2)
        install_fluxbox
        start_command="startfluxbox"
        ;;
    *)
        echo "Invalid choice. Exiting."
        exit 1
        ;;
esac

echo Downloading ngrok Please wait
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
tar xf ngrok*
rm ngrok-*

read -p "Enter your ngrok auth token: " authtoken
./ngrok authtoken $authtoken

read -p "Enter Your ngrok port (default 23): " ngrok_port
nohup ./ngrok tcp $ngrok_port &

export DISPLAY=:1
Xvfb $DISPLAY -screen 0 1024x768x16 &
$start_command &

x11vnc -display $DISPLAY -bg -forever -nopw -quiet -listen localhost -xkb -rfbport $ngrok_port