X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Flaunch_feisty_meow.sh;h=1e7e6c993f0657d813bfbd0066ad053ef7835244;hb=5cf92aab81bd652d22783e0cf3725e1bd9722526;hp=0d7d54beb9d4ed27a880d33b229d29314a573dd5;hpb=78ed23618219fa042729b66c51d4185af67fdabe;p=feisty_meow.git diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index 0d7d54be..1e7e6c99 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -86,12 +86,26 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then # some preconditions we want to establish before loading anything... # make sure that aliases can be used in non-interactive shells. + # this causes all aliases that are currently defined for this shell to + # be inherited by subshells that this shell starts. this is unusual, + # but is preferred for my workflow in feisty meow scripts; it saves me + # time re-adding aliases if i can count on them already being there. + # this is a problem if you *don't* want the aliases there though. we can + # solve that problem by running bash with the "-O expand_aliases" flags to + # stop the expansion for the next subshell. shopt -s expand_aliases # patch the user variable if we were launched by one of our cron jobs. if [ -z "$USER" -a ! -z "$CRONUSER" ]; then export USER="$CRONUSER" fi + + # use the xauth info if we were given one in the environment. + # this allows root or other su'd identities to create windows with same + # display variable. + if [ ! -z "$DISPLAY" -a ! -z "$IMPORTED_XAUTH" ]; then + xauth add $DISPLAY . $IMPORTED_XAUTH + fi ##############