-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwin10.sh
28 lines (24 loc) · 1.6 KB
/
win10.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
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb > /dev/null 2>&1
sudo apt install ./google-chrome-stable_current_amd64.deb > /dev/null 2>&1
chmod +x 4433-main/ngrok8.sh && ./4433-main/ngrok8.sh
function goto
{
label=$1
cd
cmd=$(sed -n "/^:[[:blank:]][[:blank:]]*${label}/{:a;n;p;ba};" $0 |
grep -v ':$')
eval "$cmd"
exit
}
sleep 1
if curl --silent --show-error http://127.0.0.1:4040/api/tunnels > /dev/null 2>&1; then echo OK; else echo "Ngrok Error! Please try again!" && sleep 1 && goto ngrok; fi
docker run --rm -d --network host --privileged --name nomachine-xfce4 -e PASSWORD=123456 -e USER=user --cap-add=SYS_PTRACE --shm-size=1g thuonghai2711/nomachine-ubuntu-desktop:windows10
clear
echo "NoMachine: https://www.nomachine.com/download"
echo Done! NoMachine Information:
echo IP Address:
curl --silent --show-error http://127.0.0.1:4040/api/tunnels | sed -nE 's/.*public_url":"tcp:..([^"]*).*/\1/p'
echo User: user
echo Passwd: 123456
echo "VM can't connect? Restart Cloud Shell then Re-run script."
seq 1 43100 | while read i; do echo -en "\r Running . $i s /43200 s";sleep 0.1;echo -en "\r Running .. $i s /43200 s";sleep 0.1;echo -en "\r Running ... $i s /43200 s";sleep 0.1;echo -en "\r Running .... $i s /43200 s";sleep 0.1;echo -en "\r Running ..... $i s /43200 s";sleep 0.1;echo -en "\r Running . $i s /43200 s";sleep 0.1;echo -en "\r Running .... $i s /43200 s";sleep 0.1;echo -en "\r Running ... $i s /43200 s";sleep 0.1;echo -en "\r Running .. $i s /43200 s";sleep 0.1;echo -en "\r Running . $i s /43200 s";sleep 0.1; done