mirror of
https://codeberg.org/B3rtl/Ubuntu-Setup-Skripte
synced 2025-06-28 11:26:08 +02:00
Add massive change without any changelog
This commit is contained in:
parent
c420920761
commit
317f744d28
1 changed files with 125 additions and 92 deletions
217
linux_mint.sh
Normal file → Executable file
217
linux_mint.sh
Normal file → Executable file
|
@ -3,84 +3,147 @@
|
||||||
###
|
###
|
||||||
# Set variables
|
# Set variables
|
||||||
###
|
###
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Color of prefix (>>>) to distinguish user and root echos
|
||||||
|
color_prefix=32 # green
|
||||||
|
|
||||||
# Linux distro
|
# Linux distro
|
||||||
script_distro='Linux Mint 19.x'
|
script_distro='Linux Mint 19.x'
|
||||||
|
|
||||||
# Additional packages
|
# Additional packages
|
||||||
more_packages=""
|
more_packages=(
|
||||||
|
# Graphics
|
||||||
|
cheese
|
||||||
|
inkscape
|
||||||
|
|
||||||
|
# Office
|
||||||
|
libreoffice
|
||||||
|
|
||||||
|
# Security
|
||||||
|
keepassxc
|
||||||
|
|
||||||
|
# Games
|
||||||
|
0ad
|
||||||
|
beneath-a-steel-sky
|
||||||
|
billard-gl
|
||||||
|
blobby
|
||||||
|
blockout2
|
||||||
|
flight-of-the-amazon-queen
|
||||||
|
freeciv
|
||||||
|
frozen-bubble
|
||||||
|
gbrainy
|
||||||
|
gnome-games
|
||||||
|
gweled
|
||||||
|
hedgewars
|
||||||
|
lincity-ng
|
||||||
|
lure-of-the-temptress
|
||||||
|
openttd
|
||||||
|
pingus
|
||||||
|
pipewalker
|
||||||
|
pokerth
|
||||||
|
supertux
|
||||||
|
supertuxkart
|
||||||
|
teeworlds
|
||||||
|
wesnoth
|
||||||
|
widelands
|
||||||
|
|
||||||
|
# Gaming platforms
|
||||||
|
playonlinux
|
||||||
|
steam
|
||||||
|
wine-stable
|
||||||
|
winetricks
|
||||||
|
|
||||||
|
# System management
|
||||||
|
gparted
|
||||||
|
|
||||||
|
# Tools
|
||||||
|
hardinfo
|
||||||
|
shutter
|
||||||
|
vim
|
||||||
|
|
||||||
|
# Management
|
||||||
|
calibre
|
||||||
|
|
||||||
|
# Knowledge
|
||||||
|
goldendict
|
||||||
|
ubuntu-edu-preschool
|
||||||
|
ubuntu-edu-primary
|
||||||
|
ubuntu-edu-secondary
|
||||||
|
ubuntu-edu-tertiary
|
||||||
|
)
|
||||||
|
|
||||||
###
|
###
|
||||||
# Functions
|
# Functions
|
||||||
###
|
###
|
||||||
function _addToDefaultPackages() {
|
is_root() {
|
||||||
more_packages="${more_packages} ${1}"
|
[[ $UID -eq 0 ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# $*: message to echo
|
||||||
|
e() {
|
||||||
|
printf "\e[%sm>>>\e[0m %s\n" "$color_prefix" "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
# It's a pain to stop (ctrl+c, kill) execution with all the Python applications
|
||||||
|
# so we catch SIGINT and SIGTERM and exit immediately
|
||||||
|
handle_signal() {
|
||||||
|
e "Ausführung abgebrochen! Script wird beendet..."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
trap handle_signal SIGINT SIGTERM
|
||||||
|
|
||||||
|
pkg() {
|
||||||
|
apt-get install "$@" --quiet --yes
|
||||||
|
}
|
||||||
|
|
||||||
###
|
###
|
||||||
# Define additional software packages
|
# Root setup
|
||||||
###
|
###
|
||||||
|
if is_root; then
|
||||||
|
color_prefix=31 # red
|
||||||
|
if [[ $1 != "root-setup" ]]; then
|
||||||
|
e "Dieses Script sollte nicht direkt als Root ausgeführt werden!" >&2
|
||||||
|
e "Privilegien werden automatisch eskaliert sobald es notwendig ist." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Graphics
|
e "Automatische Installation empfohlener Pakete aktivieren ..."
|
||||||
_addToDefaultPackages "cheese"
|
sed -i 's/false/true/g' /etc/apt/apt.conf.d/00recommends
|
||||||
_addToDefaultPackages "inkscape"
|
|
||||||
|
|
||||||
# Office
|
e "Besten Spiegelserver für '${script_distro}' auswählen ..."
|
||||||
_addToDefaultPackages "libreoffice"
|
mint-switch-to-local-mirror
|
||||||
|
|
||||||
# Security
|
e "Paketquellen aktualisieren ..."
|
||||||
_addToDefaultPackages "keepassxc"
|
apt update --yes --quiet
|
||||||
|
|
||||||
# Games
|
e "System aktualisieren (apt) ..."
|
||||||
_addToDefaultPackages "0ad"
|
apt full-upgrade --yes --quiet
|
||||||
_addToDefaultPackages "beneath-a-steel-sky"
|
|
||||||
_addToDefaultPackages "billard-gl"
|
|
||||||
_addToDefaultPackages "blobby"
|
|
||||||
_addToDefaultPackages "blockout2"
|
|
||||||
_addToDefaultPackages "flight-of-the-amazon-queen"
|
|
||||||
_addToDefaultPackages "freeciv"
|
|
||||||
_addToDefaultPackages "frozen-bubble"
|
|
||||||
_addToDefaultPackages "gbrainy"
|
|
||||||
_addToDefaultPackages "gnome-games"
|
|
||||||
_addToDefaultPackages "gweled"
|
|
||||||
_addToDefaultPackages "hedgewars"
|
|
||||||
_addToDefaultPackages "lincity-ng"
|
|
||||||
_addToDefaultPackages "lure-of-the-temptress"
|
|
||||||
_addToDefaultPackages "openttd"
|
|
||||||
_addToDefaultPackages "pingus"
|
|
||||||
_addToDefaultPackages "pipewalker"
|
|
||||||
_addToDefaultPackages "pokerth"
|
|
||||||
_addToDefaultPackages "supertux"
|
|
||||||
_addToDefaultPackages "supertuxkart"
|
|
||||||
_addToDefaultPackages "teeworlds"
|
|
||||||
_addToDefaultPackages "wesnoth"
|
|
||||||
_addToDefaultPackages "widelands"
|
|
||||||
|
|
||||||
# Gaming platforms
|
e "System aktualisieren (mintupdate-cli) ..."
|
||||||
_addToDefaultPackages "playonlinux"
|
mintupdate-cli --yes upgrade
|
||||||
_addToDefaultPackages "steam"
|
|
||||||
_addToDefaultPackages "wine-stable"
|
|
||||||
_addToDefaultPackages "winetricks"
|
|
||||||
|
|
||||||
# System management
|
e "Proprietäre Treiber installieren (sofern verfügbar) ..."
|
||||||
_addToDefaultPackages "gparted"
|
ubuntu-drivers autoinstall
|
||||||
|
|
||||||
# Tools
|
e "Zusätzliche Software installieren ..."
|
||||||
_addToDefaultPackages "hardinfo"
|
pkg "${more_packages[@]}"
|
||||||
_addToDefaultPackages "shutter"
|
|
||||||
_addToDefaultPackages "vim"
|
|
||||||
|
|
||||||
# Management
|
e "Sprachpakete 'ar' und 'fa' installieren ..."
|
||||||
_addToDefaultPackages "calibre"
|
pkg language-pack-ar language-pack-gnome-ar language-pack-fa language-pack-gnome-fa
|
||||||
|
|
||||||
# Knowledge
|
e "Sprachunterstützung vervollständigen ..."
|
||||||
_addToDefaultPackages "goldendict"
|
pkg language-selector-common "$(check-language-support)"
|
||||||
_addToDefaultPackages "ubuntu-edu-preschool"
|
pkg hunspell-de-at hunspell-de-ch hunspell-de-de openoffice.org-hyphenation
|
||||||
_addToDefaultPackages "ubuntu-edu-primary"
|
|
||||||
_addToDefaultPackages "ubuntu-edu-secondary"
|
|
||||||
_addToDefaultPackages "ubuntu-edu-tertiary"
|
|
||||||
|
|
||||||
|
e "Unnötige Pakete entfernen und Cache bereinigen ..."
|
||||||
|
apt clean --yes --quiet
|
||||||
|
apt autoremove --yes --quiet
|
||||||
|
|
||||||
|
e "Root Setup abgeschlossen."
|
||||||
|
# It's very important to exit here. We don't want to have run as root past this point
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
###
|
###
|
||||||
# Greeting
|
# Greeting
|
||||||
|
@ -93,58 +156,28 @@ echo "\
|
||||||
###
|
###
|
||||||
# Maintainer: Computertruhe e. V.
|
# Maintainer: Computertruhe e. V.
|
||||||
# Website: https://computertruhe.de/
|
# Website: https://computertruhe.de/
|
||||||
# Version: 0.1.4
|
# Version: 0.2.0
|
||||||
# Repo: https://codeberg.org/Computertruhe/computertruhe-setup
|
# Repo: https://codeberg.org/Computertruhe/computertruhe-setup
|
||||||
# Distro: ${script_distro}
|
# Distro: ${script_distro}
|
||||||
###
|
###
|
||||||
"
|
"
|
||||||
echo ">>> Starte initiales Setup für Rechner mit frisch installiertem \"${script_distro}\" ..."
|
e "Starte initiales Setup für Rechner mit frisch installiertem '${script_distro}' ..."
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
# Automatic installation
|
# Automatic installation
|
||||||
###
|
###
|
||||||
echo ">>> Automatische Installation empfohlener Pakete aktivieren ..."
|
e "Script wird als Root ausgeführt für privilegierte Aufgaben"
|
||||||
sudo sed -i 's/false/true/g' /etc/apt/apt.conf.d/00recommends
|
sudo ./"$0" root-setup
|
||||||
|
|
||||||
echo ">>> Besten Spiegelserver für \"${script_distro}\" auswählen ..."
|
e "Richte arabisches und persisches Tastatur-Layout ein..."
|
||||||
mint-switch-to-local-mirror
|
|
||||||
|
|
||||||
echo ">>> Paketquellen aktualisieren ..."
|
|
||||||
apt update
|
|
||||||
|
|
||||||
echo ">>> System aktualisieren (apt) ..."
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt full-upgrade --yes
|
|
||||||
|
|
||||||
echo ">>> System aktualisieren (mintupdate-cli) ..."
|
|
||||||
DEBIAN_FRONTEND=noninteractive mintupdate-cli upgrade --yes
|
|
||||||
|
|
||||||
echo ">>> Proprietäre Treiber installieren (sofern verfügbar) ..."
|
|
||||||
ubuntu-drivers autoinstall
|
|
||||||
|
|
||||||
echo ">>> Zusätzliche Software installieren ..."
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt install ${more_packages} --yes
|
|
||||||
|
|
||||||
echo ">>> Sprachpakete 'ar' und 'fa' installieren ..."
|
|
||||||
apt install language-pack-ar language-pack-gnome-ar language-pack-fa language-pack-gnome-fa --yes
|
|
||||||
echo ">>> Sprachunterstützung vervollständigen ..."
|
|
||||||
apt install language-selector-common --yes
|
|
||||||
apt install $(check-language-support) --yes
|
|
||||||
apt install hunspell-de-at hunspell-de-ch hunspell-de-de openoffice.org-hyphenation --yes
|
|
||||||
|
|
||||||
echo ">>> Richte arabisches und persisches Tastatur-Layout ein..."
|
|
||||||
gsettings set org.gnome.libgnomekbd.keyboard layouts "['de', 'ara', 'ir']"
|
gsettings set org.gnome.libgnomekbd.keyboard layouts "['de', 'ara', 'ir']"
|
||||||
echo ">>> Ändere Anzeigeoptionen für die Tastatur auf die richtigen Werte..."
|
|
||||||
|
e "Ändere Anzeigeoptionen für die Tastatur auf die richtigen Werte..."
|
||||||
gsettings set org.cinnamon.desktop.interface keyboard-layout-show-flags false
|
gsettings set org.cinnamon.desktop.interface keyboard-layout-show-flags false
|
||||||
gsettings set org.cinnamon.desktop.interface keyboard-layout-use-upper true
|
gsettings set org.cinnamon.desktop.interface keyboard-layout-use-upper true
|
||||||
gsettings set org.cinnamon.desktop.interface keyboard-layout-prefer-variant-names true
|
gsettings set org.cinnamon.desktop.interface keyboard-layout-prefer-variant-names true
|
||||||
|
|
||||||
echo ">>> Unnötige Pakete entfernen ..."
|
|
||||||
apt clean
|
|
||||||
apt autoremove --yes
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
# Finalisation
|
# Finalisation
|
||||||
###
|
###
|
||||||
echo ">>> Initiales Setup beendet."
|
e "Initiales Setup beendet."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue