LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   cron: xine Cannot open display (http://www.linuxquestions.org/questions/linux-software-2/cron-xine-cannot-open-display-365090/)

schneidz 09-19-2005 11:39 PM

cron: xine Cannot open display
 
hi lq, is there anyway to execute xine from cron?:

thanks,

Code:

[schneidz@lq stuff]$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/kde-schneidz/kcronejosFb.tmp installed on Mon Aug 22 00:57:26 2005)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
0 6 * * *      xine -f /mnt/cdrom/*
# This file was written by KCron. Copyright (c) 1999, Gary Meyer
# Although KCron supports most crontab formats, use care when editing.
# Note: Lines beginning with "#\" indicates a disabled task.
[schneidz@lq stuff]$ mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/schneidz": 2 messages 2 new
>N  1 root@lq.  Sun Sep 11 06:00  24/1184  "Cron <schneidz@lq"
 N  2 root@lq.  Fri Sep 16 06:00  24/1184  "Cron <schneidz@lq"
&
Message 1:
From schneidz@lq  Sun Sep 11 06:00:03 2005
Date: Sun, 11 Sep 2005 06:00:03 -0400
From: root@lq (Cron Daemon)
To: schneidz@lq
Subject: Cron <schneidz@lq> xine -f /mnt/cdrom/*
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/schneidz>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=schneidz>
 
Cannot open display
This is xine (X11 gui) - a free video player v0.9.22.
(c) 2000-2003 The xine Team.
Built with xine library 1.0.0 (1-rc0a)
Found xine library version: 1.0.0 (1-rc5).


Tinkster 09-20-2005 12:03 AM

X Y * * * DISPLAY=localhost:0.0 xine "whatever blows your skirt.file"


And as the owner of the X-Session
xhost +localhost


schneidz 09-20-2005 09:59 AM

thanks tin, should be something fun to hack around with this week. i was trying to create a visual alarm clock (they showed a $400 box from japan that did the same on 'g4-attack of the show').

i wonder if that'll make my monitor wake-up?

Tinkster 09-20-2005 03:43 PM

Doubt it ... it's just screen-action, not human-action.


Cheers,
Tink

schneidz 09-23-2005 11:53 AM

it works and it wakes up my moniter.

Tinkster 09-23-2005 02:37 PM

Heh - good for you ;}


Cheers,
Tink


All times are GMT -5. The time now is 07:00 PM.