|
#!/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
|
|
|