Results 1 to 8 of 8

Thread: how to start boxee in a script or crontab???

  1. #1
    Join Date
    Nov 2008
    Posts
    12

    Default how to start boxee in a script or crontab???

    I'd like to setup a crontab job that will periodically start Boxee. Given that it is not a final release there are some issues and it sometimes crashes.

    What I want to do is run this job on a regular basis (~ every couple of mins) to start boxee. I have the command to start boxee from a terminal window in Ubuntu, but when i set it up to run in a crontab job, it just doesn't start fully.

    I see that the log file is trying to start the application and it doesn't give an error and just stops after a few steps and boxee never starts.

    Any help/suggestions on how to run this from a crontab job would be appreciated. Thanks.

  2. #2

    Default

    Just out of curiosity, why do you want to repeatedly start Boxee every few minutes?
    Common issues w/ Boxee:
    Beta Important Info | FAQ & Support Requests | Hulu Mature Content | Search

    UnBoxeed app development:
    Comics.com | ESPN360 | Weather

    For more info, follow app development on Twitter!

  3. #3
    Join Date
    Nov 2008
    Location
    NY
    Posts
    164

    Default

    Quote Originally Posted by DPK View Post
    Just out of curiosity, why do you want to repeatedly start Boxee every few minutes?
    i wonder if he has a cron script to check if boxee is running, and if not start it back up. i would rather find out why it was crashing instead of a workaround though..... i cant remember the last time boxee actually crashed for me, a few lockup here and there but no crashes.
    ~ Boxee on Ubuntu 10.04 ~

  4. #4
    Join Date
    Jan 2009
    Location
    SF Bay Area
    Posts
    188

    Default

    I agree with sfsmiley, I believe the better approach is to identify what is causing the crashes.

    However to address the original poster's question, your best bet is to create a script which:
    sets the DISPLAY environment variable (this is critical)
    checks if boxee is already running
    executes it if it's not

    Be sure to make the script executable, and add it to your crontab at whatever frequency you feel is necessary. Alternatively, creating a watchdog daemon or a wrapper script for launching Boxee (eg. one that sets the PID), might be good ideas and a little more efficient.

  5. #5
    Join Date
    Apr 2009
    Posts
    13

    Default

    I need it to ))))
    Any one knows.?

  6. #6
    Join Date
    Jul 2009
    Posts
    8

    Default

    Easy script

    Sorry i haven't check it because at the moment i have unistall boxee for a problem but i think should be works...I hope (or you can easily adjust this raw script) :P


    Code:
    #!/bin/bash
    
    ###var
    TIME='60' #set time (seconds)
    SBOXEE='BOXEE' #set service name in ps
    FILE_LOG='log'
    PATH='/opt/boxee/run-boxee-desktop'
    ###
    
    i=1
    while [ $i = 1 ]; do
    if ps ax | grep -v grep | grep $SBOXEE > /dev/null
    then
    echo "ok"
    else
    echo `date` >> $FILE_LOG &&  $PATH >> $FILE_LOG 2>&1
    fi
    sleep $TIME
    done
    in the file $FILE_LOG you can find the log and the output errors.

    EDIT: Ooops I had forgotten: be sure to chmod +x the file and if you want to start script at the boot, copy the file in /etc/init.d and then use update-rc.d ($man update-rc.d #for more info) or insert the script in /etc/rc.local
    Last edited by bano; July 22nd, 2009 at 01:45 PM.

  7. #7
    Join Date
    Jul 2009
    Posts
    2

    Default

    Problem is, often the video crashes in Boxee (app disappears), but sounds continues, and Boxee is still running. Then you have to kill the process to get it to end entirely. How do you script that? Maybe there's some related event you can detect.

    But most Boxee crashes I have are not total crashes, just some part of Boxee crashes.

  8. #8
    Join Date
    Dec 2008
    Posts
    332

    Default

    Code:
    while [ /bin/true ]
    do
            killall Boxee
            /opt/boxee/Boxee
            sleep 2
    done
    No need for crontab

Similar Threads

  1. Script to purge boxee queue
    By rogersb in forum boxee applications
    Replies: 8
    Last Post: August 8th, 2012, 09:07 PM
  2. why does boxee not start playback from clip start?
    By joela in forum Boxee Box help
    Replies: 2
    Last Post: August 21st, 2011, 01:32 PM
  3. Porting XBMC py script to Boxee
    By rudf0rd in forum boxee applications
    Replies: 1
    Last Post: October 18th, 2010, 01:24 PM
  4. I made a Salling Clicker script for BOXEE
    By MasterZap in forum boxee for mac help
    Replies: 9
    Last Post: April 4th, 2010, 08:13 AM
  5. Script to automatically restart Boxee?
    By jeffehobbs in forum boxee for linux help
    Replies: 2
    Last Post: May 17th, 2009, 05:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •