1

There is bash in cron script with wine executing. In cronjob log I see:

wine: Unhandled exception 0x0eedfade in thread 9 at address 0xce99ebf0:0x7b83e6ce (thread 0009), starting debugger...
err:winediag:nulldrv_CreateWindow Application tried to create a window, but no driver could be loaded.
err:winediag:nulldrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
err:seh:setup_exception_record stack overflow 928 bytes in thread 0009 eip 7bc843a0 esp 00230f90 stack 0x230000-0x231000-0x330000

I tryed two approaches to avoid this problem, but no one worked.

1) In bash script:

DISPLAY= wine my_program.exe

2) In crontab

52 15 * * * export DISPLAY= && bash myscript.sh >> /var/log/mylog.log 2>&1

How to fix this error?

Boris Salimov
  • 221
  • 2
  • 3
  • 8

1 Answers1

2

The binary wine is meant for graphical programs, it needs an X server to run. If your program doesn't have a graphical interface, use wineconsole instead.

wineconsole my_program.exe
Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79
  • Unfortunately not work with **wineconsole** – Boris Salimov Jan 31 '17 at 08:35
  • _err:winediag:nulldrv_CreateWindow Application tried to create a window, but no driver could be loaded. err:winediag:nulldrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly. Error opening terminal: unknown._ – Boris Salimov Jan 31 '17 at 08:35
  • Strange, wineconsole should work without X. Well, then you are back to doing what the error told you in the first place: `Make sure that your X server is running and that $DISPLAY` – Gerald Schneider Jan 31 '17 at 08:37
  • One thing you can still try: `wineconsole --backend=curses my_program.exe`. According to the documentation the curses backend is supposed to be the default, but it can't hurt to try to force it. – Gerald Schneider Jan 31 '17 at 08:47
  • I tryed add option _--backend=curses_ but new error raised – Boris Salimov Feb 01 '17 at 03:28
  • _Error opening terminal: unknown._ – Boris Salimov Feb 01 '17 at 03:28