Compare commits

..

No commits in common. "master" and "0.4.0-beta1" have entirely different histories.

17 changed files with 1934 additions and 3378 deletions

3
.gitignore vendored Executable file → Normal file
View file

@ -3,5 +3,4 @@ backup/*
deb/*
.remote-sync.json
*.sync-conflict-*
utils/*
TODO.txt
utils/*

View file

@ -1,8 +0,0 @@
{
"generalSettings": {
"shouldScanRepo": true
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "success"
}
}

0
LICENSE Executable file → Normal file
View file

49
README.md Executable file → Normal file
View file

@ -1,42 +1,31 @@
# Yggdrasil-NG
![yggdrasil](logo.png)
> **Notice** : this script is no longer maintain !
About
-----
The purpose of this script is to provide a tool to install, customize and tweak a fresh installation of Linux Mint / Ubuntu.
!! Warnings : this is a early beta version !!
## Installation
The purpose of this script is to provide a full set of tools to install, customize and tweak a fresh installation of Linux Mint 18.x, Ubuntu 16.04 and derivatives
### Linux Mint 20 / Ubuntu 20.04 (Yggdrasil >= 0.6.1-b21)
Installation
------------
```shell
curl -L https://packagecloud.io/makoto/stable/gpgkey | sudo apt-key add -
echo "deb https://packagecloud.io/makoto/stable/ubuntu/ focal main" | sudo tee /etc/apt/sources.list.d/makoto.list
sudo apt-get update
sudo apt-get install yggdrasil
```
git clone https://github.com/shakasan/yggdrasil_ng.git
cd yggdrasil_ng
chmod +x yggdrasil.sh
./yggdrasil.sh
```
### Linux Mint 19 / Ubuntu 18.04 (Yggdrasil <= 0.6.1-b19)
Credits
-------
> - As Linux Mint 20 is released for a while already, this version of Yggdrasil is End of Life and thus is frozen as it.
> - No bugs fixed, features or any changes will be made on this branch anymore.
> - If you still need it, use it at your own risk and without guarantee third parties repositories are still available
> - The latest version of Yggdrasil for this branch is : 0.6.1-b19
This script has been written by Francois B. (Makotosan)
```shell
curl -L https://packagecloud.io/makoto/stable/gpgkey | sudo apt-key add -
echo "deb https://packagecloud.io/makoto/stable/ubuntu/ bionic main" | sudo tee /etc/apt/sources.list.d/makoto.list
sudo apt-get update
sudo apt-get install yggdrasil=0.6.1-b19
```
* Email : shakasan@sirenacorp.be
* Website : https://makotonoblog.be/
## Credits
Licence
-------
- Author : Francois B. (Makoto)
- Email : <francois@exoseed.be>
- Website : <https://makotonoblog.be/applications/yggdrasil/>
## Licence
The script is licensed under the terms of the GPL-3.0
The script is licensed under the terms of the GPLv3

281
core_functions.sh Executable file → Normal file
View file

@ -1,14 +1,14 @@
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : see documentation or man pages #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : Mint 18, Ubuntu 16.04, Elementary and other derivatives #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# core functions #
#-----------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# core functions #
#------------------------------------------------------------------------------#
#
# display a simple message + CR
@ -79,9 +79,9 @@ function pressKey () {
}
#
# check if OS is Mint 18
# check if OS is Mint
#
function isMint18 () {
function isMint () {
OS=`lsb_release -d | awk -F':' '{print $2}' | awk -F'\t' '{print $2}'`
if [[ $OS == *"Linux Mint 18"* ]]; then
return 0
@ -90,66 +90,6 @@ function isMint18 () {
fi
}
#
# check if OS is Ubuntu 16.04
#
function isUbuntu1604 () {
OS=`lsb_release -d | awk -F':' '{print $2}' | awk -F'\t' '{print $2}'`
if [[ $OS == *"Ubuntu 16.04"* ]]; then
return 0
else
return 1
fi
}
#
# check if OS is Mint 19
#
function isMint19 () {
OS=`lsb_release -d | awk -F':' '{print $2}' | awk -F'\t' '{print $2}'`
if [[ $OS == *"Linux Mint 19"* ]]; then
return 0
else
return 1
fi
}
#
# check if OS is Ubuntu 18.04
#
function isUbuntu1804 () {
OS=`lsb_release -d | awk -F':' '{print $2}' | awk -F'\t' '{print $2}'`
if [[ $OS == *"Ubuntu 18.04"* ]]; then
return 0
else
return 1
fi
}
#
# check if OS is Mint 20
#
function isMint20 () {
OS=`lsb_release -d | awk -F':' '{print $2}' | awk -F'\t' '{print $2}'`
if [[ $OS == *"Linux Mint 20"* ]]; then
return 0
else
return 1
fi
}
#
# check if OS is Ubuntu 20.04
#
function isUbuntu2004 () {
OS=`lsb_release -d | awk -F':' '{print $2}' | awk -F'\t' '{print $2}'`
if [[ $OS == *"Ubuntu 20.04"* ]]; then
return 0
else
return 1
fi
}
#
# check if DE is Mate
#
@ -161,34 +101,98 @@ function isMate () {
fi
}
#
# heck if DE is Cinnamon
#
function isCinnamon () {
if [[ $DESKTOP_SESSION == *"cinnamon"* ]]; then
return 0
else
return 1
fi
}
#
# check and install required dependencies for Yggdrasil
#
function yggInit () {
msg "Performing some Initializing steps"
typeset ret_code
printf "[INIT]"
runCmd "echo sience-config science-config/group select '$myHomedir ($myHomedir)' | sudo debconf-set-selections" \
"apply settings for science-config pkg"
if ! dpkg --print-foreign-architectures | grep -qi i386; then
printf "[INIT]"
runCmd "sudo dpkg --add-architecture i386" \
"adding i386 architecture"
else
printf "i386 architecture already added [ "$BOLDVERT"OK"$NORMAL" ] \n"
printf "[INIT] i386 architecture already added [ "$BOLDVERT"OK"$NORMAL" ] \n"
fi
installAppsFromList init
if ! grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep -q ubuntu-make; then
printf "[INIT][UMAKE] PPA not found, adding PPA...\n"
printf "[INIT][UMAKE] PPA not found, adding PPA...\n" &>> $logFile
addPPA "ubuntu-desktop/ubuntu-make"
else
printf "[INIT][UMAKE] PPA found [ "$BOLDVERT"OK"$NORMAL" ] \n"
fi
printf "[INIT][APT] update "
printf "\n[INIT][APT] update\n" &>> $logFile
sudo apt-get update &>> $logFile
ret_code=$?
retCode $ret_code
printf "[INIT]"
installPackage apt "apt-transport-https"
if ! which umake >/dev/null; then
printf "[INIT][UMAKE] not found, installing...\n"
printf "\n[INIT][UMAKE] not found, installing...\n" &>> $logFile
installPackage apt "ubuntu-make"
else
printf "[INIT][UMAKE] found [ "$BOLDVERT"OK"$NORMAL" ] \n"
fi
if ! which gem >/dev/null; then
printf "[INIT][GEM] not found, installing...\n"
printf "\n[INIT][GEM] not found, installing...\n" &>> $logFile
installPackage apt "ruby-dev"
else
printf "[INIT][GEM] found [ "$BOLDVERT"OK"$NORMAL" ] \n"
fi
if ! which snap >/dev/null; then
printf "[INIT][SNAP] not found, installing...\n"
printf "\n[INIT][SNAP] not found, installing...\n" &>> $logFile
installPackage apt "snapd"
else
printf "[INIT][SNAP] found [ "$BOLDVERT"OK"$NORMAL" ] \n"
fi
if ! which npm >/dev/null; then
printf "[INIT][NPM] not found, installing...\n"
printf "\n[INIT][NPM] not found, installing...\n" &>> $logFile
installPackage apt "nodejs"
else
printf "[INIT][NPM] found [ "$BOLDVERT"OK"$NORMAL" ] \n"
fi
if ! which pip3 >/dev/null; then
printf "[INIT][PIP] not found, installing...\n"
printf "\n[INIT][PIP] not found, installing...\n" &>> $logFile
printf "[INIT]"
installPackage apt "python3-pip"
printf "[INIT]"
installPackage pip "pip"
printf "[INIT]"
installPackage pip "setuptools"
else
printf "[INIT][PIP] found [ "$BOLDVERT"OK"$NORMAL" ] \n"
printf "[INIT]"
installPackage pip "pip"
printf "[INIT]"
installPackage pip "setuptools"
fi
}
#
# update kernel to the latest version
#
function kernelUpdate () {
checkAndInstallDep apt ukuu ukuu \
&& runCmd "sudo ukuu --install-latest --yes" \
"installing latest kernel"
}
#
@ -224,14 +228,6 @@ function updateSystem () {
retCode $ret_code
fi
if which flatpak >/dev/null; then
printf "[FLATPAK] update "
printf "\n[FLATPAK] update\n" &>> $logFile
sudo flatpak update -y &>> $logFile
ret_code=$?
retCode $ret_code
fi
repoAdded=0
}
@ -249,11 +245,7 @@ function addPPA () {
if ! grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep -q ${str2search}; then
printf "[PPA] adding : $* "
printf "\n[PPA] adding $*\n" &>> $logFile
if isUbuntu2004; then
sudo add-apt-repository -yn $* &>> $logFile
else
sudo add-apt-repository -y $* &>> $logFile
fi
sudo add-apt-repository -y $* &>> $logFile
ret_code=$?
retCode $ret_code
else
@ -293,21 +285,17 @@ function addKey () {
#
function addRepo () {
typeset ret_code
if [ ! -f /etc/apt/sources.list.d/$1 ]; then
printf "[REPO] adding : $2 in $1 "
printf "\n[REPO] adding $2 in $1\n" &>> $logFile
echo $2 | sudo tee /etc/apt/sources.list.d/$1 &>> $logFile
printf "[REPO] adding : $2 in $1 "
printf "\n[REPO] adding $2 in $1\n" &>> $logFile
echo $2 | sudo tee /etc/apt/sources.list.d/$1 &>> $logFile
ret_code=$?
retCode $ret_code
if [ "$#" -eq 3 ]; then
printf "[REPO] adding : $3 in $1 "
printf "\n[REPO] adding $3 in $1\n" &>> $logFile
echo $3 | sudo tee -a /etc/apt/sources.list.d/$1 &>> $logFile
ret_code=$?
retCode $ret_code
if [ "$#" -eq 3 ]; then
printf "[REPO] adding : $3 in $1 "
printf "\n[REPO] adding $3 in $1\n" &>> $logFile
echo $3 | sudo tee -a /etc/apt/sources.list.d/$1 &>> $logFile
ret_code=$?
retCode $ret_code
fi
else
printf "[REPO] already added [ "$BOLDVERT"OK"$NORMAL" ] \n"
fi
}
@ -320,7 +308,8 @@ function installPackageDpkg () {
printf "\n[PKG] installing $2 from $1\n" &>> $logFile
cd /tmp \
&& wget -q -O $2 $1 &>> $logFile \
&& sudo apt-get install -fy /tmp/$2 &>> $logFile
&& sudo dpkg -i $2 &>> $logFile
sudo apt-get install -fy &>> $logFile
ret_code=$?
retCode $ret_code
if [ "$3" == "yes" ]; then
@ -332,7 +321,7 @@ function installPackageDpkg () {
# install package from repositories
# input : package manager, package name
# package manager available : apt, pip, npm, gem, snap
# TODO: add apm, code, flatpak, umake?, use yarn instead of npm ?
# TODO: add apm, flatpak, umake?, use yarn instead of npm ?
#
function installPackage () {
typeset pkg="$2"
@ -359,7 +348,7 @@ function installPackage () {
if which npm >/dev/null; then
printf "[NPM] Installing $pkg "
printf "\n[NPM] installing $pkg\n" &>> $logFile
npm install -g $pkg &>> $logFile
sudo npm install -g $pkg &>> $logFile
ret_code=$?
retCode $ret_code
fi
@ -382,15 +371,6 @@ function installPackage () {
retCode $ret_code
fi
;;
"flatpak")
if which flatpak >/dev/null; then
printf "[FLATPAK] Installing $pkg "
printf "\n[FLATPAK] installing $pkg\n" &>> $logFile
sudo flatpak install -y $pkg &>> $logFile
ret_code=$?
retCode $ret_code
fi
;;
esac
}
@ -418,9 +398,6 @@ function checkAndInstallDep () {
"snap")
installPackage snap $2
;;
"flatpak")
installPackage flatpak $2
;;
esac
fi
}
@ -433,7 +410,8 @@ function addSpecificRepoFct () {
for i in $AppsRepo; do
appRepo=(${i//;/ })
if [ "${appRepo[0]}" == "$1" ]; then
printf "[ADD_REPO_PPA][$1][${appRepo[1]}]...\n"
printf "[ADD] package -- $1 -- repo/ppa "
printf "added by function -- ${appRepo[1]}\n"
eval "${appRepo[1]}"
repoAdded=$(($repoAdded+1))
fi
@ -447,28 +425,17 @@ function addSpecificRepoFct () {
#
# find and execute Pre/Post install functions for a specific app
# input : unique ID, pre/post
# input : unique ID
#
function processAppTrtFct () {
typeset i
if [ "$2" == "post" ]; then
for i in $AppsPostTrtFct; do
appPostTrtFct=(${i//;/ })
if [ "${appPostTrtFct[0]}" == "$1" ]; then
printf "[TRT][POST][$1][${appPostTrtFct[1]}]"
eval "${appPostTrtFct[1]}"
fi
done
else
for i in $AppsPreTrtFct; do
appPreTrtFct=(${i//;/ })
if [ "${appPreTrtFct[0]}" == "$1" ]; then
printf "[TRT][PRE][$1][${appPreTrtFct[1]}]"
eval "${appPreTrtFct[1]}"
fi
done
fi
unset i
for i in $AppsTrtFct; do
appTrtFct=(${i//;/ })
if [ "${appTrtFct[0]}" == "$1" ]; then
printf "[TRT] package -- $1 -- "
printf "post install processed by -- ${appTrtFct[1]}\n"
eval "${appTrtFct[1]}"
fi
done
}
#
@ -491,9 +458,8 @@ function installAppsFromList () {
for i in $Apps; do
app=(${i//;/ })
if [ "${app[2]}" == "$1" ]; then
processAppTrtFct ${app[3]} "pre"
installPackage ${app[1]} ${app[0]}
processAppTrtFct ${app[3]} "post"
processAppTrtFct ${app[3]}
fi
done
}
@ -536,9 +502,8 @@ function installAppsFromListMenu () {
for i in $Apps; do
app=(${i//;/ })
if [ "${app[3]}" == "${pkgToInstall//\"}" ]; then
processAppTrtFct ${app[3]} "pre"
installPackage ${app[1]} ${app[0]}
processAppTrtFct ${app[3]} "post"
processAppTrtFct ${app[3]}
fi
done
done
@ -596,9 +561,8 @@ function dispLogo () {
printf " ╚██╔╝ ██║ ██║██║ ██║██║ ██║██╔══██╗██╔══██║╚════██║██║██║ \n"
printf " ██║ ╚██████╔╝╚██████╔╝██████╔╝██║ ██║██║ ██║███████║██║███████╗\n"
printf " ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝╚══════╝\n"
printf "$BOLDROUGE Customize Linux Mint & Ubuntu made easier\n"
printf "$BOLDROUGE Customize Linux Mint & Ubuntu derivatives made easier\n"
printf "$BOLDBLANC ver "$version" - GPLv3 - Francois B. (Makotosan) - makotonoblog.be\n"
printf $NORMAL
printf "\n"
}
@ -606,6 +570,7 @@ function dispLogo () {
# show usage for headless mode
#
function usage () {
dispLogo
dispSysInfos
printf "\n"
printf $NORMAL
@ -618,12 +583,12 @@ function usage () {
printf " "$BOLDVERT"-q"$NORMAL" : install cardreader apps\n"
printf " "$BOLDVERT"-s"$NORMAL" : install Solaar for Logitech Unifying devices\n"
printf " "$BOLDVERT"-t"$NORMAL" : install TLP for Laptops and low energy usage\n"
printf " "$BOLDVERT"-k"$NORMAL" : install HWE (Ubuntu's Hardware Enablement Stack)(newer kernel+xorg)\n"
printf " "$BOLDVERT"-g"$NORMAL" : install/unlock SNAP + Store (not recommanded ;-))\n"
printf " "$BOLDVERT"-j"$NORMAL" : install/enable unattended-upgrades (security auto update))\n"
printf " "$BOLDVERT"-n"$NORMAL" : install lastest Nvidia graphic drivers\n"
printf " "$BOLDVERT"-g"$NORMAL" : install lastest free graphic drivers (nouveau, amdgpu, ati, intel), mesa, ...\n"
printf " "$BOLDVERT"-k"$NORMAL" : update system to the latest kernel\n"
printf " "$BOLDVERT"-u"$NORMAL" : update system (apt,snap,...)\n"
printf " "$BOLDVERT"-p"$NORMAL" : clean useless packages\n"
printf " "$BOLDVERT"-v"$NORMAL" : show version number\n"
printf " "$BOLDVERT"-v"$NORMAL" : show verison number\n"
printf " "$BOLDVERT"-h"$NORMAL" : show help & informations\n"
printf "\n"
}

966
install_functions.sh Normal file
View file

@ -0,0 +1,966 @@
#------------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : Mint 18, Ubuntu 16.04, Elementary and other derivatives #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# install functions #
#-----------------------------------------------------------------------------#
#
# install Base Apps (headless)
#
function installBase () {
installAppsFromList base
}
#
# install Base Apps (Menu)
#
function installBaseMenu () {
installAppsFromListMenu base
}
#
# install Office Apps (headless)
#
function installOffice () {
installAppsFromList office
}
#
# install Office Apps (Menu)
#
function installOfficeMenu () {
installAppsFromListMenu office
}
#
# install Multimedia Apps (headless)
#
function installMultimedia () {
installAppsFromList multimedia
}
#
# install Multimedia Apps (Menu)
#
function installMultimediaMenu () {
installAppsFromListMenu multimedia
}
#
# install eBook Apps (headless)
#
function installEbook () {
installAppsFromList ebook
}
#
# install eBook Apps (Menu)
#
function installEbookMenu () {
installAppsFromListMenu ebook
}
#
# install Internet Apps (headless)
#
function installInternet () {
runCmd "echo opera-stable opera-stable/add-deb-source boolean false | sudo debconf-set-selections" \
"setting as do not add repo"
installAppsFromList internet
}
#
# install Internet Apps (Menu)
#
function installInternetMenu () {
runCmd "echo opera-stable opera-stable/add-deb-source boolean false | sudo debconf-set-selections" \
"setting as do not add repo"
installAppsFromListMenu internet
}
#
# Viber (headless)
#
function installViber () {
installPackageDpkg http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb \
viber.deb \
no
}
#
# Viber (Menu)
#
function installViberMenu () {
installPackageDpkg http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb \
viber.deb \
yes
}
#
# Franz (headless)
#
function installFranz () {
installPackageDpkg https://github.com/meetfranz/franz/releases/download/v5.0.0-beta.17/franz_5.0.0-beta.17_amd64.deb \
franz.deb \
no
}
#
# Franz (Menu)
#
function installFranzMenu () {
installPackageDpkg https://github.com/meetfranz/franz/releases/download/v5.0.0-beta.17/franz_5.0.0-beta.17_amd64.deb \
franz.deb \
yes
}
#
# install Misc Utilities Apps (headless)
#
function installMiscUtilities () {
installAppsFromList utilities
}
#
# install Misc Utilities Apps (Menu)
#
function installMiscUtilitiesMenu () {
installAppsFromListMenu utilities
}
#
# install Wine Build (headless)
#
function installWine () {
installAppsFromList wine
}
#
# install Wine Build (Menu)
#
function installWineMenu () {
installAppsFromListMenu wine
}
#
# install Game Apps (headless)
#
function installGames () {
installAppsFromList games
}
#
# install Game Apps (Menu)
#
function installGamesMenu () {
installAppsFromListMenu games
}
#
# Steam (headless)
#
function installSteam () {
runCmd "echo steam steam/purge note | sudo debconf-set-selections" \
"accepting steam licence"
runCmd "echo steam steam/license note | sudo debconf-set-selections" \
"accepting steam licence 2/3"
runCmd "echo steam steam/question select I AGREE | sudo debconf-set-selections" \
"accepting steam licence 3/3"
installPackage apt steam
}
#
# Steam (Menu)
#
function installSteamMenu () {
runCmd "echo steam steam/purge note | sudo debconf-set-selections" \
"accepting steam licence"
runCmd "echo steam steam/license note | sudo debconf-set-selections" \
"accepting steam licence 2/3"
runCmd "echo steam steam/question select I AGREE | sudo debconf-set-selections" \
"accepting steam licence 3/3"
installPackage apt steam
}
#
# install Burning Apps (headless)
#
function installBurningTools () {
installAppsFromList burningtools
}
#
# install Burning Apps (Menu)
#
function installBurningToolsMenu () {
installAppsFromListMenu burningtools
}
#
# install Network Apps (headless)
#
function installNetTools () {
runCmd "echo wireshark-common wireshark-common/install-setuid boolean true | sudo debconf-set-selections" \
"setting Wireshark as root only"
installAppsFromList nettools
}
#
# install Network Apps (Menu)
#
function installNetToolsMenu () {
runCmd "echo wireshark-common wireshark-common/install-setuid boolean true | sudo debconf-set-selections" \
"setting Wireshark as root only"
installAppsFromListMenu nettools
}
#
# install Caja Plugins (headless)
#
function installCajaPlugins () {
installAppsFromList cajaplugins
}
#
# install Caja Plugins (Menu)
#
function installCajaPluginsMenu () {
installAppsFromListMenu cajaplugins
}
#
# install Nautilus Apps + plugins (headless)
#
function installNautilusAndPlugins () {
installAppsFromList nautilus
}
#
# install Nautilus Apps + plugins (Menu)
#
function installNautilusAndPluginsMenu () {
installAppsFromListMenu nautilus
}
#
# install Gimp plugins (headless)
#
function installGimpPlugins () {
installAppsFromList gimp
}
#
# install Gimp plugins (Menu)
#
function installGimpPluginsMenu () {
installAppsFromListMenu gimp
}
#
# install RhythmBox plugins (headless)
#
function installRhythmBoxPlugins () {
installAppsFromList rhythmbox
}
#
# install RhythmBox plugins (Menu)
#
function installRhythmBoxPluginsMenu () {
installAppsFromListMenu rhythmbox
}
#
# install Pidgin plugins (headless)
#
function installPidginPlugins () {
installAppsFromList pidgin
}
#
# install Pidgin plugins (Menu)
#
function installPidginPluginsMenu () {
installAppsFromListMenu pidgin
}
#
# install Nitrogen app (headless)
#
function installNitrogen () {
installAppsFromList nitrogen
}
#
# install Nitrogen app (Menu)
#
function installNitrogenMenu () {
installAppsFromListMenu nitrogen
}
#
# install Beta Apps (headless)
#
function installBeta () {
installAppsFromList beta
}
#
# install Beta Apps (Menu)
#
function installBetaMenu () {
installAppsFromListMenu beta
}
#
# install Nightly Apps (headless)
#
function installNightly () {
installAppsFromList nightly
}
#
# install Nightly Apps (Menu)
#
function installNightlyMenu () {
installAppsFromListMenu nightly
}
#
# install GTK Themes (headless)
#
function installThemes () {
installAppsFromList gtkthemes
}
#
# install GTK Themes (Menu)
#
function installThemesMenu () {
installAppsFromListMenu gtkthemes
}
#
# install Icon Themes (headless)
#
function installIcons () {
installAppsFromList icons
}
#
# install Icon Themes (Menu)
#
function installIconsMenu () {
installAppsFromListMenu icons
}
#
# install Solaar App (headless)
#
function installSolaar () {
installAppsFromList solaar
}
#
# install Solaar App (Menu)
#
function installSolaarMenu () {
installAppsFromListMenu solaar
}
#
# install CardReader Apps (headless)
#
function installCardReader () {
installAppsFromList cardreader
}
#
# install CardReader Apps (Menu)
#
function installCardReaderMenu () {
installAppsFromListMenu cardreader
}
#
# update AMD/Intel CPU Microcode
#
function updateMicrocode () {
oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1`
intel=`cat /proc/cpuinfo | grep -i Intel | wc -l`
amd=`cat /proc/cpuinfo | grep -i Amd | wc -l`
if [ "$intel" -gt "0" ]; then
installPackage apt intel-microcode
elif [ "$amd" -gt "0" ]; then
installPackage apt amd64-microcode
fi
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
printf "\n"
}
#
# fix some config issue with Intel Wireless 6320 cards
#
function fixWirelessIntel6320 () {
runCmd "sudo cp /etc/modprobe.d/iwlwifi.conf /etc/modprobe.d/iwlwifi.conf.bak" \
"backing up config file"
runCmd "echo options iwlwifi bt_coex_active=0 swcrypto=1 11n_disable=8 | sudo tee /etc/modprobe.d/iwlwifi.conf" \
"applying new config"
printf "[INFO] reboot required !!!"
printf "\n"
}
#
# install Webcam Apps (headless)
#
function installWebcam () {
installAppsFromList webcam
}
#
# install Webcam Apps (Menu)
#
function installWebcamMenu () {
installAppsFromListMenu webcam
}
#
# install latest versions of graphic drivers, mesa, .... (headless)
#
function installOibaf () {
addRepo_Oibaf
}
#
# install latest versions of graphic drivers, mesa, .... (Menu)
#
function installOibafMenu () {
addRepo_Oibaf
}
#
# install Nvidia Drivers (headless)
#
function installNvidia370 () {
installAppsFromList nvidia-370
}
#
# install Nvidia Drivers (Menu)
#
function installNvidia370Menu () {
installAppsFromListMenu nvidia-370
}
#
# install Nvidia Drivers (headless)
#
function installNvidia375 () {
installAppsFromList nvidia-375
}
#
# install Nvidia Drivers (Menu)
#
function installNvidia375Menu () {
installAppsFromListMenu nvidia-375
}
#
# install Nvidia Drivers (headless)
#
function installNvidia378 () {
installAppsFromList nvidia-378
}
#
# install Nvidia Drivers (Menu)
#
function installNvidia378Menu () {
installAppsFromListMenu nvidia-378
}
#
# install Nvidia Drivers (headless)
#
function installNvidia381 () {
installAppsFromList nvidia-381
}
#
# install Nvidia Drivers (Menu)
#
function installNvidia381Menu () {
installAppsFromListMenu nvidia-381
}
#
# install Nvidia Drivers (headless)
#
function installNvidia384 () {
installAppsFromList nvidia-384
}
#
# install Nvidia Drivers (Menu)
#
function installNvidia384Menu () {
installAppsFromListMenu nvidia-384
}
#
# install Nvidia Drivers (headless)
#
function installNvidia387 () {
installAppsFromList nvidia-387
}
#
# install Nvidia Drivers (Menu)
#
function installNvidia387Menu () {
installAppsFromListMenu nvidia-387
}
#
# install Nvidia Drivers (headless)
#
function installNvidia390 () {
installAppsFromList nvidia-390
}
#
# install Nvidia Drivers (Menu)
#
function installNvidia390Menu () {
installAppsFromListMenu nvidia-390
}
#
# install Nvidia Drivers (headless)
#
function installNvidia396 () {
installAppsFromList nvidia-396
}
#
# install Nvidia Drivers (Menu)
#
function installNvidia396Menu () {
installAppsFromListMenu nvidia-396
}
#
# install TLP App (headless)
#
function installTLP () {
installAppsFromList tlp
}
#
# install TLP App (Menu)
#
function installTLPMenu () {
installAppsFromListMenu tlp
}
#TODO:
function installKeyIDuDev () {
sudo sh -c "echo '# this udev file should be used with udev 188 and newer\n\
ACTION!=\"add|change\", GOTO=\"u2f_end\"\n\
\n\
# Key-ID FIDO U2F\n\
KERNEL==\"hidraw*\", SUBSYSTEM==\"hidraw\", ATTRS{idVendor}==\"096e\", ATTRS{idProduct}==\"0850|0880\", TAG+=\"uaccess\"\n\
\n\
LABEL=\"u2f_end\"' > /etc/udev/rules.d/70-u2f.rules"
runCmd "sudo service udev restart" \
"restarting UDEV service"
}
#
# install Dev Apps (headless)
#
function installDevApps () {
installAppsFromList dev
}
#
# install Dev Apps (Menu)
#
function installDevAppsMenu () {
installAppsFromListMenu dev
}
#
# install Javascript env (headless)
#
function installJavascript () {
installAppsFromList javascript
}
#
# install Javascript env (Menu)
#
function installJavascriptMenu () {
installAppsFromListMenu javascript
}
#
# install JAVA 10 (headless)
#
function installJava10 () {
runCmd "echo oracle-java10-installer shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections" \
"accepting Oracle Java SE 10 licence agreement"
installAppsFromList java10
}
#
# install JAVA 10 (Menu)
#
function installJava10Menu () {
runCmd "echo oracle-java10-installer shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections" \
"accepting Oracle Java SE 10 licence agreement"
installAppsFromListMenu java10
}
#
# install Mongo DB 3 CE (headless)
#
function installMongo3CE () {
installAppsFromList mongodb
}
#
# install Mongo DB 3 CE (Menu)
#
function installMongo3CEMenu () {
installAppsFromListMenu mongodb
}
#
# install Python Apps (headless)
#
function installPython () {
installAppsFromList python
}
#
# install Python Apps (Menu)
#
function installPythonMenu () {
installAppsFromListMenu python
}
#
# install PHP Apps (headless)
#
function installPHP () {
installAppsFromList php
}
#
# install PHP Apps (Menu)
#
function installPHPMenu () {
installAppsFromListMenu php
}
#
# install QT Apps/tools (headless)
#
function installQT () {
installAppsFromList qt
}
#
# install QT Apps/tools (Menu)
#
function installQTMenu () {
installAppsFromListMenu qt
}
#
# install LUA Apps (headless)
#
function installLUA () {
installAppsFromList lua
}
#
# install LUA Apps (Menu)
#
function installLUAMenu () {
installAppsFromListMenu lua
}
#
# install Ruby Apps (headless)
#
function installRuby () {
installAppsFromList ruby
}
#
# install Ruby Apps (Menu)
#
function installRubyMenu () {
installAppsFromListMenu ruby
}
#TODO:
function installAndroidEnv () {
msg="Installing Android environment"
runCmd "touch /home/$myHomedir/.bashrc" \
"creating .bashrc file if necessary"
sh -c "echo '\n\nexport PATH=${PATH}:/home/'$myHomedir'/Android/Sdk/tools:/home/'$myHomedir'/Android/Sdk/platform-tools' >> /home/$myHomedir/.bashrc"
msg "Adding UDEV rules"
sudo sh -c "echo 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0502\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Acer\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0b05\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Asus\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"413c\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Dell\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0489\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Foxconn\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04c5\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Fujitsu\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04c5\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Fujitsu-Toshiba\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"091e\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Garmin-Asus\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Google-Nexus\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"201E\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Haier\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"109b\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Hisense\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0bb4\", MODE=\"0666\", OWNER=\""$myHomedir"\" # HTC\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"12d1\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Huawei\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"8087\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Intel\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"24e3\", MODE=\"0666\", OWNER=\""$myHomedir"\" # K-Touch\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2116\", MODE=\"0666\", OWNER=\""$myHomedir"\" # KT Tech\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0482\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Kyocera\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"17ef\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Lenovo\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1004\", MODE=\"0666\", OWNER=\""$myHomedir"\" # LG\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"22b8\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Motorola\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0e8d\", MODE=\"0666\", OWNER=\""$myHomedir"\" # MTK\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0409\", MODE=\"0666\", OWNER=\""$myHomedir"\" # NEC\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2080\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Nook\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0955\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Nvidia\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2257\", MODE=\"0666\", OWNER=\""$myHomedir"\" # OTGV\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"10a9\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Pantech\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1d4d\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Pegatron\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0471\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Philips\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04da\", MODE=\"0666\", OWNER=\""$myHomedir"\" # PMC-Sierra\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"05c6\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Qualcomm\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1f53\", MODE=\"0666\", OWNER=\""$myHomedir"\" # SK Telesys\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04e8\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Samsung\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04dd\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sharp\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"054c\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sony\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0fce\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sony Ericsson\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0fce\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sony Mobile Communications\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2340\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Teleepoch\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0930\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Toshiba\n\
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"19d2\", MODE=\"0666\", OWNER=\""$myHomedir"\" # ZTE' > /etc/udev/rules.d/99-android.rules"
runCmd "sudo service udev restart" \
"restarting UDEV service"
createAppShortcut "/home/"$myHomedir"/tools/Android/Sdk/tools/android" \
"/home/"$myHomedir"/.icons/android.png" \
"GNOME;GTK;Development;IDE" \
"Android SDK" \
"local" \
update-menus
}
#
# install Atom App (headless)
#
function installAtom () {
installAppsFromList atom
}
#
# install Atom App (menu)
#
function installAtomMenu () {
installAppsFromListMenu atom
}
#
# install Anjuta Apps (headless)
#
function installAnjuta () {
installAppsFromList anjuta
}
#
# install Anjuta Apps (Menu)
#
function installAnjutaMenu () {
installAppsFromListMenu anjuta
}
#
# install Brackets Apps (headless)
#
function installBrackets () {
installAppsFromList brackets
}
#
# install Brackets Apps (Menu)
#
function installBracketsMenu () {
installAppsFromListMenu brackets
}
#
# install CodeBlocks Apps (headless)
#
function installCodeBlocks () {
installAppsFromList codeblocks
}
#
# install CodeBlocks Apps (Menu)
#
function installCodeBlocksMenu () {
installAppsFromListMenu codeblocks
}
#
# install Geany Apps (headless)
#
function installGeany () {
installAppsFromList geany
}
#
# install Geany Apps (Menu)
#
function installGeanyMenu () {
installAppsFromListMenu geany
}
#
# install IDEA Apps (headless)
#
function installIdea () {
installAppsFromList idea
}
#
# install IDEA Apps (Menu)
#
function installIdeaMenu () {
installAppsFromListMenu idea
}
#
# install Pycharm Apps (headless)
#
function installPyCharm () {
installAppsFromList pycharm
}
#
# install Pycharm Apps (Menu)
#
function installPyCharmMenu () {
installAppsFromListMenu pycharm
}
#
# install Visual Studio Code Apps (headless)
#
function installVisualStudioCode () {
installAppsFromList code
}
#
# install Visual Studio Code Apps (Menu)
#
function installVisualStudioCodeMenu () {
installAppsFromListMenu code
}
#
# install Android-Studio Apps (headless)
#
function installAndroidStudio () {
installAppsFromList androidstudio
}
#
# install Android-Studio Apps (Menu)
#
function installAndroidStudioMenu () {
installAppsFromListMenu androidstudio
}
#
# install SublimeText Apps (headless)
#
function installSublimeText() {
installAppsFromList sublime-text
}
#
# install SublimeText Apps (Menu)
#
function installSublimeTextMenu() {
installAppsFromListMenu sublime-text
}
#
# install CAD Apps (headless)
#
function installCAD () {
installAppsFromList cad
}
#
# install CAD Apps (Menu)
#
function installCADMenu () {
installAppsFromListMenu cad
}
#
# install Teamviewer 13 (headless)
#
function installTeamViewer13 () {
installPackageDpkg https://download.teamviewer.com/download/linux/teamviewer_amd64.deb \
teamviewer13.deb \
no
}
#
# install Teamviewer 13 (Menu)
#
function installTeamViewer13Menu () {
installPackageDpkg https://download.teamviewer.com/download/linux/teamviewer_amd64.deb \
teamviewer13.deb \
yes
}
#
# install/enable Unboud (headless)
#
function enableUnbound () {
installAppsFromList unbound
}
#
# install/enable Unboud (Menu)
#
function enableUnboundMenu () {
installAppsFromListMenu unbound
}

View file

@ -1,206 +0,0 @@
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : see documentation or man pages #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# #
# Ubuntu 18.04 / Linux Mint 19 #
# #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# install functions #
#-----------------------------------------------------------------------------#
#
# Viber (headless)
#
function installViber () {
installPackageDpkg http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb \
viber.deb \
no
}
#
# Viber (Menu)
#
function installViberMenu () {
installPackageDpkg http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb \
viber.deb \
yes
}
#
# Slack (headless)
#
function installSlack () {
installPackageDpkg https://downloads.slack-edge.com/linux_releases/slack-desktop-4.3.2-amd64.deb \
slack.deb \
no
}
#
# Slack (Menu)
#
function installSlackMenu () {
installPackageDpkg https://downloads.slack-edge.com/linux_releases/slack-desktop-4.3.2-amd64.deb \
slack.deb \
yes
}
#
# XnViewMP (headless)
#
function installXnViewMP () {
installPackageDpkg https://download.xnview.com/XnViewMP-linux-x64.deb \
xnviewmp.deb \
no
}
#
# XnViewMP (Menu)
#
function installXnViewMPMenu () {
installPackageDpkg https://download.xnview.com/XnViewMP-linux-x64.deb \
xnviewmp.deb \
yes
}
#
# update AMD/Intel CPU Microcode
#
function updateMicrocode () {
msg "CPU Microcode updating"
oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
intel=`cat /proc/cpuinfo | grep -i Intel | wc -l`
amd=`cat /proc/cpuinfo | grep -i Amd | wc -l`
if [ "$intel" -gt "0" ]; then
installPackage apt intel-microcode
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
elif [ "$amd" -gt "0" ]; then
installPackage apt amd64-microcode
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
else
printf "[INFO] No Intel/AMD CPU found"
fi
printf "\n"
}
#
# Key-ID USB Fido U2F device udev rules
#
function installKeyIDuDev () {
printf "[CMD] Adding Key-ID device UDEV rules "
cat << EOF | sudo tee /etc/udev/rules.d/70-u2f.rules
# this udev file should be used with udev 188 and newer\n\
ACTION!="add|change", GOTO="u2f_end"
# Key-ID FIDO U2F
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="096e", ATTRS{idProduct}=="0850|0880", TAG+="uaccess"
LABEL="u2f_end"
EOF
ret_code=$?
retCode $ret_code
runCmd "sudo service udev restart" \
"restarting UDEV service"
}
#
# install Teamviewer 13 (headless)
#
function installTeamViewer13 () {
installPackageDpkg https://download.teamviewer.com/download/linux/teamviewer_amd64.deb \
teamviewer13.deb \
no
}
#
# install Teamviewer 13 (Menu)
#
function installTeamViewer13Menu () {
installPackageDpkg https://download.teamviewer.com/download/linux/teamviewer_amd64.deb \
teamviewer13.deb \
yes
}
#
# install Compass (headless)
#
function installCompass () {
installPackageDpkg https://downloads.mongodb.com/compass/mongodb-compass_1.20.5_amd64.deb \
compass.deb \
no
}
#
# install Compass (Menu)
#
function installCompassMenu () {
installPackageDpkg https://downloads.mongodb.com/compass/mongodb-compass_1.20.5_amd64.deb \
compass.deb \
yes
}
#
# Boostnotes (headless)
#
function installBoostnotes () {
installPackageDpkg https://github.com/BoostIO/boost-releases/releases/download/v0.14.0/boostnote_0.14.0_amd64.deb \
boostnotes.deb \
no
}
#
# Boostnotes (Menu)
#
function installBoostnotesMenu () {
installPackageDpkg https://github.com/BoostIO/boost-releases/releases/download/v0.14.0/boostnote_0.14.0_amd64.deb \
boostnotes.deb \
yes
}
#
# Vagrant (headless)
#
function installVagrant () {
installPackageDpkg https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb \
vagrant.deb \
no
}
#
# Vagrant (Menu)
#
function installVagrantMenu () {
installPackageDpkg https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb \
vagrant.deb \
yes
}
#
# AppImage Launcher (headless)
#
function installAppImageLauncher () {
installPackageDpkg https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.1.1/appimagelauncher_2.1.1-travis931.f6d5926.bionic_amd64.deb \
appimagelauncher.deb \
no
}
#
# AppImage Launcher (Menu)
#
function installAppImageLauncherMenu () {
installPackageDpkg https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.1.1/appimagelauncher_2.1.1-travis931.f6d5926.bionic_amd64.deb \
appimagelauncher.deb \
yes
}

View file

@ -1,206 +0,0 @@
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : see documentation or man pages #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# #
# Ubuntu 20.04 / Linux Mint 20 #
# #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# install functions #
#-----------------------------------------------------------------------------#
#
# Viber (headless)
#
function installViber () {
installPackageDpkg http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb \
viber.deb \
no
}
#
# Viber (Menu)
#
function installViberMenu () {
installPackageDpkg http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb \
viber.deb \
yes
}
#
# Slack (headless)
#
function installSlack () {
installPackageDpkg https://downloads.slack-edge.com/linux_releases/slack-desktop-4.4.2-amd64.deb \
slack.deb \
no
}
#
# Slack (Menu)
#
function installSlackMenu () {
installPackageDpkg https://downloads.slack-edge.com/linux_releases/slack-desktop-4.4.2-amd64.deb \
slack.deb \
yes
}
#
# XnViewMP (headless)
#
function installXnViewMP () {
installPackageDpkg https://download.xnview.com/XnViewMP-linux-x64.deb \
xnviewmp.deb \
no
}
#
# XnViewMP (Menu)
#
function installXnViewMPMenu () {
installPackageDpkg https://download.xnview.com/XnViewMP-linux-x64.deb \
xnviewmp.deb \
yes
}
#
# update AMD/Intel CPU Microcode
#
function updateMicrocode () {
msg "CPU Microcode updating"
oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
intel=`cat /proc/cpuinfo | grep -i Intel | wc -l`
amd=`cat /proc/cpuinfo | grep -i Amd | wc -l`
if [ "$intel" -gt "0" ]; then
installPackage apt intel-microcode
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
elif [ "$amd" -gt "0" ]; then
installPackage apt amd64-microcode
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
else
printf "[INFO] No Intel/AMD CPU found"
fi
printf "\n"
}
#
# Key-ID USB Fido U2F device udev rules
#
function installKeyIDuDev () {
printf "[CMD] Adding Key-ID device UDEV rules "
cat << EOF | sudo tee /etc/udev/rules.d/70-u2f.rules
# this udev file should be used with udev 188 and newer\n\
ACTION!="add|change", GOTO="u2f_end"
# Key-ID FIDO U2F
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="096e", ATTRS{idProduct}=="0850|0880", TAG+="uaccess"
LABEL="u2f_end"
EOF
ret_code=$?
retCode $ret_code
runCmd "sudo service udev restart" \
"restarting UDEV service"
}
#
# install Teamviewer 13 (headless)
#
function installTeamViewer13 () {
installPackageDpkg https://download.teamviewer.com/download/linux/teamviewer_amd64.deb \
teamviewer13.deb \
no
}
#
# install Teamviewer 13 (Menu)
#
function installTeamViewer13Menu () {
installPackageDpkg https://download.teamviewer.com/download/linux/teamviewer_amd64.deb \
teamviewer13.deb \
yes
}
#
# install Compass (headless)
#
function installCompass () {
installPackageDpkg https://downloads.mongodb.com/compass/mongodb-compass_1.20.5_amd64.deb \
compass.deb \
no
}
#
# install Compass (Menu)
#
function installCompassMenu () {
installPackageDpkg https://downloads.mongodb.com/compass/mongodb-compass_1.20.5_amd64.deb \
compass.deb \
yes
}
#
# Boostnotes (headless)
#
function installBoostnotes () {
installPackageDpkg https://github.com/BoostIO/BoostNote.next/releases/download/v0.4.1/boost-note-linux.deb \
boostnotes.deb \
no
}
#
# Boostnotes (Menu)
#
function installBoostnotesMenu () {
installPackageDpkg https://github.com/BoostIO/BoostNote.next/releases/download/v0.4.1/boost-note-linux.deb \
boostnotes.deb \
yes
}
#
# Vagrant (headless)
#
function installVagrant () {
installPackageDpkg https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb \
vagrant.deb \
no
}
#
# Vagrant (Menu)
#
function installVagrantMenu () {
installPackageDpkg https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb \
vagrant.deb \
yes
}
#
# AppImage Launcher (headless)
#
function installAppImageLauncher () {
installPackageDpkg https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.1.3/appimagelauncher_2.1.3-travis975.7408819.bionic_amd64.deb \
appimagelauncher.deb \
no
}
#
# AppImage Launcher (Menu)
#
function installAppImageLauncherMenu () {
installPackageDpkg https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.1.3/appimagelauncher_2.1.3-travis975.7408819.bionic_amd64.deb \
appimagelauncher.deb \
yes
}

0
logo.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

251
menus_functions_ub2004.sh → menus_functions.sh Executable file → Normal file
View file

@ -1,16 +1,10 @@
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : see documentation or man pages #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# #
# Ubuntu 20.04 / Linux Mint 20 #
# #
#-----------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : Mint 18, Ubuntu 16.04, Elementary and other derivatives #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# menus functions #
@ -56,19 +50,35 @@ function showConfigMenu () {
--title "Yggdrasil $version - System Config" \
--menu "System Config" \
25 80 16 \
"Ufw" "Enable Firewall (ufw)" \
"NumLockX" "NumLock Enabled at boot time" \
"TmpRAM" "/tmp stored in RAM" \
"screenfetch" "screenfetch added to .bashrc" \
"historyTS" "TimeStamp enabled in Shell History" \
"unattendedUpgrades" "Enable automatic security updates" \
"Unbound" "Enable Unbound DNS Cache server" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $configMenuOptions in
"Ufw")
clear
enableUFW
pressKey
;;
"NumLockX")
clear
enableNumLockX
pressKey
;;
"TmpRAM")
clear
enableTmpRAM
pressKey
;;
"screenfetch")
clear
addScreenfetchBashrc
pressKey
;;
"historyTS")
clear
enableHistoryTS
@ -76,12 +86,7 @@ function showConfigMenu () {
;;
"unattendedUpgrades")
clear
installAppsFromList unattended-upgrades
pressKey
;;
"Unbound")
clear
installAppsFromList unbound
installUnattendedUpgrades
pressKey
;;
"Back")
@ -105,7 +110,9 @@ function showSysToolsMenu () {
"inxi" "System informations" \
"speedtest-cli" "Bandwidth test" \
"packetloss" "Packetloss test (ping)" \
"OptimizeFirefox" "Firefox SQLite databases optimization" \
"Autoremove" "Remove useless Deb packages" \
"CleanOldKernels" "Removing old kernels (keep 2 last kernels)" \
"SoundCardsDetection" "Sound Cards Detection" \
"Back" "Back" 3>&1 1>&2 2>&3)
@ -119,9 +126,15 @@ function showSysToolsMenu () {
"packetloss")
clear; toolPacketLoss; pressKey
;;
"OptimizeFirefox")
clear; toolOptimizeFirefox; pressKey
;;
"Autoremove")
clear; toolAutoremove; pressKey
;;
"CleanOldKernels")
clear; toolClearOldKernels; pressKey
;;
"SoundCardsDetection")
clear; toolSoundCardsDetection; pressKey
;;
@ -149,10 +162,10 @@ function showThemesInstallMenu () {
case $themesInstallMenuOptions in
"themes")
installAppsFromListMenu gtkthemes
installThemesMenu
;;
"icons")
installAppsFromListMenu icons
installIconsMenu
;;
"Back")
break
@ -173,9 +186,9 @@ function showDevInstallMenu () {
--menu "Install Dev apps from different submenus" \
25 80 16 \
"devbase" "dev apps and tools" \
"java11" "OpenJDK Java 11 dev env" \
"java10" "Java 10 dev env" \
"javascript" "JavaScript dev env" \
"mongodb" "MongoDB CE 4" \
"mongodb3ce" "MongoDB 3 CE" \
"php" "PHP dev env" \
"lua" "Lua dev env" \
"ruby" "Ruby dev env" \
@ -186,87 +199,79 @@ function showDevInstallMenu () {
"brackets" "Brackets" \
"codeblocks" "CodeBlocks" \
"geany" "Geany" \
"idea" "Idea" \
"pycharm" "PyCharm" \
"vsc" "Visual Studio Code" \
"androidstudio" "Android Studio" \
"sublimetext" "Sublime Text" \
"cad" "CAD tools" \
"teamviewer13" "Teamviewer 13" \
"boostnotes" "Boostnotes Markdown wiki app" \
"compass" "MongoDB Compass GUI" \
"gitkraken" "Gitkraken git gui" \
"vagrant" "Vagrant" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $devInstallMenuOptions in
"devbase")
installAppsFromListMenu dev
installDevAppsMenu
;;
"java11")
installAppsFromListMenu java11
"java10")
installJava10
;;
"javascript")
installAppsFromListMenu javascript
installJavascriptMenu
;;
"mongodb")
installAppsFromListMenu mongodb
"mongodb3ce")
installMongo3CEMenu
;;
"php")
installAppsFromListMenu php
installPHPMenu
;;
"lua")
installAppsFromListMenu lua
installLUAMenu
;;
"ruby")
installAppsFromListMenu ruby
installRubyMenu
;;
"qt")
installAppsFromListMenu qt
installQTMenu
;;
"python")
installAppsFromListMenu python
installPythonMenu
;;
"atom")
installAppsFromListMenu atom
installAtomMenu
;;
"anjuta")
installAppsFromListMenu anjuta
installAnjutaMenu
;;
"brackets")
installAppsFromListMenu brackets
installBracketsMenu
;;
"codeblocks")
installAppsFromListMenu codeblocks
installCodeBlocksMenu
;;
"geany")
installAppsFromListMenu geany
installGeanyMenu
;;
"idea")
installIdeaMenu
;;
"pycharm")
installPyCharmMenu
;;
"vsc")
installAppsFromListMenu code
installVisualStudioCodeMenu
;;
"androidstudio")
installAppsFromListMenu androidstudio
installAndroidStudioMenu
;;
"sublimetext")
installAppsFromListMenu sublime-text
installSublimeTextMenu
;;
"cad")
installAppsFromListMenu cad
installCADMenu
;;
"teamviewer13")
installTeamViewer13Menu
;;
"boostnotes")
installBoostnotesMenu
;;
"compass")
installCompassMenu
;;
"gitkraken")
installAppsFromListMenu gitkraken
;;
"vagrant")
installVagrantMenu
;;
"Back")
break
;;
@ -288,7 +293,6 @@ function showAppInstallMenu () {
"base" "Base Apps" \
"office" "Office Apps" \
"multimedia" "Multimedia Apps" \
"ebook" "eBook Apps" \
"internet" "Internet Apps" \
"utilities" "Misc Utilities" \
"games" "Games & tools" \
@ -297,89 +301,66 @@ function showAppInstallMenu () {
"nettools" "Network tools" \
"cajaplugins" "Caja Plugins" \
"nautilus" "Nautilus and plugins" \
"thunar" "Thunar file manager" \
"gimp" "Gimp plugins" \
"rhythmbox" "RhythmBox plugins" \
"pidgin" "Pidgin plugins" \
"nitrogen" "Nitrogen WP Manager" \
"wine" "Wine Builds" \
"snap" "Unlock/Install SNAP + Store" \
"viber" "Viber IM desktop app" \
"slack" "Slack App" \
"appimagelauncher" "AppImage Launcher" \
"xnviewmp" "XNView MP" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $appsInstallMenuOptions in
"base")
installAppsFromListMenu base
installBaseMenu
;;
"office")
installAppsFromListMenu office
installOfficeMenu
;;
"multimedia")
installAppsFromListMenu multimedia
;;
"ebook")
installAppsFromListMenu ebook
installMultimediaMenu
;;
"internet")
installAppsFromListMenu internet
installInternetMenu
;;
"utilities")
installAppsFromListMenu utilities
installMiscUtilitiesMenu
;;
"games")
installAppsFromListMenu games
installGamesMenu
;;
"steam")
installAppsFromListMenu steam
installSteamMenu
;;
"burningtools")
installAppsFromListMenu burningtools
installBurningToolsMenu
;;
"nettools")
installAppsFromListMenu nettools
installNetToolsMenu
;;
"cajaplugins")
installAppsFromListMenu cajaplugins
installCajaPluginsMenu
;;
"nautilus")
installAppsFromList nautilus
;;
"thunar")
installAppsFromListMenu thunar
installNautilusAndPluginsMenu
;;
"gimp")
installAppsFromListMenu gimp
installGimpPluginsMenu
;;
"rhythmbox")
installAppsFromListMenu rhythmbox
installRhythmBoxPluginsMenu
;;
"pidgin")
installAppsFromListMenu pidgin
installPidginPluginsMenu
;;
"nitrogen")
installAppsFromListMenu nitrogen
installNitrogenMenu
;;
"wine")
installAppsFromListMenu wine
;;
"snap")
installAppsFromListMenu snap
installWineMenu
;;
"viber")
installViberMenu
;;
"slack")
installSlackMenu
;;
"appimagelauncher")
installAppImageLauncherMenu
;;
"xnviewmp")
installXnViewMPMenu
;;
"Back")
break
;;
@ -388,6 +369,20 @@ function showAppInstallMenu () {
done
}
#
# show menu to install beta apps from different categories
#
function showAppBetaInstallMenu () {
installBetaMenu
}
#
# show menu to install nightly apps from different categories
#
function showAppNightlyInstallMenu () {
installNightlyMenu
}
#
# show menu about install/config hardware
#
@ -398,38 +393,72 @@ function showHardwareMenu () {
--title "Yggdrasil $version - System Tools" \
--menu "System tools to diagnose and optimize" \
25 80 16 \
"HWE" "Ubuntu Hardware Enablement Stack (newer kernel+xorg)" \
"cardreader" "Apps/tools needed for cardreaders" \
"solaar" "Solaar for Logitech Unifying devices" \
"webcam" "Install webcam neede apps" \
"microcode" "Update Intel/AMD CPU microcode" \
"oibaf" "latest version of free graphic drivers, mesa, ..." \
"nvidia370" "Install Nvidia 370 graphic drivers" \
"nvidia375" "Install Nvidia 375 graphic drivers" \
"nvidia378" "Install Nvidia 378 graphic drivers" \
"nvidia381" "Install Nvidia 381 graphic drivers" \
"nvidia384" "Install Nvidia 384 graphic drivers" \
"nvidia387" "Install Nvidia 387 graphic drivers" \
"nvidia390" "Install Nvidia 390 graphic drivers" \
"nvidia396" "Install Nvidia 396 graphic drivers" \
"tlp" "Install/Enable TLP for better power management " \
"keyid" "Add udev rules for Key-ID FIDO U2F usb key" \
"WI6320" "Fix Intel Wireless 6320 card config problem" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $hardwareMenuOptions in
"HWE")
installAppsFromListMenu hwe
;;
"cardreader")
installAppsFromListMenu cardreader
installCardReaderMenu
;;
"solaar")
installAppsFromListMenu solaar
installAppsFromListMenu
;;
"webcam")
installAppsFromListMenu webcam
installWebcamMenu
;;
"microcode")
updateMicrocode
pressKey
;;
"oibaf")
installOibafMenu
;;
"nvidia370")
installNvidia370Menu
;;
"nvidia375")
installNvidia375Menu
;;
"nvidia378")
installNvidia378Menu
;;
"nvidia381")
installNvidia381Menu
;;
"nvidia384")
installNvidia384Menu
;;
"nvidia387")
installNvidia387Menu
;;
"nvidia390")
installNvidia390Menu
;;
"nvidia396")
installNvidia396Menu
;;
"tlp")
installAppsFromListMenu tlp
installTLPMenu
;;
"keyid")
installKeyIDuDev
pressKey
;;
"WI6320")
fixWirelessIntel6320
;;
"Back")
break
@ -437,4 +466,4 @@ function showHardwareMenu () {
esac
done
}
}

View file

@ -1,440 +0,0 @@
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : see documentation or man pages #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# #
# Ubuntu 18.04 / Linux Mint 19 #
# #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# menus functions #
#-----------------------------------------------------------------------------#
#
# show about dialog box
#
function showAboutBoxMenu () {
whiptail \
--title "About" \
--msgbox "\n
Author : Francois B. (Makotosan)
Email : shakasan@sirenacorp.be
Website : https://makotonoblog.be/
Github : https://github.com/shakasan/yggdrasil_ng
Licence : GPLv3
Version : $version\n
At the beginning, this script has been written to makes my life easier when I have to (re)install my personal computers ;-)
Advices and remarks are welcome ^^" \
20 80
}
#
# show reboot menu
#
function showRebootBoxMenu () {
if (whiptail \
--title "Yggdrasil $version - WARNING - ReBoot" \
--yesno "Are you sure to reboot this computer ?" \
7 42) then
sudo reboot
fi
}
#
# show menu to config system
#
function showConfigMenu () {
while true; do
configMenuOptions=$(whiptail \
--title "Yggdrasil $version - System Config" \
--menu "System Config" \
25 80 16 \
"TmpRAM" "/tmp stored in RAM" \
"screenfetch" "screenfetch added to .bashrc" \
"historyTS" "TimeStamp enabled in Shell History" \
"unattendedUpgrades" "Enable automatic security updates" \
"Unbound" "Enable Unbound DNS Cache server" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $configMenuOptions in
"TmpRAM")
clear
enableTmpRAM
pressKey
;;
"historyTS")
clear
enableHistoryTS
pressKey
;;
"unattendedUpgrades")
clear
installAppsFromList unattended-upgrades
pressKey
;;
"Unbound")
clear
installAppsFromList unbound
pressKey
;;
"Back")
break
;;
esac
done
}
#
# show menu to install system tools
#
function showSysToolsMenu () {
while true; do
sysToolsMenuOptions=$(whiptail \
--title "Yggdrasil $version - System Tools" \
--menu "System tools to diagnose and optimize" \
25 80 16 \
"inxi" "System informations" \
"speedtest-cli" "Bandwidth test" \
"packetloss" "Packetloss test (ping)" \
"Autoremove" "Remove useless Deb packages" \
"SoundCardsDetection" "Sound Cards Detection" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $sysToolsMenuOptions in
"inxi")
clear; toolInxi; pressKey
;;
"speedtest-cli")
clear; toolSpeedtestCli; pressKey
;;
"packetloss")
clear; toolPacketLoss; pressKey
;;
"Autoremove")
clear; toolAutoremove; pressKey
;;
"SoundCardsDetection")
clear; toolSoundCardsDetection; pressKey
;;
"Back")
break
;;
esac
done
}
#
# show menu to install themes/icons
#
function showThemesInstallMenu () {
while true; do
themesInstallMenuOptions=$(whiptail \
--title "Yggdrasil $version - Themes/Icons Install" \
--menu "Install themes/icons from different submenus" \
25 80 16 \
"themes" "GTK themes" \
"icons" "Icons" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $themesInstallMenuOptions in
"themes")
installAppsFromListMenu gtkthemes
;;
"icons")
installAppsFromListMenu icons
;;
"Back")
break
;;
esac
done
}
#
# show menu to install dev apps
#
function showDevInstallMenu () {
while true; do
devInstallMenuOptions=$(whiptail \
--title "Yggdrasil $version - Dev Install" \
--menu "Install Dev apps from different submenus" \
25 80 16 \
"devbase" "dev apps and tools" \
"java11" "OpenJDK Java 11 dev env" \
"javascript" "JavaScript dev env" \
"mongodbce" "MongoDB CE" \
"php" "PHP dev env" \
"lua" "Lua dev env" \
"ruby" "Ruby dev env" \
"qt" "QT dev env" \
"python" "Python dev env" \
"atom" "Atom" \
"anjuta" "Anjuta" \
"brackets" "Brackets" \
"codeblocks" "CodeBlocks" \
"geany" "Geany" \
"vsc" "Visual Studio Code" \
"androidstudio" "Android Studio" \
"sublimetext" "Sublime Text" \
"cad" "CAD tools" \
"teamviewer13" "Teamviewer 13" \
"boostnotes" "Boostnotes Markdown wiki app" \
"compass" "MongoDB Compass GUI" \
"gitkraken" "Gitkraken git gui" \
"vagrant" "Vagrant" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $devInstallMenuOptions in
"devbase")
installAppsFromListMenu dev
;;
"java11")
installAppsFromListMenu java11
;;
"javascript")
installAppsFromListMenu javascript
;;
"mongodbce")
installAppsFromListMenu mongodb
;;
"php")
installAppsFromListMenu php
;;
"lua")
installAppsFromListMenu lua
;;
"ruby")
installAppsFromListMenu ruby
;;
"qt")
installAppsFromListMenu qt
;;
"python")
installAppsFromListMenu python
;;
"atom")
installAppsFromListMenu atom
;;
"anjuta")
installAppsFromListMenu anjuta
;;
"brackets")
installAppsFromListMenu brackets
;;
"codeblocks")
installAppsFromListMenu codeblocks
;;
"geany")
installAppsFromListMenu geany
;;
"vsc")
installAppsFromListMenu code
;;
"androidstudio")
installAppsFromListMenu androidstudio
;;
"sublimetext")
installAppsFromListMenu sublime-text
;;
"cad")
installAppsFromListMenu cad
;;
"teamviewer13")
installTeamViewer13Menu
;;
"boostnotes")
installBoostnotesMenu
;;
"compass")
installCompassMenu
;;
"gitkraken")
installAppsFromListMenu gitkraken
;;
"vagrant")
installVagrantMenu
;;
"Back")
break
;;
esac
done
}
#
# show menu to install apps from different categories
#
function showAppInstallMenu () {
while true; do
appsInstallMenuOptions=$(whiptail \
--title "Yggdrasil $version - Apps Install" \
--menu "Install apps from different submenus" \
25 80 16 \
"base" "Base Apps" \
"office" "Office Apps" \
"multimedia" "Multimedia Apps" \
"ebook" "eBook Apps" \
"internet" "Internet Apps" \
"utilities" "Misc Utilities" \
"games" "Games & tools" \
"steam" "Steam" \
"burningtools" "Disc Burning and tools" \
"nettools" "Network tools" \
"cajaplugins" "Caja Plugins" \
"nautilus" "Nautilus and plugins" \
"thunar" "Thunar file manager" \
"gimp" "Gimp plugins" \
"rhythmbox" "RhythmBox plugins" \
"pidgin" "Pidgin plugins" \
"nitrogen" "Nitrogen WP Manager" \
"wine" "Wine Builds" \
"snap" "Unlock/Install SNAP + Store" \
"viber" "Viber IM desktop app" \
"slack" "Slack App" \
"appimagelauncher" "AppImage Launcher" \
"xnviewmp" "XNView MP" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $appsInstallMenuOptions in
"base")
installAppsFromListMenu base
;;
"office")
installAppsFromListMenu office
;;
"multimedia")
installAppsFromListMenu multimedia
;;
"ebook")
installAppsFromListMenu ebook
;;
"internet")
installAppsFromListMenu internet
;;
"utilities")
installAppsFromListMenu utilities
;;
"games")
installAppsFromListMenu games
;;
"steam")
installAppsFromListMenu steam
;;
"burningtools")
installAppsFromListMenu burningtools
;;
"nettools")
installAppsFromListMenu nettools
;;
"cajaplugins")
installAppsFromListMenu cajaplugins
;;
"nautilus")
installAppsFromList nautilus
;;
"thunar")
installAppsFromListMenu thunar
;;
"gimp")
installAppsFromListMenu gimp
;;
"rhythmbox")
installAppsFromListMenu rhythmbox
;;
"pidgin")
installAppsFromListMenu pidgin
;;
"nitrogen")
installAppsFromListMenu nitrogen
;;
"wine")
installAppsFromListMenu wine
;;
"snap")
installAppsFromListMenu snap
;;
"viber")
installViberMenu
;;
"slack")
installSlackMenu
;;
"appimagelauncher")
installAppImageLauncherMenu
;;
"xnviewmp")
installXnViewMPMenu
;;
"Back")
break
;;
esac
done
}
#
# show menu about install/config hardware
#
function showHardwareMenu () {
while true; do
hardwareMenuOptions=$(whiptail \
--title "Yggdrasil $version - System Tools" \
--menu "System tools to diagnose and optimize" \
25 80 16 \
"HWE" "Ubuntu Hardware Enablement Stack (newer kernel+xorg)" \
"cardreader" "Apps/tools needed for cardreaders" \
"solaar" "Solaar for Logitech Unifying devices" \
"webcam" "Install webcam neede apps" \
"microcode" "Update Intel/AMD CPU microcode" \
"tlp" "Install/Enable TLP for better power management " \
"keyid" "Add udev rules for Key-ID FIDO U2F usb key" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $hardwareMenuOptions in
"HWE")
installAppsFromListMenu hwe
;;
"cardreader")
installAppsFromListMenu cardreader
;;
"solaar")
installAppsFromListMenu solaar
;;
"webcam")
installAppsFromListMenu webcam
;;
"microcode")
updateMicrocode
pressKey
;;
"tlp")
installAppsFromListMenu tlp
;;
"keyid")
installKeyIDuDev
pressKey
;;
"Back")
break
;;
esac
done
}

0
notify.mp3 Executable file → Normal file
View file

1021
repo_functions_ub1804.sh → repo_functions.sh Executable file → Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

93
tools_functions.sh Executable file → Normal file
View file

@ -1,15 +1,41 @@
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : see documentation or man pages #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : Mint 18, Ubuntu 16.04, Elementary and other derivatives #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# tools and config functions #
#-----------------------------------------------------------------------------#
#
# enable ufw at boot time and add rules for installed apps
#
function enableUFW () {
runCmd "sudo ufw enable"\
"enabling UFW at boot"
if which syncthing >/dev/null; then
runCmd "sudo ufw allow syncthing" \
"adding UFW rules for Syncthing"
fi
}
#
# enable numlock by default on LightDM
#
function enableNumLockX () {
checkAndInstallDep apt numlockx numlockx
if which lightdm >/dev/null; then
runCmd "sudo cp /etc/lightdm/lightdm.conf.d/70-linuxmint.conf /etc/lightdm/lightdm.conf.d/70-linuxmint.conf.yggbak" \
"backing up lightdm original config file"
runCmd "echo -e '\ngreeter-setup-script=/usr/bin/numlockx on' | sudo tee -a /etc/lightdm/lightdm.conf.d/70-linuxmint.conf" \
"enabling numlockx on in lightdm at boot"
fi
}
#
# /tmp in RAM by modifying /etc/fstab
#TODO: add possibily to choose amount of ram
@ -21,17 +47,35 @@ function enableTmpRAM () {
fi
}
#
# add screenfetch exec in .bashrc
#
function addScreenfetchBashrc () {
checkAndInstallDep apt screenfetch screenfetch
runCmd "touch /home/$myHomedir/.bashrc" \
"creating .bashrc file if necessary" \
runCmd "echo 'screenfetch -t' | tee -a /home/$myHomedir/.bashrc" \
"adding screenfetch to .bashrc"
}
#
# cli history cmd timestamp enable
#
function enableHistoryTS () {
typeset ret_code
printf "[CMD] enabling CLI History TimeStamp "
printf "enabling CLI History TimeStamp "
echo "export HISTTIMEFORMAT='%F %T '" | tee -a /home/$myHomedir/.bashrc &>> $logFile
ret_code=$?
retCode $ret_code
}
#
# install/enable auto install of security updates
#
function installUnattendedUpgrades () {
installPackage apt unattended-upgrades
}
#
# display useful system/hardware informations
#
@ -55,14 +99,41 @@ function toolPacketLoss () {
ping -q -c 10 google.com
}
#
# Optimization of SQLite databases of Firefox and Firefox Nightly
#
function toolOptimizeFirefox () {
if (whiptail --title "Firefox SQLite DB Optimization" --yesno "Terminate Firefox and proceed ?" 10 60) then
if which firefox >/dev/null; then
printf "Optimizing Firefox"
pkill -9 firefox
for f in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $f 'VACUUM; REINDEX;'; done
printf "\n"
fi
if which firefox-trunk >/dev/null; then
printf "Optimizing Firefox Nightly"
pkill -9 firefox-trunk
for f in ~/.mozilla/firefox-trunk/*/*.sqlite; do sqlite3 $f 'VACUUM; REINDEX;'; done
printf "\n"
fi
fi
}
#
# remove useless packages (depedencies)
#
function toolAutoremove () {
runCmd "sudo apt-get -y autoremove" \
"removing useless APT dependencies"
runCmd "sudo flatpak uninstall --unused -y" \
"removing useless FLATPAK dependencies"
"removing not necessary dependencies"
}
#
# remove old versions of installed kernels
#
function toolClearOldKernels () {
checkAndInstallDep apt ukuu ukuu \
&& runCmd "sudo ukuu --purge-old-kernels --yes" \
"removing old kernels"
}
#

