X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=865aa251e03b79f3ce3681d7c4f8e4ee2888a6ee;hb=12d3b0a9a2dae8d187318c52465fd262c74b0c85;hp=f13f4afeb83565738a042e42a051fc78ca38f826;hpb=4bee7d64868d89a1a0506136f284d3f91aeabc24;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index f13f4afe..865aa251 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -451,6 +451,9 @@ if [ -z "$skip_all" ]; then # label if they're doing an su with the sudo. function sudo() { save_terminal_title + # hoist our X authorization info in case environment is passed along; + # this can allow root to use our display to show Xorg windows. + export IMPORTED_XAUTH="$(xauth list $DISPLAY)" /usr/bin/sudo "$@" retval=$? restore_terminal_title @@ -515,6 +518,8 @@ if [ -z "$skip_all" ]; then # if the user has sudo root access; we don't want to provide a custom # profile for root. fi + # chop off any email address style formatting to leave just the name. + custom_user="$(echo "$custom_user" | cut -f1 -d'@')" save_terminal_title