title: PyQt Error XcbConnection: Failed to initialize XRandr on Ubuntu
body: <p>I am developing a GUI using PyQt5 on a server with Ubuntu 14.04 via VNC. After I run the following command:</p>
  
  <pre><code>import sys
  from PyQt5.QtWidgets import QApplication
  app = QApplication(sys.argv)
  </code></pre>
  
  <p>I always get the following error message:</p>
  
  <pre><code>QXcbConnection: Failed to initialize XRandr
  </code></pre>
  
  <p>Besides, whenever I select a file in a file dialog created by PyQt5, the file dialog will disappear immediately and anther error message appears:</p>
  
  <pre><code>QXcbConnection: XCB error: 3 (BadWindow), sequence: 449, resource id: 30428093, major code: 40 (TranslateCoords), minor code: 0
  </code></pre>
  
  <p>I have been searching about this error a lot but didn't find anything helpful yet. Any idea on this?</p>