Hi all,
I'm not able to use wine command in crontab it giving following error "Error opening terminal: unknown"
I'm using wine 0.9, i have added following command in crontab
20 10 * * * /home/Maven/test.sh
In the "test.sh" file has the following wine comments
ssdir=/mnt/VSS-DB <!-- VSS DB mounted folder --> path=$path;......
export ssdir export path
wine "z:/mnt/winsys/Program Files/Microsoft Visual Studio/Common/VSS/win32/ss.exe" Workfold $/xyz/Development/src "z:/mnt/workfold/" -Yarunm,maven wine "z:/mnt/winsys/Program Files/Microsoft Visual Studio/Common/VSS/win32/ss.exe" get $/xyz/Development/src -yarunm,maven -R -f
I got tired of flailing in the drak, please correct me where i'm wrong....!!!
Thanks & Regards charles
Hi Charles,
OK, so what I suspect is happening is crontab has no DISPLAY variable set, so wine is defaulting to using the ttydriver. Unfortunately, crontab environment isn't attached to any tty, so that fails too with the error message you see.
What you really want is the nulldriver (which I think Alexandre mentioned once a while back) but that doesn't exist yet.
I'm not sure how to start up a pseudo-tty for your crontab entry. It should be possible but I'm not sure if there's standard tools to achieve it.
What I do for WRT is start up a VNC for the duration, then shut it down again. See script snippets below for some ideas. This should work for you, but its something of a hammer to crack a nut.
I used to use Xvfb (from XFree86) as the (virtual) frame-buffer device and have some scripts to support that. Unfortunately, that had a nasty habit of crashing whenever one tried any openGL/glx stuff and the XF86 people weren't interested in fixing the bugs.
HTH,
Paul.
Do something like:
crontab-script.sh: #!/bin/bash
. /usr/local/share/wine/wine-functions # or wherever
eval $(startVNC) wine some-prog.exe eval $(stopVNC)
wine-functions:
function startVNC() { res=${XVFB_RESOLUTION:-1600x1200} depth=${XVFB_DEPTH:-16} disp=${XVFB_DISPLAY:-1}
$VNCDIR/vncserver :$disp -geometry ${res} -depth $depth echo "export DISPLAY=:${disp};" echo "echo vncserver up and running..." }
function stopVNC() { disp=${XVFB_DISPLAY:-1}
$VNCDIR/vncserver -kill :$disp
echo "unset DISPLAY;" echo "echo vncserver stopped." }
Unfortunately, I had to patch vncserver script to stop it from writing to ~/.vnc. Here's the patch:
--- /usr/bin/vncserver Fri Feb 27 09:19:42 2004 +++ VNC/vncserver Sun Sep 25 21:18:34 2005 @@ -18,6 +18,8 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. # +# APM - 2005-05-13: work solely out of WRT directory. Unfortunately, this +# requires patching this executable
# # vncserver - wrapper script to start an X VNC server. @@ -37,7 +39,7 @@ $depth = 24; $desktopName = "X"; $vncClasses = "/usr/share/vnc/classes"; -$vncUserDir = "$ENV{HOME}/.vnc"; +$vncUserDir = "$ENV{VNCDIR}" || "$ENV{HOME}/.vnc"; $fontPath = "unix/:7100";
# Here is another example of setting the font path:
so, running this patched version of vncserver with VNCDIR set somewhere writable by cron's userid should work.
On Friday 18 November 2005 07:09, Charles A wrote:
I'm not able to use wine command in crontab it giving following error "Error opening terminal: unknown"
I'm using wine 0.9, i have added following command in crontab
20 10 * * * /home/Maven/test.sh
In the "test.sh" file has the following wine comments
ssdir=/mnt/VSS-DB <!-- VSS DB mounted folder --> path=$path;......
export ssdir export path
wine "z:/mnt/winsys/Program Files/Microsoft Visual Studio/Common/VSS/win32/ss.exe" Workfold $/xyz/Development/src "z:/mnt/workfold/" -Yarunm,maven wine "z:/mnt/winsys/Program Files/Microsoft Visual Studio/Common/VSS/win32/ss.exe" get $/xyz/Development/src -yarunm,maven -R -f
I got tired of flailing in the drak, please correct me where i'm wrong....!!!
Thanks & Regards charles
Paul Millar paul@astro.gla.ac.uk writes:
What you really want is the nulldriver (which I think Alexandre mentioned once a while back) but that doesn't exist yet.
It very much exists. Running without a display should work just fine with 0.9.1.
On Sat, 19 Nov 2005 06:37, Paul Millar wrote:
I used to use Xvfb (from XFree86) as the (virtual) frame-buffer device and have some scripts to support that. Unfortunately, that had a nasty habit of crashing whenever one tried any openGL/glx stuff and the XF86 people weren't interested in fixing the bugs.
The SEGV is due to the X server failing to clean up some of its structures correctly on a reset - you can avoid it by starting Xvfb with the "-noreset" flag. You will get the same SEGV if you use accelerated openGL against an old Voodoo card and the server resets before the app connects.
Friday, November 18, 2005, 12:09:32 AM, Charles A wrote:
Hi all, I'm not able to use wine command in crontab it giving following error "Error opening terminal: unknown" I'm using wine 0.9, i have added following command in crontab
What you need is to upgrade to 0.9.1. It should work, as aforementioned ttydriver is no more and replaced with nulldriver.
Vitaliy.