#!/usr/bin/env bash export OLDUSER=${DUSER:-user} export USER=${REALUSER:?} groupmod --new-name $USER $(id -gn $OLDUSER) usermod --home /home/$USER $OLDUSER usermod --login $USER $OLDUSER echo "$USER ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/$USER sudo PULSE_SERVER=${PULSE_SERVER:?} su -s /bin/bash -c /opt/cool-retro-term/cool-retro-term $USER # QT_X11_NO_MITSHM - stops Qt form using the MIT-SHM X11 extension # sudo QT_X11_NO_MITSHM=${QT_X11_NO_MITSHM:-1} PULSE_SERVER=${PULSE_SERVER:?} su -s /bin/bash -c /opt/cool-retro-term/cool-retro-term $USER