Ubuntu: Run wine app from command line using xvfb

sudo apt-get install xvfb sudo apt-get install imagemagick xvfb :1 -screen 0 1280x960x24 & DISPLAY=:1 wine mywindesktopapp.exe & #you can take a picture DISPLAY=:1 import -window root -quality 90 /tmp/screenshot.jpg
Run window desktop application from command line on headless server.

2 Responses


I tried these commands on my headless server, using a remote SSH session, but it didn't work.

First I run:


and I got blank results

Then I tried:

Xvfb :1 -screen 0 1280x960x24 & DISPLAY=:1 wine explorer.exe

and I got the following results:

Fatal server error:
(EE) Server is already active for display 1
If this server is no longer running, remove /tmp/.X1-lock
and start again
006e:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
006e:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.

I don't know how to proceed in order to solve the issue.

Any help will be more than welcome.

Best wishes,


@Daniel Thanks for comments.

Let me check this issue and let you know.

Best wishes.

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.