DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 24th November 2008
hamba hamba is offline
Fdisk Soldier
 
Join Date: Apr 2008
Posts: 71
Thanked 5 Times in 4 Posts
Default auto restart an app within wine

Hi

I am trying to create a little script that will restart a wine app when it stopped running or was accidentally closed.

So far I have this
Code:
#!/usr/local/bin/bash
[ -z "`ps ax | grep Poker | grep -v grep`" ] && /usr/local/bin/wine ~/.wine/drive_c/Program\ Files/applications/application.exe
This works 50% in that when I that when I run it manually it starts the app the way it should and when its added to my crontab it starts the app but I can't see it.
I know the app is running because ps is showing me the same info as when manually starting the app.

Is there anyone that can shed some light on what I can try next to make this work?

Thanks
hamba
Reply With Quote
  #2   (View Single Post)  
Old 24th November 2008
hamba hamba is offline
Fdisk Soldier
 
Join Date: Apr 2008
Posts: 71
Thanked 5 Times in 4 Posts
Default

never mind, just after I created this post I solved the problem
:-)
Reply With Quote
  #3   (View Single Post)  
Old 24th November 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

Please post the solution, so that other will know what to do when they run into similar situations.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #4   (View Single Post)  
Old 25th November 2008
hamba hamba is offline
Fdisk Soldier
 
Join Date: Apr 2008
Posts: 71
Thanked 5 Times in 4 Posts
Default

The solution was to add DISPLAY to the contab

Code:
> crontab -l
DISPLAY=:0.0
*/5 * * * * /usr/home/user/bla.sh
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wine: Your Experiences ninjatux Off-Topic 10 4th June 2013 12:48 PM
Auto-YES? wubrgamer FreeBSD Ports and Packages 7 24th September 2008 01:58 PM
Auto backup cwhitmore FreeBSD General 6 19th August 2008 05:17 PM
DSL auto login Weaseal FreeBSD General 3 17th June 2008 03:26 PM
Customizeable FTP auto-fetch script (OpenBSD snapshot download as example) J65nko Guides 2 1st June 2008 03:29 AM


All times are GMT. The time now is 03:12 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick