# ------------------------------------------------------------------------------ # Install desktop environment -- Ubuntu only # Debian version might ask for task-$FLAVOR # This file is part of the init.sh project # Copyright (c) 2019-2022 Geoffray Levasseur # ------------------------------------------------------------------------------ # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # * UBUNTU_FLAVOR: Kind of Ubuntu desktop installation (ubuntu for Gnome3, # xubuntu for XFCE, kubuntu for KDE/Plasma, ubuntu-mate for Mate, leave # empty for no desktop or manual) # * X11_DRV: Used to install proprietary driver for X.org (eg: nvidia-drivers) # ------------------------------------------------------------------------------ export VER_install_desktop="0.0.5" export DEP_install_desktop="upgrade_dist" install_desktop() { if [[ -n $X11_DRV ]]; then prnt I "Installing additionnal X11 drivers..." pkginst $X11_DRV fi if [[ -n $UBUNTU_FLAVOR ]]; then prnt I "Installing $UBUNTU_FLAVOR environment..." pkginst ${UBUNTU_FLAVOR}-desktop fi # Because we're lazy but manual actions can avoid reboot... export NEED_REBOOT=true } precheck_install_desktop() { if [[ -z $UBUNTU_FLAVOR ]]; then prnt W "No Ubuntu flavor chosen, no desktop environment will be installed!" else prnt m " * The flavor $UBUNTU_FLAVOR will be installed..." fi if [[ -n $X11_DRV ]]; then prnt W "Non free drivers will be installed." fi } export -f install_desktop export -f precheck_install_desktop # EOF