#!/bin/bash # Parabola Install Wizard - in-chroot config # # this script is called by install.sh, # if the user elects to register an unprivileged login # it is expected to run in-chroot during the install process; # and should not be run explicitly # # # Copyright (C) 2015 Jorge Lopez # Copyright (C) 2015-2016 André Fabian Silva Delgado # Copyright (C) 2020,2022 bill-auger # # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Parabola Install Wizard. # # Parabola Install Wizard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Parabola Install Wizard is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Parabola Install Wizard. If not, see . source /root/session-common.sh.inc readonly USER_LOGIN=$(GetStateVar 'USER_LOGIN') readonly USER_PASS=$( GetStateVar 'USER_PASS' ) readonly KEYMAP=$( GetStateVar 'XKBMAP' ) readonly WMDE=$( GetStateVar 'WMDE' ) GsettingsSet() # (kvp) { sudo -u ${USER_LOGIN} gsettings set $* } ## main entry ## # configure root login usermod -p ${ROOT_PASS} root # check for the 'NONE' flag, to bypass user creation [[ "${USER_LOGIN}" != 'NONE' ]] && [[ "${USER_PASS}" != 'NONE' ]] || exit 0 # register unprivileged user useradd -m -g users -G 'wheel' -s /bin/bash -p ${USER_PASS} ${USER_LOGIN} # set keymap echo "setxkbmap ${KEYMAP}" >> /home/${USER_LOGIN}/.bashrc # configure desktop environment if [[ "${WMDE}" == 'mate' && -x /usr/bin/gsettings ]] then if [[ -d /usr/share/themes/Radiance-Purple ]] then GsettingsSet org.mate.interface gtk-theme 'Radiance-Purple' GsettingsSet org.mate.Marco.general theme 'Radiance-Purple' fi if [[ -d /usr/share/icons/RAVE-X-Dark-Purple ]] then GsettingsSet org.mate.interface icon-theme 'RAVE-X-Dark-Purple' fi if [[ -d /usr/share/icons/mate ]] then GsettingsSet org.mate.peripherals-mouse cursor-size '18' GsettingsSet org.mate.peripherals-mouse cursor-theme 'mate' fi if [[ -f /usr/share/backgrounds/parabola-laf/parabola-laf.png ]] then GsettingsSet org.mate.background picture-filename '/usr/share/backgrounds/parabola-laf/parabola-laf.png' fi fi # allow members of group wheel to execute any command sed -i "$WHEEL_SUDOERS_SED_RX" /etc/sudoers exit