27
vars.sh Executable file → Normal file
View file

@ -1,19 +1,19 @@
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : see documentation or man pages #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : Mint 18, Ubuntu 16.04, Elementary and other derivatives #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# Script's cons. and vars. #
#-----------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Script's cons. and vars. #
#------------------------------------------------------------------------------#
#
# app version number
#
version="0.6.1-b21"
version="0.4.0"
#
# myHomedir is used in full paths to the homedir
@ -36,11 +36,6 @@ cDate=$(date +%d-%m-%Y)
#
repoAdded=0
#
# ygginit flag for CLI mode
#
ygginitCount=false
#
# shell color codes
#

View file

@ -1,45 +1,31 @@
#!/bin/bash
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : Mint 19, Ubuntu 18.04 #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : Mint 18, Ubuntu 16.04, Elementary and other derivatives #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#------------------------------------------------------------------------------#
#
# include functions and vars from external files
#
dir=$(dirname $0)
source /opt/yggdrasil/vars.sh || exit 1
source /opt/yggdrasil/core_functions.sh || exit 1
source /opt/yggdrasil/tools_functions.sh || exit 1
OS=`lsb_release -d | awk -F':' '{print $2}' | awk -F'\t' '{print $2}'`
case $OS in
*"Ubuntu 16.04"* | *"Linux Mint 18"*)
printf "\n"
printf $BOLDROUGE"Yggdrasil for Ubuntu 16.04 / Linux Mint 18 is no longer available.\n"$NORMAL
printf "If you still need it, use an older version of Yggdrasil previous to 0.5.1.\n"
printf "Thanks for using Yggdrasil"
printf "\n"
;;
*"Ubuntu 18.04"* | *"Linux Mint 19"*)
source /opt/yggdrasil/repo_functions_ub1804.sh || exit 1
source /opt/yggdrasil/install_functions_ub1804.sh || exit 1
source /opt/yggdrasil/menus_functions_ub1804.sh || exit 1
;;
*"Ubuntu 20.04"* | *"Linux Mint 20"*)
source /opt/yggdrasil/repo_functions_ub2004.sh || exit 1
source /opt/yggdrasil/install_functions_ub2004.sh || exit 1
source /opt/yggdrasil/menus_functions_ub2004.sh || exit 1
;;
*)
printf "\n"
printf $BOLDROUGE"Linux distro not supported"$NORMAL
printf "\n\n"
;;
esac
if [ ! $dir == "/opt/yggdrasil" ]; then
source /opt/yggdrasil/vars.sh
source /opt/yggdrasil/core_functions.sh
source /opt/yggdrasil/repo_functions.sh
source /opt/yggdrasil/install_functions.sh
source /opt/yggdrasil/menus_functions.sh
source /opt/yggdrasil/tools_functions.sh
else
source $(dirname $0)/vars.sh
source $(dirname $0)/core_functions.sh
source $(dirname $0)/repo_functions.sh
source $(dirname $0)/install_functions.sh
source $(dirname $0)/menus_functions.sh
source $(dirname $0)/tools_functions.sh
fi
#
# check if the script is running in root/sudo
@ -61,206 +47,157 @@ echo "--[ Yggdrasil log ]--[ "$cDate" ]--[ "$cTime" ]-----------------------" >>
# Headless Mode #
#-----------------------------------------------------------------------------#
# display logo in CLI mode
[[ $# -gt 0 ]] && dispLogo
#
# arguments/options management with getopts
while getopts ":h,v,f,c,u,a,d,q,s,t,w,g,j,k,p" option; do
while getopts ":h,v,f,c,u,a,d,q,s,t,n,g,w,p,k,T" option; do
case "$option" in
a) # install all apps
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Installing Apps"
installAppsFromList base
installAppsFromList office
installAppsFromList burningtools
installAppsFromList ebook
installAppsFromList games
installAppsFromList steam
installAppsFromList internet
installAppsFromList java11
installAppsFromList utilities
installAppsFromList multimedia
installAppsFromList nettools
installAppsFromList wine
installAppsFromList cajaplugins
installAppsFromList nautilus
installAppsFromList thunar
installAppsFromList gimp
installAppsFromList pidgin
installAppsFromList rhythmbox
msg "Installing HW related"
installAppsFromList webcam
updateMicrocode
msg "Applying system customizations"
enableHistoryTS
msg "Installing external apps"
installViber
installBoostnotes
installTeamViewer13
installAppImageLauncher
installXnViewMP
;;
f) # full install
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Installing Apps"
installAppsFromList base
installAppsFromList office
installAppsFromList burningtools
installAppsFromList ebook
installAppsFromList games
installAppsFromList steam
installAppsFromList internet
installAppsFromList java11
installAppsFromList utilities
installAppsFromList multimedia
installAppsFromList nettools
installAppsFromList wine
installAppsFromList cajaplugins
installAppsFromList nautilus
installAppsFromList thunar
installAppsFromList gimp
installAppsFromList pidgin
installAppsFromList rhythmbox
msg "Installing HW related"
installAppsFromList webcam
updateMicrocode
installAppsFromList cardreader
msg "Applying system customizations"
enableHistoryTS
installAppsFromList unbound
msg "Installing additional themes/icons"
installAppsFromList icons
installAppsFromList gtkthemes
msg "Installing external apps"
installViber
installBoostnotes
installTeamViewer13
installAppImageLauncher
installXnViewMP
;;
c) # install themes and icons
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Installing Icons/Themes"
installAppsFromList icons
installAppsFromList gtkthemes
;;
w) # nitrogen
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Installing Nitrogen"
installAppsFromList nitrogen
;;
d) # install Unbound DNS Cache
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Installing Unbound"
installAppsFromList unbound
;;
q) # cardreader
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Installing Card Readers Apps"
installAppsFromList cardreader
;;
s) # solaar for logitech devices
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Installing Solaar"
installAppsFromList solaar
;;
t) # tlp (laptop or low energy usage)
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Installing TLP"
installAppsFromList tlp
;;
k) # Ubuntu Hardware Enablement Stack
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Installing HWE (newer kernel+xorg)"
installAppsFromList hwe
;;
g) # Unlock+Install SNAP + Store
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Unlock/Install SNAP + Store"
installAppsFromList snap
;;
j) # unattended-upgrades
if [ $ygginitCount = false ]; then
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
ygginitCount=true
fi
msg "Install/Enable unattended-upgrades"
installAppsFromList unattended-upgrades
;;
u)
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
msg "Installing Apps"
installBase
installOffice
installBurningTools
installEbook
installGames
installSteam
installInternet
installJava9
installMiscUtilities
installMultimedia
installNetTools
installOffice
installWine
installCajaPlugins
installNautilusAndPlugins
installGimpPlugins
installPidginPlugins
installRhythmBoxPlugins
msg "Installing HW related"
installWebcam
updateMicrocode
msg "Applying system customizations"
enableUFW
enableNumLockX
addScreenfetchBashrc
enableHistoryTS
installUnattendedUpgrades
msg "Installing external apps"
installViber
installFranz
installTeamViewer13
toolAutoremove
exit
;;
f) # full install
msg "Initializing"
yggInit
msg "Updating the system"
updateSystem
msg "Installing Apps"
installBase
installOffice
installBurningTools
installEbook
installGames
installSteam
installInternet
installJava9
installMiscUtilities
installMultimedia
installNetTools
installOffice
installWine
installCajaPlugins
installNautilusAndPlugins
installGimpPlugins
installPidginPlugins
installRhythmBoxPlugins
msg "Installing HW related"
installWebcam
updateMicrocode
installCardReader
msg "Applying system customizations"
enableUFW
enableNumLockX
addScreenfetchBashrc
enableHistoryTS
installUnattendedUpgrades
enableUnbound
msg "Installing additional themes/icons"
installIcons
installThemes
msg "Installing external apps"
installViber
installFranz
installTeamViewer13
toolAutoremove
exit
;;
c) # install themes and icons
yggInit
updateSystem
installIcons
installThemes
exit
;;
w) # nitrogen
yggInit
updateSystem
installNitrogen
exit
;;
d) # install Unbound DNS Cache
yggInit
updateSystem
enableUnbound
exit
;;
q) # cardreader
yggInit
updateSystem
installCardReader
exit
;;
s) # solaar for logitech devices
yggInit
updateSystem
installSolaar
exit
;;
t) # tlp (laptop or low energy usage)
yggInit
updateSystem
installTLP
exit
;;
n) # latest nvidia driver (see menus if need older version)
yggInit
updateSystem
installNvidia396
exit
;;
g) # latest feee graphic drivers, mesa, ...
yggInit
updateSystem
installOibaf
exit
;;
k)
yggInit
updateSystem
kernelUpdate
exit
;;
u)
yggInit
updateSystem
exit
;;
p)
msg "Removing useless dependencies"
toolAutoremove
exit
;;
@ -285,9 +222,6 @@ while getopts ":h,v,f,c,u,a,d,q,s,t,w,g,j,k,p" option; do
esac
done
# if CLI mode, no need to run the menus...
[[ $# -gt 0 ]] && exit
#-----------------------------------------------------------------------------#
# Menu Mode #
#-----------------------------------------------------------------------------#
@ -321,12 +255,12 @@ mainMenuOptions=$(whiptail \
25 80 16 \
"1" "System update" \
"2" "Applications" \
"3" "Themes & Icons" \
"4" "Dev Apps" \
"5" "System Config" \
"6" "Hardware" \
"7" "System Tools" \
"8" "Add Makoto no Blog repository" \
"3" "Applications (BETA)" \
"4" "Applications (Nightly)" \
"5" "Themes & Icons" \
"6" "Dev Apps" \
"7" "System Config" \
"8" "System Tools" \
"9" "Reboot this computer" \
"10" "About Yggdrasil" \
"11" "Quit" 3>&1 1>&2 2>&3)
@ -340,22 +274,22 @@ case $mainMenuOptions in
showAppInstallMenu
;;
"3")
showThemesInstallMenu
showAppBetaInstallMenu
;;
"4")
showDevInstallMenu
showAppNightlyInstallMenu
;;
"5")
showConfigMenu;
showThemesInstallMenu
;;
"6")
showHardwareMenu
showDevInstallMenu
;;
"7")
showSysToolsMenu
showConfigMenu;
;;
"8")
addRepo_Makoto
showSysToolsMenu
;;
"9")
showRebootBoxMenu
@ -370,4 +304,4 @@ esac # main menu
done # end of main menu loop
clear
exit
exit