'Make sure that your X server is running and that $DISPLAY is set correctly

Hi I have install wine (version wine-3.0.2)on CentOS 7 to run my .vbs file. but while running it got the below errors.

*000f:fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 2
000f:fixme:service:scmdatabase_autostart_services Auto-start service L"WineBus" failed to start: 2
0019:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0019:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0019:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0019:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0019:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0009:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0009:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.*

Could you please help me to fix this. I don't have much idea about it



Solution 1:[1]

You're missing DISPLAY variable.

Try setting it to :0 (assuming your display is on screen 0), e.g.

export DISPLAY=:0

If you don't have your X server running, you can install Xvfb.

See: How to make Xvfb display visible?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 kenorb