-
Notifications
You must be signed in to change notification settings - Fork 0
/
inst.sh
50 lines (49 loc) · 1.36 KB
/
inst.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
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as sudo"
exit 1
else
#
cd $PWD/Repository
#Update and Upgrade
echo "**UPDATING AND UPGRADING**"
apt update && apt upgrade -y
#DE
echo "**INSTALLING THE DESKTOP ENVIRONMENT**"
echo "1"
apt install --no-install-recommends xorg lightdm openbox x11vnc feh vim systemd-timesyncd unclutter chromium -y
#Conf DE
echo "**SETTING UP THE DESKTOP ENVIRONMENT**"
printf "Port 26\nPermitRootLogin yes\nDenyUsers kiosk\nDenyGroups kiosk\n" >> /etc/ssh/sshd_config
systemctl set-default graphical.target
mkdir -v /mnt/Temp
mkdir -v /root/Temp
chown kiosk:kiosk /mnt/Temp
mkdir /usr/share/wallpapers
cp -v default.jpg /usr/share/wallpapers
rm -v /etc/lightdm/lightdm.conf
cp -v lightdm.conf /etc/lightdm
#Kiosk
passwd -d kiosk
groupadd -r autologin
gpasswd -a kiosk autologin
su - kiosk -c "mkdir -pv /home/kiosk/.config/openbox"
cp -v autostart.sh /home/kiosk/.config/openbox
chmod +x /home/kiosk/.config/openbox/autostart.sh
chown kiosk:kiosk /home/kiosk/.config/openbox/autostart.sh
chown kiosk:kiosk /usr/share/wallpapers/default.jpg
su - kiosk -c "mkdir -pv /home/kiosk/Temp"
# VNC Server
cp -v x11vnc.service /etc/systemd/system
systemctl daemon-reload
systemctl enable --now x11vnc
#Cleaning up
echo "**CLEANING UP**"
apt autoremove -y
#
echo "Enter the VNC remote access password"
x11vnc -storepasswd
#End
echo "End"
#
fi