Index: /trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/main.cpp	(revision 52646)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/main.cpp	(revision 52647)
@@ -378,8 +378,11 @@
     if (g_szPidFile[0])
         rc = VbglR3PidFile(g_szPidFile, &g_hPidFile);
+    if (rc == VERR_FILE_LOCK_VIOLATION)  /* Already running. */
+        return 0;
     if (RT_FAILURE(rc))
         VBClFatalError(("Creating pid-file: %Rrc\n", rc));
     /* Set signal handlers to clean up on exit. */
     vboxClientSetSignalHandlers();
+#ifndef VBOXCLIENT_WITHOUT_X11
     /* Set an X11 error handler, so that we don't die when we get unavoidable
      * errors. */
@@ -388,4 +391,5 @@
      * fatal errors. */
     XSetIOErrorHandler(vboxClientXLibIOErrorHandler);
+#endif
     rc = (*g_pService)->init(g_pService);
     if (RT_FAILURE(rc))
