Index: /trunk/src/VBox/Main/ExtPackManagerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ExtPackManagerImpl.cpp	(revision 35236)
+++ /trunk/src/VBox/Main/ExtPackManagerImpl.cpp	(revision 35237)
@@ -2055,4 +2055,22 @@
 }
 
+/**
+ * Finds the success indicator string in the stderr output ofr hte helper app.
+ *
+ * @returns Pointer to the indicator.
+ * @param   psz                 The stderr output string. Can be NULL.
+ * @param   cch                 The size of the string.
+ */
+static char *findSuccessIndicator(char *psz, size_t cch)
+{
+    static const char s_szSuccessInd[] = "rcExit=RTEXITCODE_SUCCESS";
+    Assert(!cch || strlen(psz) == cch);
+    if (cch < sizeof(s_szSuccessInd) - 1)
+        return NULL;
+    char *pszInd = &psz[cch - sizeof(s_szSuccessInd) + 1];
+    if (strcmp(s_szSuccessInd, pszInd))
+        return NULL;
+    return pszInd;
+}
 
 /**
@@ -2209,13 +2227,13 @@
         }
 
-        if (    offStdErrBuf > 0
-             && !strcmp(pszStdErrBuf, "rcExit=RTEXITCODE_SUCCESS"))
-        {
-            *pszStdErrBuf = '\0';
-            offStdErrBuf  = 0;
+        char *pszSuccessInd = findSuccessIndicator(pszStdErrBuf, offStdErrBuf);
+        if (pszSuccessInd)
+        {
+            *pszSuccessInd = '\0';
+            offStdErrBuf  = pszSuccessInd - pszStdErrBuf;
         }
         else if (   ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
                  && ProcStatus.iStatus   == 0)
-            ProcStatus.iStatus = 666;
+            ProcStatus.iStatus = offStdErrBuf ? 667 : 666;
 
         /*
@@ -2223,6 +2241,5 @@
          */
         if (   ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
-            && ProcStatus.iStatus   == 0
-            && offStdErrBuf         == 0)
+            && ProcStatus.iStatus   == 0)
             hrc = S_OK;
         else if (ProcStatus.enmReason == RTPROCEXITREASON_NORMAL)
Index: /trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp
===================================================================
--- /trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp	(revision 35236)
+++ /trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp	(revision 35237)
@@ -1335,6 +1335,4 @@
     bool        fHaveDisplayVar = RTEnvExist("DISPLAY");
     int         iSuArg          = cSuArgs;
-    PRTHANDLE   pStdNull        = NULL;
-    RTHANDLE    StdNull;
     char        szExecTool[260];
     char        szXterm[260];
@@ -1345,57 +1343,35 @@
     if (fHaveDisplayVar && FindExecTool(szExecTool, sizeof(szExecTool), "kdesudo"))
     {
-        rc = RTFileOpenBitBucket(&StdNull.u.hFile, RTFILE_O_WRITE);
-        if (RT_SUCCESS(rc))
-        {
-            StdNull.enmType = RTHANDLETYPE_FILE;
-            pStdNull = &StdNull;
-
-            iSuArg = cSuArgs - 4;
-            papszArgs[cSuArgs - 4] = szExecTool;
-            papszArgs[cSuArgs - 3] = "--comment";
-            papszArgs[cSuArgs - 2] = iCmd == CMD_INSTALL
-                                   ? "VirtualBox extension pack installer"
-                                   : iCmd == CMD_UNINSTALL
-                                   ? "VirtualBox extension pack uninstaller"
-                                   : "VirtualBox extension pack maintainer";
-            papszArgs[cSuArgs - 1] = "--";
-        }
-        else
-            RTMsgError("Failed to open /dev/null: %Rrc");
+        iSuArg = cSuArgs - 4;
+        papszArgs[cSuArgs - 4] = szExecTool;
+        papszArgs[cSuArgs - 3] = "--comment";
+        papszArgs[cSuArgs - 2] = iCmd == CMD_INSTALL
+                               ? "VirtualBox extension pack installer"
+                               : iCmd == CMD_UNINSTALL
+                               ? "VirtualBox extension pack uninstaller"
+                               : "VirtualBox extension pack maintainer";
+        papszArgs[cSuArgs - 1] = "--";
     }
     /*
      * gksu is our favorite as it is very well integrated.
-     *
-     * gksu is chatty, so we need to send stderr and stdout to /dev/null or the
-     * error detection logic in Main will fail.  This is a bit unfortunate as
-     * error messages gets lost, but wtf.
      */
     else if (fHaveDisplayVar && FindExecTool(szExecTool, sizeof(szExecTool), "gksu"))
     {
-        rc = RTFileOpenBitBucket(&StdNull.u.hFile, RTFILE_O_WRITE);
-        if (RT_SUCCESS(rc))
-        {
-            StdNull.enmType = RTHANDLETYPE_FILE;
-            pStdNull = &StdNull;
-
 #if 0 /* older gksu does not grok --description nor '--' and multiple args. */
-            iSuArg = cSuArgs - 4;
-            papszArgs[cSuArgs - 4] = szExecTool;
-            papszArgs[cSuArgs - 3] = "--description";
-            papszArgs[cSuArgs - 2] = iCmd == CMD_INSTALL
-                                   ? "VirtualBox extension pack installer"
-                                   : iCmd == CMD_UNINSTALL
-                                   ? "VirtualBox extension pack uninstaller"
-                                   : "VirtualBox extension pack maintainer";
-            papszArgs[cSuArgs - 1] = "--";
+        iSuArg = cSuArgs - 4;
+        papszArgs[cSuArgs - 4] = szExecTool;
+        papszArgs[cSuArgs - 3] = "--description";
+        papszArgs[cSuArgs - 2] = iCmd == CMD_INSTALL
+                               ? "VirtualBox extension pack installer"
+                               : iCmd == CMD_UNINSTALL
+                               ? "VirtualBox extension pack uninstaller"
+                               : "VirtualBox extension pack maintainer";
+        papszArgs[cSuArgs - 1] = "--";
 #else
-            iSuArg = cSuArgs - 2;
-            papszArgs[cSuArgs - 2] = szExecTool;
-            papszArgs[cSuArgs - 1] = pszCmdLine;
-            papszArgs[cSuArgs] = NULL;
+        iSuArg = cSuArgs - 2;
+        papszArgs[cSuArgs - 2] = szExecTool;
+        papszArgs[cSuArgs - 1] = pszCmdLine;
+        papszArgs[cSuArgs] = NULL;
 #endif
-        }
-        else
-            RTMsgError("Failed to open /dev/null: %Rrc");
     }
     /*
@@ -1447,5 +1423,5 @@
         RTPROCESS hProcess;
         rc = RTProcCreateEx(papszArgs[iSuArg], &papszArgs[iSuArg], RTENV_DEFAULT, 0 /*fFlags*/,
-                            NULL /*phStdIn*/, pStdNull, pStdNull, NULL /*pszAsUser*/,  NULL /*pszPassword*/,
+                            NULL /*phStdIn*/, NULL /*phStdOut*/, NULL /*phStdErr*/, NULL /*pszAsUser*/, NULL /*pszPassword*/,
                             &hProcess);
         if (RT_SUCCESS(rc))
@@ -1467,5 +1443,4 @@
     }
     RTStrFree(pszCmdLine);
-    RTFileClose(StdNull.u.hFile);
 
 #endif
