-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
executable file
·43 lines (36 loc) · 1.03 KB
/
install.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
#! /bin/bash
[ $(id -u) -gt 0 ] && echo Please run with sudo && exit 1
set -x
apt update && apt install -y -q \
bluez \
tightvncserver \
ssvnc \
mplayer \
chromium-browser \
basilisk2 \
matchbox-window-manager \
nodm \
xserver-xorg-input-libinput \
xserver-xorg-video-fbdev \
x11-apps \
xinit \
xfonts-base \
xloadimage \
tmux \
pulseaudio \
pulseaudio-esound-compat \
pulseaudio-utils \
pavucontrol
fc-cache -fv # just in case
cp -a config/.xinitrc /home/${SUDO_USER}/.xinitrc
cp -a config/.xsession /home/${SUDO_USER}/.xsession
cp -a config/.Xdefaults /home/${SUDO_USER}/.Xdefaults
cp -a config/xstartup /home/${SUDO_USER}/.vnc/
cp config/99-fbdev.conf /etc/X11/xorg.conf.d/
cp config/fbtft.conf /etc/modprobe.d/
echo fbtft_device > /etc/modules-load.d/fbtft.conf
cp config/asound.conf /etc/
cp config/rc.local /etc/
sed -i.orig -e "s/NODM_USER=root/NODM_USER=${SUDO_USER}/" /etc/default/nodm
sudo -u $SUDO_USER sh -c "cd switcher && npm i --production"
echo Done!