Ubunut 20 Xfce

 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
58
59
60
61
#!/bin/bash
tput clear
echo $(hostname -I | cut -d\ -f1) $(hostname) | sudo tee -a /etc/hosts
sudo apt update && sudo apt upgrade -y -f
sudo apt install xfce4 xfce4-goodies tightvncserver dbus-x11 xfonts-base autocutsel firefox rar unrar xarchiver chkrootkit nodejs npm git -y
##################Security##########################################
sudo echo root:123qwe@@FF | chpasswd
sudo ufw disable
#sudo sed -i 's/Port 22/2232/g' /etc/ssh/sshd_config
sudo sed -i 's/#Port 22/Port 2232/g' /etc/ssh/sshd_config
service sshd restart
##################VNC Startup Service###############################
sudo vncserver
sudo vncserver -kill :1
sudo sed -i 's/5900 + $displayNumber/2233/g' /usr/bin/vncserver
sudo sed -i 's/1024x768/1920x1080/g' /usr/bin/vncserver
sudo cat > ~/.vnc/xstartup <<EOL
#!/bin/bash
xrdb $HOME/.Xresources
autocutsel -fork
startxfce4 &
EOL
sudo chmod +x ~/.vnc/xstartup
sudo vncserver
##########
sudo cat > /etc/systemd/system/vncserver@.service <<EOL
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=root
PAMName=login
PIDFile=/home/root/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1920x1080 :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
EOL
sudo chmod +x /etc/systemd/system/vncserver@.service
sudo systemctl daemon-reload
sudo systemctl enable vncserver@1.service
curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh && chmod +x wireguard-install.sh && ./wireguard-install.sh
#########################Draft###############################
#wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
#cp ~/*.conf ~/Desktop/
#rm -r ~/*.sh ~/*.conf
#curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh && chmod +x openvpn-install.sh && ./openvpn-install.sh
#wget https://raw.githubusercontent.com/Anonghost720/SoftEther-Autoinstal-Ubuntu-Debian/master/install.sh && chmod +x install.sh && ./install.sh
#rm -r ~/.config/xfce4
#wget -O install2.sh https://dumpz.org/bPdfTKBrFrc5/nixtext/ && chmod +x install2.sh && ./install2.sh
#############################################################