Be warned, my setup folder is 1.2GB, contains a lot of debs to be installed.
I'll give you the header, rest of it is +1000 lines, inc. comments.
Code: Select all
#!/bin/bash
#-------------------------------------------------------------------------------
# Setup Linux mint 20 as required
#-------------------------------------------------------------------------------
#at some point apt cache reported by update mgr became corrupt?
# Started off running the script with sudo and then changed to embedding sudo
# as some stuff want to run as ordinary user.
# 1. modify fstab - ultrabay, synology & synology music folder
# 2. add support for LG ultrawide monitor
# 3. samba and copy in smb.conf with support to talk to LM19 PCs
# 4. gparted without password
# 5. printers - HL-L8260CDW, HL4140CN
# 6. fonts - font manager, fonts and delete unwanted fonts
# 7. file sync with unison - unison & unison-gtk
# 8. password manager - keepass2
# 9. conky - fix for python2, install metoffer
# 10. virtualbox 6.1
# 11. crossover 18.0
# 12. graphics - gthumb, shutter, gnome-web-photo, gcolor2, pinta, krita, lazpaint, inkscape, dia
# 13. encryption - veracrypt, encfs, molch encfs manager
# 14. browsers - chromium from buster, chrome, vivaldi & google earth
# 15. VPN - PIA
# 16. email - evolution
# 17. network - filezilla, etherape, linssid, wireshark, nomachine
# 18. sound - pavucontrol, audacious, audacity, asunder, easytag, lame
# 19. monitors & video - read-edid, edid-decode, cheese, vlc
# 20. DVDs - ffmpeg, handbrake, makemkv, regionset, unbuntu-restricted-extras, udftools
# 21. DVD/usb tools - xfburn, mkusb
# 22. PDFs - gscan2pdf, qpdfviewer, posterazor
# 23. backintime
# 24. Misc GUI - autokey, blueman, catfish, convertall, fslint, gnote, dconf-editor, hardinfo
There is also a 'helper' script to install packages, e.g. in the main setup script
pkginstall veracrypt /usr/bin ppa:unit193/encryption
:
Code: Select all
#!/bin/bash
# Installs a package from the repos, a deb file or ppa
#
# syntax
# pkginstall package-name executable-folder deb/ppa/anything executable
#
# Parameters passed
#
# 1 = package to install
# 2 = path to search in /usr for command, normally /usr/bin or /usr/sbin
# 3 = three options
# deb so look in package folder for deb
# ppa to install
# anything else - dummy and ignore, only present if 4 parameters are passed
# 4 = the executable to search to test if already installed, used when
# the package name and the executable are different, e.g. read-edid is the
# package but the executable is get-edid
#
# exit = 0, the package was installed
# exit = 1, the package was not installed
# $# is the number of arguments passed
#setup text colour output for terminal
red=`tput setaf 1`
grn=`tput setaf 2`
yel=`tput setaf 3`
def=`tput sgr0` #default or reset
# check if correct number of parameters passed (min should be 2)
if [ ${#} -lt 2 ]; then #error incorrect number of params passed
echo "ERROR - wrong number of parameters passed for install"
exit 1
fi
#If 4 parameters, then #4 is the executable to search for
if [ ${#} -eq 4 ]; then #executable is different from package name
search=$4
else
search=$1
fi
#is it already installed
test=`whereis $search | grep $2/$search`
if [ ${#test} -eq 0 ]; then #package not installed
#is it a deb or ppa
if [ ${#} -lt 3 ]; then #normal install
echo $yel"installing" $1 $def
sudo apt install -y $1
exit 0
else
if [ $3 == deb ]; then #install from deb file
#get the deb file, assumed to be in a subfolder with $1 folder name
#it will install any deb files it finds
for i in $( ls $PWD/$1 ); do
#check entries to see if end with deb
valid=`echo "$i" | grep deb$`
if [ ${#valid} -gt 0 ]; then #found a match
echo $yel"installing" $1 "from" $i $def
#fix warning message when installing from deb with permissions for user _apt
sudo chown _apt:root $PWD/$1/$i
sudo apt install -y $PWD/$1/$i
fi
done
exit 0
else
ppa=`echo $3 | grep ppa`
if [ ${#ppa} -gt 0 ]; then #ppa install
echo $yel"installing" $1 "from" $3 $def
sudo add-apt-repository -y $3
sudo apt update
sudo apt install -y $1
exit 0
else #normal install but executable search is different from package
echo $yel"installing" $1 $def
sudo apt install -y $1
exit 0
fi
fi
fi
else #package already installed
echo $yel$1" already installed..." $def
exit 1
fi
It took me a couple of weeks to do on and off, and I did it because I could (helps being retired). It does mean that I can install mint and then run setup and a couple of hours later have it with everything installed I want and setup how I want. Does help having a separate home partition so I don't have to worry about all the config files.
If interested can post/email more, but would have to redact some of the script (pwds).
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0