Raspberry Pi Thin Client

Theatomheart’s Raspberry Pi Thin Client

Turn a Raspberry Pi (running Raspbian OS) into a simple thin client computer using this script.

Open a terminal as root and run the following command:

curl -sSL theatomheart.net/rpitc/setup.sh | bash

Or, since piping to bash is risky, review the script here first, before running it:


# Check if user is root, install dialog
apt update || { echo "Are you sure you're running this as the root user? Are you sure you're using the Raspbian OS distro? ;-) Are you sure you have an internet connection?"; exit; }
apt upgrade -y
apt install -y dialog

# A simple welcome message
dialog --title "Welcome!" --msgbox "Welcome to theatomheart's RPi Thin Client Bootstrapping Script!\n\nThis script will automatically configure a Raspberry Pi thin client desktop.\n\n-theatomheart" 10 60 || { clear; exit; }
dialog --title "Let's get started!" --yes-label "Let's go!" --no-label "No, nevermind!" --yesno "The rest of the installation will now be totally automated, so you can sit back and relax.\n\nNow just press <Let's go!> and the system will begin installation!" 13 60 || { clear; exit; }

# Install essential programs for a thin client
apt install -y gcc make &>/dev/null
apt install -y zenity
apt install -y freerdp2-x11
apt install -y libnotify-bin
apt install -y notification-daemon
apt install -y at-api2-core

# Install some programs for admin ease
apt install -y vim ncdu htop tmux ranger

# Add a line to the bottom of ~/.profile for the notification daemon
StartNotify() {
	LineToAdd="/usr/lib/notification-daemon/notification-daemon &"
	echo $LineToAdd >> /home/pi/.profile ;}

[[ $(grep notification-daemon /home/pi/.profile) ]] &&
	echo "Notification daemon already setup" || StartNotify

# Make a path for local scripts to execute from
mkdir -p /home/pi/.local/bin

# Make a path for the default desktop panel configuration
mkdir -p /home/pi/.config/lxpanel/LXDE-pi/panels

# Make a path for a network share to mount to
mkdir -p /media/networkshare

# Copy scripts for thin client functions
curl -sSL theatomheart.net/rpitc/rdp >/home/pi/.local/bin/rdp
curl -sSL theatomheart.net/rpitc/updd >/home/pi/.local/bin/updd
curl -sSL theatomheart.net/rpitc/connect >/home/pi/.local/bin/connect
curl -sSL theatomheart.net/rpitc/setupshare >/home/pi/.local/bin/setupshare
curl -sSL theatomheart.net/rpitc/feedback >/home/pi/.local/bin/feedback

# Copy a new /boot/config.txt file to change display performance settings
curl -sSL theatomheart.net/rpitc/config.txt >/tmp/config.txt
mv /tmp/config.txt /boot/config.txt

# Copy a configuration file for the desktop panels
curl -sSL theatomheart.net/rpitc/panel >/home/pi/.config/lxpanel/LXDE-pi/panels/panel

# Fix ownership of 'pi' user's home dir
chown -R pi /home/pi/ &>/dev/null

# Make sure all script files are executable
chmod +x /home/pi/.local/bin/*

echo "All done! Provided there were no hidden errors, the script completed successfully and all the programs and configuration files should be in place."
echo ""
echo "If you need to connect a network share next, open a terminal window and type 'setupshare'"

Contact Me