LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-29-2004, 07:30 PM   #1
Gregory Deal
LQ Newbie
 
Registered: Sep 2004
Posts: 5

Rep: Reputation: 0
'at' command "Cannot open display"


I'm trying to use 'at' to schedule running xine to play a live stream. I set it up with :

[dell_3] {root} (20040929) 20:01 ~ $ at 8:02pm
at> xine
at> <EOT>
job 31 at 2004-09-29 20:02
[dell_3] {root} (20040929) 20:01 ~ $ atq
31 2004-09-29 20:02 a root

But when xine starts, I get no output, only an error mail message. The mail message is not unexpected, since 'at' send standard output to a mail message, but I thought I could get the play er to run and play the stream.

[dell_3] {root} (20040929) 20:01 ~ $ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/root": 1 message 1 new
>N 1 root@localhost.local Wed Sep 29 20:02 19/792 "Output from your job 31"
& 1
Message 1:
From root@localhost.localdomain Wed Sep 29 20:02:00 2004
Date: Wed, 29 Sep 2004 20:02:00 -0400
From: root <root@localhost.localdomain>
Subject: Output from your job 31
To: root@localhost.localdomain

Executing .bashrc
Cannot open display
This is xine (X11 gui) - a free video player v0.99.2.
(c) 2000-2004 The xine Team.

'at' states that it runs the command under /bin/sh, so I treid this explicitly :

[dell_3] {root} (20040929) 20:09 ~ $ /bin/sh
sh-2.05b# xine
This is xine (X11 gui) - a free video player v0.99.2.
(c) 2000-2004 The xine Team.
sh-2.05b# exit
exit

This worked OK and the xine gui came up.

The DISPLAY variable seems kind of light :

[dell_3] {root} (20040929) 20:09 ~ $ echo $DISPLAY
:0.0

but when I set it to my computer name, it still dies.
[dell_3] {root} (20040929) 20:25 ~ $ export DISPLAY=dell_3:0.0
[dell_3] {root} (20040929) 20:26 ~ $ echo $DISPLAY
dell_3:0.0

I even tried settin appropriate switches on xine to not show any gui or window, but to no avail.
So, is there any way I can use 'at' to schedule the running of xine to play a live stream?

I'd rather be using 'crontab', but after setting up a /etc/cron file, I can't get anything to even start up. Thanks.
 
Old 09-29-2004, 08:04 PM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
I think the problem is that the DISPLAY variable is not set in the environment that xine is running in (I might be wrong, I haven't used at to schedule a process). Try creating a shell script like this:

#!/bin/bash
DISPLAY=:0.0
xine (args)

make it executable, and then schedule that with at and see if it works.
 
Old 09-30-2004, 08:06 PM   #3
Gregory Deal
LQ Newbie
 
Registered: Sep 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks. I tried it with a small testcase, and this works. I tried it using gnome-crontab, and the xine window comes up, and starts playing the URL. Thanks again.
 
  


Reply



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
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
xset: unable to open display "mycomputer.mynetwork:0.0" nicolaeancuta Linux - Networking 2 07-13-2005 01:39 AM
FC3: no video: "can't open X11 display" Kropotkin Fedora 3 11-10-2004 11:25 AM
unable to open display "24.228.61.72:0.0" while installing oracle remotely cheeku Linux - Newbie 3 08-13-2004 04:08 PM
"at" command: cannot open display mcwasi Linux - General 2 10-14-2002 10:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:55 AM.

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