approach for sudo to have X windows working
[feisty_meow.git] / scripts / core / launch_feisty_meow.sh
index 0d7d54beb9d4ed27a880d33b229d29314a573dd5..4a6184e687571f4a8c8404eaa09dd0e334eaa2b1 100644 (file)
@@ -92,6 +92,13 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then
   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 "$IMPORTED_XAUTH"
+  fi
   
   ##############