Question

I cannot for the life of me get wine to work with cron. It just straight up doesn't work. I get this error each time:

wine: '/' is not owned by you, refusing to create a configuration directory there

Note, I am running under the correct user (not attempting to run the command as root).

Does anybody know how to fix this?

Additional information, the cron entry looks something like this:

01 01 * * 1-5 username cd /prog/location; ./wineprogram.exe

EDIT2: wineprogram.exe is command line only, it does not pop up any windows, i know the cron user has no x11

Was it helpful?

Solution

Specify the $WINEPREFIX that would be used as that user.

OTHER TIPS

Wine works with cron but it needs to know which display to use, I was able to run wine scripts by the following way:

Determine which display is your user using

user:~$echo $DISPLAY

outputs:

:0

(above this can be different in your case!)

Then edit crontab like this:

26 * * * * DISPLAY=:0 /usr/bin/wine /path/to/app/you/want.exe

Also if your wine is on different location try with:

which wine
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top