2018-05-26 21:36:16 +00:00
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
# Yggdrasil NG #
|
|
|
|
# compatibility : see documentation or man pages #
|
|
|
|
# author : Francois B. (Makotosan/Shakasan) #
|
|
|
|
# licence : GPLv3 #
|
|
|
|
# website : https://makotonoblog.be/ #
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
# #
|
|
|
|
# Ubuntu 16.04 / Linux Mint 18 #
|
|
|
|
# #
|
|
|
|
#-----------------------------------------------------------------------------#
|
2018-03-21 07:26:38 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
# 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 \
|
|
|
|
"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" \
|
2018-05-26 18:54:20 +00:00
|
|
|
"Unbound" "Enable Unbound DNS Cache server" \
|
2018-03-21 07:26:38 +00:00
|
|
|
"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
|
|
|
|
pressKey
|
|
|
|
;;
|
|
|
|
"unattendedUpgrades")
|
|
|
|
clear
|
|
|
|
installUnattendedUpgrades
|
|
|
|
pressKey
|
|
|
|
;;
|
2018-05-26 18:54:20 +00:00
|
|
|
"Unbound")
|
|
|
|
clear
|
|
|
|
installUnbound
|
|
|
|
pressKey
|
|
|
|
;;
|
2018-03-21 07:26:38 +00:00
|
|
|
"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)" \
|
|
|
|
"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)
|
|
|
|
|
|
|
|
case $sysToolsMenuOptions in
|
|
|
|
"inxi")
|
|
|
|
clear; toolInxi; pressKey
|
|
|
|
;;
|
|
|
|
"speedtest-cli")
|
|
|
|
clear; toolSpeedtestCli; pressKey
|
|
|
|
;;
|
|
|
|
"packetloss")
|
|
|
|
clear; toolPacketLoss; pressKey
|
|
|
|
;;
|
|
|
|
"OptimizeFirefox")
|
|
|
|
clear; toolOptimizeFirefox; pressKey
|
|
|
|
;;
|
|
|
|
"Autoremove")
|
|
|
|
clear; toolAutoremove; pressKey
|
|
|
|
;;
|
|
|
|
"CleanOldKernels")
|
|
|
|
clear; toolClearOldKernels; 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")
|
|
|
|
installThemesMenu
|
|
|
|
;;
|
|
|
|
"icons")
|
|
|
|
installIconsMenu
|
|
|
|
;;
|
|
|
|
"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" \
|
2018-05-03 22:20:39 +00:00
|
|
|
"java10" "Java 10 dev env" \
|
2018-03-21 07:26:38 +00:00
|
|
|
"javascript" "JavaScript dev env" \
|
|
|
|
"mongodb3ce" "MongoDB 3 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" \
|
|
|
|
"idea" "Idea" \
|
2018-05-30 20:45:47 +00:00
|
|
|
"eclipse" "Eclipse" \
|
2018-03-21 07:26:38 +00:00
|
|
|
"pycharm" "PyCharm" \
|
|
|
|
"vsc" "Visual Studio Code" \
|
|
|
|
"androidstudio" "Android Studio" \
|
|
|
|
"sublimetext" "Sublime Text" \
|
|
|
|
"cad" "CAD tools" \
|
|
|
|
"teamviewer13" "Teamviewer 13" \
|
2018-06-12 07:09:01 +00:00
|
|
|
"boostnotes" "Boostnotes Markdown wiki app" \
|
2018-06-12 07:14:11 +00:00
|
|
|
"compass" "MongoDB Compass GUI" \
|
2018-03-21 07:26:38 +00:00
|
|
|
"Back" "Back" 3>&1 1>&2 2>&3)
|
|
|
|
|
|
|
|
case $devInstallMenuOptions in
|
|
|
|
"devbase")
|
|
|
|
installDevAppsMenu
|
|
|
|
;;
|
2018-05-03 22:20:39 +00:00
|
|
|
"java10")
|
|
|
|
installJava10
|
2018-03-21 07:26:38 +00:00
|
|
|
;;
|
|
|
|
"javascript")
|
|
|
|
installJavascriptMenu
|
|
|
|
;;
|
|
|
|
"mongodb3ce")
|
|
|
|
installMongo3CEMenu
|
|
|
|
;;
|
|
|
|
"php")
|
|
|
|
installPHPMenu
|
|
|
|
;;
|
|
|
|
"lua")
|
|
|
|
installLUAMenu
|
|
|
|
;;
|
|
|
|
"ruby")
|
|
|
|
installRubyMenu
|
|
|
|
;;
|
|
|
|
"qt")
|
|
|
|
installQTMenu
|
|
|
|
;;
|
|
|
|
"python")
|
|
|
|
installPythonMenu
|
|
|
|
;;
|
|
|
|
"atom")
|
|
|
|
installAtomMenu
|
|
|
|
;;
|
|
|
|
"anjuta")
|
|
|
|
installAnjutaMenu
|
|
|
|
;;
|
|
|
|
"brackets")
|
|
|
|
installBracketsMenu
|
|
|
|
;;
|
|
|
|
"codeblocks")
|
|
|
|
installCodeBlocksMenu
|
|
|
|
;;
|
|
|
|
"geany")
|
|
|
|
installGeanyMenu
|
|
|
|
;;
|
|
|
|
"idea")
|
|
|
|
installIdeaMenu
|
|
|
|
;;
|
2018-05-30 20:45:47 +00:00
|
|
|
"eclipse")
|
|
|
|
installEclipseMenu
|
|
|
|
;;
|
2018-03-21 07:26:38 +00:00
|
|
|
"pycharm")
|
|
|
|
installPyCharmMenu
|
|
|
|
;;
|
|
|
|
"vsc")
|
|
|
|
installVisualStudioCodeMenu
|
|
|
|
;;
|
|
|
|
"androidstudio")
|
|
|
|
installAndroidStudioMenu
|
|
|
|
;;
|
|
|
|
"sublimetext")
|
|
|
|
installSublimeTextMenu
|
|
|
|
;;
|
|
|
|
"cad")
|
|
|
|
installCADMenu
|
|
|
|
;;
|
|
|
|
"teamviewer13")
|
|
|
|
installTeamViewer13Menu
|
|
|
|
;;
|
2018-06-12 07:09:01 +00:00
|
|
|
"boostnotes")
|
|
|
|
installBoostnotesMenu
|
|
|
|
;;
|
2018-06-12 07:14:11 +00:00
|
|
|
"compass")
|
|
|
|
installCompassMenu
|
|
|
|
;;
|
2018-03-21 07:26:38 +00:00
|
|
|
"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" \
|
|
|
|
"internet" "Internet Apps" \
|
|
|
|
"utilities" "Misc Utilities" \
|
|
|
|
"games" "Games & tools" \
|
|
|
|
"burningtools" "Disc Burning and tools" \
|
|
|
|
"nettools" "Network tools" \
|
|
|
|
"cajaplugins" "Caja Plugins" \
|
|
|
|
"nautilus" "Nautilus and plugins" \
|
2018-06-10 16:24:08 +00:00
|
|
|
"thunar" "Thunar file manager" \
|
2018-03-21 07:26:38 +00:00
|
|
|
"gimp" "Gimp plugins" \
|
|
|
|
"rhythmbox" "RhythmBox plugins" \
|
|
|
|
"pidgin" "Pidgin plugins" \
|
|
|
|
"nitrogen" "Nitrogen WP Manager" \
|
|
|
|
"wine" "Wine Builds" \
|
|
|
|
"viber" "Viber IM desktop app" \
|
2018-06-12 07:09:01 +00:00
|
|
|
"franz" "Franz, Multi IM app" \
|
2018-06-12 07:18:24 +00:00
|
|
|
"slack" "Slack App" \
|
2018-03-21 07:26:38 +00:00
|
|
|
"Back" "Back" 3>&1 1>&2 2>&3)
|
|
|
|
|
|
|
|
case $appsInstallMenuOptions in
|
|
|
|
"base")
|
|
|
|
installBaseMenu
|
|
|
|
;;
|
|
|
|
"office")
|
|
|
|
installOfficeMenu
|
|
|
|
;;
|
|
|
|
"multimedia")
|
|
|
|
installMultimediaMenu
|
|
|
|
;;
|
|
|
|
"internet")
|
|
|
|
installInternetMenu
|
|
|
|
;;
|
|
|
|
"utilities")
|
|
|
|
installMiscUtilitiesMenu
|
|
|
|
;;
|
|
|
|
"games")
|
|
|
|
installGamesMenu
|
|
|
|
;;
|
|
|
|
"burningtools")
|
|
|
|
installBurningToolsMenu
|
|
|
|
;;
|
|
|
|
"nettools")
|
|
|
|
installNetToolsMenu
|
|
|
|
;;
|
|
|
|
"cajaplugins")
|
|
|
|
installCajaPluginsMenu
|
|
|
|
;;
|
|
|
|
"nautilus")
|
|
|
|
installNautilusAndPluginsMenu
|
|
|
|
;;
|
2018-06-10 16:24:08 +00:00
|
|
|
"thunar")
|
|
|
|
installThunarMenu
|
|
|
|
;;
|
2018-03-21 07:26:38 +00:00
|
|
|
"gimp")
|
|
|
|
installGimpPluginsMenu
|
|
|
|
;;
|
|
|
|
"rhythmbox")
|
|
|
|
installRhythmBoxPluginsMenu
|
|
|
|
;;
|
|
|
|
"pidgin")
|
|
|
|
installPidginPluginsMenu
|
|
|
|
;;
|
|
|
|
"nitrogen")
|
|
|
|
installNitrogenMenu
|
|
|
|
;;
|
|
|
|
"wine")
|
|
|
|
installWineMenu
|
|
|
|
;;
|
|
|
|
"viber")
|
|
|
|
installViberMenu
|
|
|
|
;;
|
2018-06-12 07:09:01 +00:00
|
|
|
"franz")
|
|
|
|
installFranzMenu
|
|
|
|
;;
|
2018-06-12 07:18:24 +00:00
|
|
|
"slack")
|
|
|
|
installSlackMenu
|
|
|
|
;;
|
2018-03-21 07:26:38 +00:00
|
|
|
"Back")
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
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
|
|
|
|
#
|
|
|
|
function showHardwareMenu () {
|
|
|
|
while true; do
|
|
|
|
|
|
|
|
hardwareMenuOptions=$(whiptail \
|
|
|
|
--title "Yggdrasil $version - System Tools" \
|
|
|
|
--menu "System tools to diagnose and optimize" \
|
|
|
|
25 80 16 \
|
|
|
|
"cardreader" "Apps/tools needed for cardreaders" \
|
|
|
|
"solaar" "Solaar for Logitech Unifying devices" \
|
|
|
|
"webcam" "Install webcam neede apps" \
|
|
|
|
"microcode" "Update Intel/AMD CPU microcode" \
|
|
|
|
"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" \
|
2018-03-30 07:39:12 +00:00
|
|
|
"nvidia387" "Install Nvidia 387 graphic drivers" \
|
|
|
|
"nvidia390" "Install Nvidia 390 graphic drivers" \
|
2018-05-01 23:25:14 +00:00
|
|
|
"nvidia396" "Install Nvidia 396 graphic drivers" \
|
2018-03-21 07:26:38 +00:00
|
|
|
"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
|
|
|
|
"cardreader")
|
|
|
|
installCardReaderMenu
|
|
|
|
;;
|
|
|
|
"solaar")
|
|
|
|
installAppsFromListMenu
|
|
|
|
;;
|
|
|
|
"webcam")
|
|
|
|
installWebcamMenu
|
|
|
|
;;
|
|
|
|
"microcode")
|
|
|
|
updateMicrocode
|
|
|
|
;;
|
|
|
|
"nvidia370")
|
|
|
|
installNvidia370Menu
|
|
|
|
;;
|
|
|
|
"nvidia375")
|
|
|
|
installNvidia375Menu
|
|
|
|
;;
|
|
|
|
"nvidia378")
|
|
|
|
installNvidia378Menu
|
|
|
|
;;
|
|
|
|
"nvidia381")
|
|
|
|
installNvidia381Menu
|
|
|
|
;;
|
|
|
|
"nvidia384")
|
|
|
|
installNvidia384Menu
|
|
|
|
;;
|
2018-03-30 07:39:12 +00:00
|
|
|
"nvidia387")
|
|
|
|
installNvidia387Menu
|
|
|
|
;;
|
|
|
|
"nvidia390")
|
|
|
|
installNvidia390Menu
|
|
|
|
;;
|
2018-05-01 23:25:14 +00:00
|
|
|
"nvidia396")
|
|
|
|
installNvidia396Menu
|
|
|
|
;;
|
2018-03-21 07:26:38 +00:00
|
|
|
"tlp")
|
|
|
|
installTLPMenu
|
|
|
|
;;
|
|
|
|
"keyid")
|
|
|
|
installKeyIDuDev
|
2018-06-08 23:47:59 +00:00
|
|
|
pressKey
|
2018-03-21 07:26:38 +00:00
|
|
|
;;
|
|
|
|
"WI6320")
|
|
|
|
fixWirelessIntel6320
|
2018-06-08 23:47:59 +00:00
|
|
|
pressKey
|
2018-03-21 07:26:38 +00:00
|
|
|
;;
|
|
|
|
"Back")
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
done
|
2018-05-29 11:02:06 +00:00
|
|
|
}
|