Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-22-2008, 11:08 AM   #1
LQ Newbie
Registered: Dec 2008
Posts: 6
Blog Entries: 1

Rep: Reputation: 0
Cron job error

Hi friends...I tried to play a media file by scheduling a cron says the following error...can any one decode and tell the problem........

From gokul@localhost.localdomain Mon Dec 22 12:14:02 2008
Return-Path: <gokul@localhost.localdomain>
Received: from localhost.localdomain (localhost.localdomain [])
by localhost.localdomain (8.14.1/8.14.1) with ESMTP id mBM6i2IG025668
for <gokul@localhost.localdomain>; Mon, 22 Dec 2008 12:14:02 +0530
Received: (from gokul@localhost)
by localhost.localdomain (8.14.1/8.14.1/Submit) id mBM6i1YR025667;
Mon, 22 Dec 2008 12:14:01 +0530
Message-Id: <200812220644.mBM6i1YR025667@localhost.localdomain>
From: root@localhost.localdomain (Cron Daemon)
To: gokul@localhost.localdomain
Subject: Cron <gokul@localhost> realplay /media/BACKUP/Yuvraj/02 Track 2.mp3
Date: Mon, 22 Dec 2008 12:14:01 0530 (IST)
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/gokul>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=gokul>
X-Cron-Env: <USER=gokul>

** ERROR **: Unable to open display
/usr/bin/realplay: line 57: 25666 Aborted $HELIX_LIBS/realplay.bin "$@"
Old 12-22-2008, 11:24 AM   #2
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Crontab has a very limited environment and overall it does not allocate a display. You have to explicitly allocate it by assigning the DISPLAY environment variable, but this assumes you previously know which display number is active on your monitor (usually :0.0). For example a working cron job can be:
30 20 * * * /usr/bin/env DISPLAY=:0.0 /usr/bin/xclock
For more complex tasks you have to play with the xauth command.
Old 12-22-2008, 11:50 AM   #3
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
You could use mpg123 or mplayer, it doesn't need X
mpg123 /media/BACKUP/Yuvraj/02 Track 2.mp3


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
cron job Extension /path/to/script not found error mts7 Linux - Server 7 03-20-2008 10:56 PM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
cron job no function no error wanghao Linux - Software 6 11-27-2007 06:01 PM
cron error: no job control schentor Linux - Software 2 07-18-2005 12:39 PM
cron job <defunct> error? existo Slackware 7 01-21-2004 03:39 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:56 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration