Cron with Wine

The Ghost In The Machine ewill at
Wed Oct 17 11:07:09 CDT 2001

In, Brett Simpson
<Simpsonb at>
on Wed, 17 Oct 2001 09:55:06 -0400
<sbcd5584.031 at GroupWise>:
>I am currently using Windows self extractor from the command line and
>it works great to convert zip files to windows exe's.
>The issue I'm having is if I try and cron this through a shell scipt
>it complains with the following
>+ wine '/usr/share/wine-c/Program Files/WinZip Self-Extractor/WinZIPse.EXE'
>/y /le /overwrite 'Z:\home\mcsops\scripts\ctyctr4\sys\chhs\GROUPS\ED3TPA\
>x11drv: Can't open display: 
>This command works great when I run the shell script manually it just
>gives me the error when I add it to cron. I'm currently running Redhat
>7.2 with Wine build 20010629 under KDE 2.2.1.

A few observations.

[1] Most likely, you're running the script manually from within an
    Xterm, which has the DISPLAY variable set to the X display
    containing the Xterm.  That's why it works.  Since a cronjob
    hasn't got DISPLAY set, it won't work there.  Setting DISPLAY
    may not work, either -- it depends on whether you've always
    got X up, and whether X allows connections or not (I highly
    doubt X will work properly during xdm login, for example,
    but haven't tried it).  This is probably in the FAQ somewhere.

[2] Have you tried 'zip -A'?  The manpage suggests that '-A' prepends
    an SFX stub, although it's far from clear that that stub is
    for Linux or for Windows, or even for AmigaOS.

[3] Your Wine build could be updated, but it won't help. :-)
    06/29 is a bit old.

I don't know if it's possible to run Win32 console apps under Wine
without an X display yet.


ewill at -- insert random misquote here
EAC code #191       97d:20h:13m actually running Linux.
                    Use the source, Luke.

More information about the wine-users mailing list