-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup-desktop.sh
executable file
·57 lines (49 loc) · 2 KB
/
setup-desktop.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
echo "$1"
echo "$2@$3"
ssh -i "$1" -l "$2" -t "$3" bash -c "'
sudo yum update -y
sudo setenforce 0
sudo yum install -y wget
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
sudo rpm -ivh epel-release-7-5.noarch.rpm
sudo yum groups install -y "MATE Desktop"
wget https://github.com/rncry/gpu-desktop/raw/master/VirtualGL-2.4.1.x86_64.rpm
wget https://github.com/rncry/gpu-desktop/raw/master/turbovnc-1.2.80.x86_64.rpm
sudo yum install -y libXaw libXmu libXt xauth xdpyinfo glx-utils libXp xterm xorg-x11-xdm xorg-x11-fonts-100dpi xorg-x11-fonts-ISO8859-9-100dpi xorg-x11-fonts-misc xorg-x11-fonts-Type1 gcc kernel-devel libGLU
sudo rpm -ivh turbovnc-1.2.80.x86_64.rpm
sudo rpm -ivh VirtualGL-2.4.1.x86_64.rpm
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/346.47/NVIDIA-Linux-x86_64-346.47.run
chmod +x NVIDIA-Linux-x86_64-346.47.run
sudo ./NVIDIA-Linux-x86_64-346.47.run -s -Z
sudo reboot
'"
while ! ssh -i "$1" -l "$2" -t "$3" bash -c "echo 'hi world'" &>/dev/null; do :; done
ssh -i "$1" -l "$2" -t "$3" 'sudo yum groups install -y "X Window System"'
ssh -i "$1" -l "$2" -t "$3" bash -c "'
sudo setenforce 0
sudo ./NVIDIA-Linux-x86_64-346.47.run -s
sudo /opt/VirtualGL/bin/vglserver_config -config +s +f +t
wget https://github.com/rncry/gpu-desktop/raw/master/xorg.conf
sudo cp xorg.conf /etc/X11/xorg.conf
wget https://github.com/rncry/gpu-desktop/raw/master/.Xclients
chmod +x .Xclients
cp .Xclients ~$2/.
sudo reboot
'"
while ! ssh -i "$1" -l "$2" -t "$3" bash -c "echo 'hi world'" &>/dev/null; do :; done
ssh -i "$1" -l "$2" -t "$3" bash -c "'
sudo xinit &
echo "$4" | /opt/TurboVNC/bin/vncpasswd -f >> passwd
chmod 600 passwd
mkdir -p ~/.vnc
cp passwd ~/.vnc/
sudo reboot
'"
while ! ssh -i "$1" -l "$2" -t "$3" bash -c "echo 'hi world'" &>/dev/null; do :; done
ssh -i "$1" -l "$2" -t "$3" bash -c "'
sudo iptables -I INPUT -p tcp --dport 5901 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 5801 -j ACCEPT
sudo iptables-save
'"
ssh -i "$1" -l "$2" "$3" '/opt/TurboVNC/bin/vncserver'