From de0c54a49532803af940f8c069aa518dc0ecdcb1 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Mon, 4 Nov 2019 13:04:31 +0000 Subject: [PATCH] bash: Merge Xauth if using two homes --- bashrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bashrc b/bashrc index 5c8d61b..a5ce52c 100644 --- a/bashrc +++ b/bashrc @@ -109,6 +109,13 @@ else . $SSH_AGENT_FILE fi + +if [ "$HOME2" != "" ] ; then + echo "Switched root, merging $HOME2/.Xauthority" + xauth merge $HOME2/.Xauthority +fi + +# TODO Do with dropbox now... # Done the longer format so we catch dropbox instance, rather than stuff like # "links http://www.dropbox.com/" # DROPBOX_PID=$(ps -u paul | grep dropbox$ | awk '{print $1}')