Starting Android emulator failed: QXcbConnection: Could not connect to display : <p>I would like to do some debugging(Android native program without GUI) on a remote server which doesn't have display.</p>

<p>The command is:</p>

<pre><code>./emulator -writable-system -avd Pixel_XL_API_25 -no-snapshot-load -qemu -no-skin -no-audio -no-window  -v
</code></pre>

<p>Error msg:</p>

<pre><code>emulator: WARNING: System image is writable
QXcbConnection: Could not connect to display
Aborted
</code></pre>

<p>I have the <code>-no-window</code> option why it still tried to connect to display?
I searched through Internet. It looks like it's a QT bug. Any idea to walk around it? </p>

<p>I tried to set the DISPLAY env var by <code>export DISPLAY=:0</code>. It doesn't work out.</p>
