-
-
Save Asikur22/54dfb7b76ecc0b49c710e5eddf0a15c0 to your computer and use it in GitHub Desktop.
Configuration script after installing TinkerOS on ASUS Tinkerboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# My custom script to configuring TinkerOS post install as a desktop replacement. For personal use | |
sudo apt-get update | |
# disable swap to reduce SD card wear | |
sudo swapoff -a | |
# Setup numlockx for default numlock on at startup | |
sudo apt-get install numlockx | |
sudo sed -i 's|^exit 0.*$|# Numlock enable\n[ -x /usr/bin/numlockx ] \&\& numlockx on\n\nexit 0|' /etc/rc.local | |
# Belgium eID | |
echo "Installing Belgium eID drivers" | |
wget https://eid.belgium.be/sites/default/files/software/eid-archive_2018.2_all.deb | |
sudo dpkg -i eid-archive_2018.2_all.deb | |
sudo apt-get install -y eid-mw eid-viewer | |
# Setting up an HP printer | |
echo "HP Printer setup" | |
sudo apt-get install -y cups-common cups-core-drivers cups-daemon cups-filters cups-filters-core-drivers cups-client hplip system-config-printer-common system-config-printer | |
CUPSGROUP=`grep SystemGroup /etc/cups/cups-files.conf | awk '{print $2}'` | |
echo "Adding user to CUPS system group: $CUPSGROUP" | |
sudo adduser `whoami` $CUPSGROUP | |
sudo apt-get install -y python3-pyqt5 | |
hp-setup | |
echo "Installing scanning software" | |
sudo apt-get install -y simple-scan evince | |
echo "Install buster simple-scan version 3.30.1" | |
wget http://ftp.de.debian.org/debian/pool/main/libw/libwebp/libwebpmux3_0.6.1-2_armhf.deb | |
wget http://ftp.de.debian.org/debian/pool/main/s/simple-scan/simple-scan_3.30.1.1-1+b1_armhf.deb | |
sudo dpkg -i libwebpmux3_0.6.1-2_armhf.deb | |
sudo dpkg -i simple-scan_3.30.1.1-1+b1_armhf.deb | |
echo "Installing Libre Office" | |
sudo apt-get install -y libreoffice | |
echo "Configuring gkrellm" | |
sudo apt-get install -y gkrellm | |
wget -O ~/.gkrellm2/themes/CoplandOS.gkrellm.tar.gz http://www.muhri.net/gkrellm/CoplandOS.gkrellm.tar.gz | |
cd ~/.gkrellm2/themes/ | |
tar -zxvf CoplandOS.gkrellm.tar.gz | |
# Startup position | |
echo "1814 163" >> ~/.gkrellm2/data/startup_position | |
cd ~ | |
wget -O ~/.config/autostart/gkrellm.desktop https://gist.githubusercontent.com/hartraft/7dab8b2893b9d1c80cfbace49bc4d675/raw/7129928e9074a75858ee208585608196f6355d69/gkrellm.desktop | |
echo "Install Thunar file manager" | |
sudo apt-get install thunar | |
# Copy chromium flags to enable hardware acceleration | |
sudo wget -O /etc/chromium.d/config https://gist.githubusercontent.com/hartraft/0533f7167853484d4779999d53cf4adb/raw/205ff1405b4f62a13bcc7540598a0c67ff828162/config | |
# NodeJS | |
echo "Installing NodeJS" | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
sudo apt-get install npm nodejs | |
sudo apt-get install -y xfce-keyboard-shortcuts | |
# Docker for ARM | |
curl -sSL https://get.docker.com | sh | |
sudo usermod -aG docker `whoami` | |
# docker run hello-world | |
# Balena lightweight IoT docker equivalent without swarm support | |
#curl -sfL https://balena.io/install.sh | sh | |
# ELK ARM builds | |
# http://elk-docker.readthedocs.io/ | |
# docker pull sebp/elk | |
# docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk | |
sudo apt-get install -y vlc | |
# Protect against SSH / Apache brute force by banning ips | |
sudo apt-get install -y fail2ban | |
# Setup Java / Maven / Docker dependencies for Spring boot | |
sudo apt-get install -y locate links openjdk-8-jre openjdk-8-jdk maven texinfo | |
echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-armhf/" >> ~/.bashrc | |
# Compile JFFI for Arm https://github.com/spotify/docker-client/issues/477 | |
cd | |
sudo apt-get install build-essential | |
git clone https://github.com/jnr/jffi.git | |
cd jffi | |
ant jar | |
cd build/jni | |
sudo cp libjffi-1.2.so /usr/lib | |
# Cleanup | |
echo "Cleaning up after install" | |
sudo apt-get autoremove | |
# Install Visual Studio Code ARM port | |
sudo -s | |
. <( wget -O - https://code.headmelted.com/installers/apt.sh ) | |
exit | |
# VS Code icon | |
wget http://icons.iconarchive.com/icons/papirus-team/papirus-apps/128/visual-studio-code-icon.png | |
# if clock doesn't get synchronized after desktop boot (https://tinkerboarding.co.uk/forum/thread-616.html) | |
sudo apt-get purge ntp | |
sudo systemctl restart systemd-timesyncd.service | |
sudo systemctl status systemd-timesyncd.service | |
# For GPU acceleration of videos in Chrome | |
# go to chrome://flags and enabling "override software rendering list" | |
# Also in flags change the number of raster threads to 4 | |
# docker pull emby/embyserver | |
# docker run -d \ | |
# --volume /path/to/programdata:/config \ # This is mandatory | |
# --volume /path/to/share1:/mnt/share1 \ # To mount a first share | |
# --volume /path/to/share2:/mnt/share2 \ # To mount a second share | |
# --device /dev/dri/renderD128 \ # To mount a render node for VAAPI | |
# --publish 8096:8096 \ # To expose the HTTP port | |
# --publish 8920:8920 \ # To expose the HTTPS port | |
# --env UID=1000 \ # The UID to run emby as (default: 2) | |
# --env GID=100 \ # The GID to run emby as (default 2) | |
# --env GIDLIST=100 \ # A comma-separated list of additional GIDs to run emby as (default: 2) | |
# emby/embyserver:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment