From owner-freebsd-multimedia Thu Nov 21 14: 4:26 2002 Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B50C337B401 for ; Thu, 21 Nov 2002 14:04:24 -0800 (PST) Received: from mail2.qc.uunet.ca (mail2.qc.uunet.ca [198.168.54.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2A6143E9E for ; Thu, 21 Nov 2002 14:04:23 -0800 (PST) (envelope-from anarcat@espresso-com.com) Received: from xtanbul.studio.espresso-com.com ([216.94.147.57]) by mail2.qc.uunet.ca (8.9.3/8.9.3) with ESMTP id RAA06056; Thu, 21 Nov 2002 17:04:02 -0500 Received: from anarcat by xtanbul.studio.espresso-com.com with local (Exim 3.36 #1 (Debian)) id 18EzQH-0005PL-00; Thu, 21 Nov 2002 17:03:45 -0500 Date: Thu, 21 Nov 2002 17:03:45 -0500 From: The Anarcat To: Chip Marshall Cc: John Barlow , freebsd-multimedia@freebsd.org Subject: Re: running xmms from cron Message-ID: <20021121220344.GD20208@xtanbul.studio.espresso-com.com> Mail-Followup-To: Chip Marshall , John Barlow , freebsd-multimedia@FreeBSD.ORG References: <3DDD8821.6090807@starkube.net> <20021121215123.GA53141@chocobo.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021121215123.GA53141@chocobo.cx> User-Agent: Mutt/1.4i Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu Nov 21, 2002 at 04:51:23PM -0500, Chip Marshall wrote: > On November 21, 2002, John Barlow sent me the following: > > I would like to make cron open xmms and stream my favorite radio shows. > > Using crontab -e I created a schedule that follows this format: > > > > # wake up with KEXP 0622AM Monday - Friday > > 22 6 * * 1-5 oenomaus xmms > > /usr/home/oenomaus/streams/kexp.pls > > > > # listen to the news @ 0730 > > 30 7 * * 1-5 oenomaus xmms > > /usr/home/oenomaus/streams/kuow.pls > > Unless this is the system crontab (/etc/crontab) you don't need to > specify a username. I don't know off the top of my head if it will > break because of that though. > > I think the problem here is that cron does not run these commands with > the same environment that your shell does. In particular, without a > DISPLAY variable, I don't think xmms will know how to connect to X. > > In an xterm, try running "echo $DISPLAY" and adding whatever's it's > value is to your crontab on a line of it's own, something along the > lines of: > DISPLAY=:0.0 > > It's a little hacky, but it should work, I think. The problem is the X server access restrictions, in that case. You'll have to have an X session opened for that to work or in a worst case, start some kind of "virtual server" that doesn't have a graphic front end, before starting xmms. In general, I would recommend using gstreamer or another console-based streamer instead of XMMS, even if xmms is good software. A. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message