]> arthur.barton.de Git - ConfigScripts.git/commitdiff
Move Xauthority file to local storage, so that sudo et all work
authorAlexander Barton <alex@barton.de>
Mon, 23 Mar 2009 22:25:29 +0000 (23:25 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 23 Mar 2009 22:25:29 +0000 (23:25 +0100)
sys/profile

index ef07918d2ae1041c2ee687b30004e4de288991e0..8b80cf9cc07aa92248e0f17c834b8835d8f87c07 100644 (file)
@@ -72,6 +72,13 @@ export UID USER
 ME=`hostname -s`
 export ME
 
+# Move Xauthority file to local storage, so that sudo et all work
+if [ -z "$XAUTHORITY" -a -r ~/.Xauthority ]; then
+       cp ~/.Xauthority /tmp/Xauthority-$USER
+       chmod 600 /tmp/Xauthority-$USER
+       export XAUTHORITY="/tmp/Xauthority-$USER"
+fi
+
 # read profile additions
 if [ -d /etc/profile.d ]; then
        for f in /etc/profile.d/*; do