--- a/libgksu/libgksu.c
+++ b/libgksu/libgksu.c
@@ -2704,6 +2704,12 @@
       cmd[argcount] = g_strdup("-H");
       argcount++;
     }
+  else
+    {
+      /* Preserve the environment, if sudo will let us */
+      cmd[argcount] = g_strdup("-E");
+      argcount++;
+    }
 
   /* Make sudo read from stdin */
   cmd[argcount] = g_strdup("-S");
