#!/bin/bash

#--------------------------------------------------------------------------------
# 	Verify superuser authority. It is not necessary for the user to
#	  actually *be* 'root'.  It is only necessary that they have
#	  root-like authority.
#--------------------------------------------------------------------------------
touchfile=/a.$$.tmp
touch $touchfile 2>/dev/null
if [  $? -ne 0  ] ; then
	echo -e "\nERROR: You must have root authority to run this program."
	exit 1
fi
rm $touchfile

apt update
apt -y dist-upgrade

apt install -y mousepad gedit
apt install -y firefox
apt install -y xarchiver thunar-archive-plugin
apt install -y sshfs gvfs-backends smbclient

apt install -y openssh-server libssl-dev
apt install -y sqlite3 libsqlite3-dev sqlitebrowser
apt install -y openjdk-23-jre
apt install -y mosquitto mosquitto-clients

apt install -y xfce4-taskmanager xfce4-goodies gnome-system-monitor
apt install -y libxm4
apt install -y tcsh
apt install -y dkms

/* addd rdp support */
/* https://phoenixnap.com/kb/xrdp-ubuntu */
apt install -y xrdp
adduser cassini ssl-cert

cp mosquitto.service /usr/lib/systemd/system/

dpkg --add-architecture i386
apt update
apt install -y libc6-i386 libxm4:i386

# dpkg -i libc6-i386_2.31-13+deb11u5_amd64.deb
# apt install -f -y
# apt --fix-broken install -y
