Date: Thu, 21 Nov 2002 17:03:45 -0500 From: The Anarcat <anarcat@anarcat.ath.cx> To: Chip Marshall <chip@chocobo.cx> Cc: John Barlow <barlow@starkube.net>, freebsd-multimedia@freebsd.org Subject: Re: running xmms from cron Message-ID: <20021121220344.GD20208@xtanbul.studio.espresso-com.com> In-Reply-To: <20021121215123.GA53141@chocobo.cx> References: <3DDD8821.6090807@starkube.net> <20021121215123.GA53141@chocobo.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021121220344.GD20208>