macmini/install.sh

44 lines
1.0 KiB
Bash
Raw Permalink Normal View History

2019-06-09 17:39:04 +00:00
#! /bin/bash
2019-10-11 11:25:05 +00:00
[ $(id -u) -gt 0 ] && echo Please run with sudo && exit 1
2019-06-09 17:39:04 +00:00
2019-10-11 11:25:05 +00:00
set -x
2019-06-09 17:39:04 +00:00
2019-10-11 11:25:05 +00:00
apt update && apt install -y -q \
2019-06-09 17:39:04 +00:00
bluez \
tightvncserver \
ssvnc \
mplayer \
chromium-browser \
basilisk2 \
matchbox-window-manager \
nodm \
xserver-xorg-input-libinput \
2019-10-11 11:25:05 +00:00
xserver-xorg-video-fbdev \
x11-apps \
xinit \
xfonts-base \
2019-06-09 17:39:04 +00:00
xloadimage \
2019-10-11 11:25:05 +00:00
tmux \
2019-06-09 17:39:04 +00:00
pulseaudio \
pulseaudio-esound-compat \
pulseaudio-utils \
pavucontrol
2019-10-11 11:25:05 +00:00
fc-cache -fv # just in case
2019-12-14 07:58:36 +00:00
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/
2019-06-09 17:39:04 +00:00
cp config/99-fbdev.conf /etc/X11/xorg.conf.d/
cp config/fbtft.conf /etc/modprobe.d/
2019-10-11 11:25:05 +00:00
echo fbtft_device > /etc/modules-load.d/fbtft.conf
2019-06-09 17:39:04 +00:00
cp config/asound.conf /etc/
cp config/rc.local /etc/
2019-10-27 05:20:43 +00:00
sed -i.orig -e "s/NODM_USER=root/NODM_USER=${SUDO_USER}/" /etc/default/nodm
2019-06-09 17:39:04 +00:00
2019-10-11 11:25:05 +00:00
sudo -u $SUDO_USER sh -c "cd switcher && npm i --production"
2019-06-09 17:39:04 +00:00
echo Done!