1

I'm using wine (WineHQ) on a Ubuntu server to run a Windows program that pops up a window (just for status update, nothing clickable). In Wine, that is done by X11 forwarding.

I'd like to disable this window by not showing it when I ssh to the server. I tried to ssh without -Y so disabling the X forwarding, but wine throws an error:

01b5:err:user:load_desktop_driver failed to load L"C:\\windows\\system32\\winex11.drv"
01b5:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
01b5:err:winediag:nodrv_CreateWindow The explorer process failed to start.

Is there a way I could trick the system and let it know I'm creating an X11 window, but actually not displaying it?

  • I later tried to se the env. variable DISPLAY to :0.0. When I ssh with -Y this value is :11.0, and empty without -Y. I think I bypassed the display but it also made the program run more slowly. I'll try what @filipe-brandenburger said. – frankliuao Oct 17 '18 at 15:40
2

You can use Xvfb, the virtual framebuffer X server, for this purpose.

This is an X server that emulates a dumb framebuffer in memory, so it does not require any display hardware or physical input devices.

Some Linux distributions (like Ubuntu) ship an xvfb-run wrapper, which will start an Xvfb server, set the DISPLAY appropriately to use it while running the passed command-line and finally tear down the Xvfb server once the command is finished.

On Ubuntu, you can install Xvfb and xvfb-run with:

$ sudo apt-get install xvfb

And then run your application with:

$ xvfb-run wine /path/to/wine/application

Which should work just fine on an ssh session without -Y for X11 forwarding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.