From owner-freebsd-multimedia Fri Nov 22 10:54:10 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 463A237B401 for ; Fri, 22 Nov 2002 10:54:08 -0800 (PST) Received: from weber.siteprotect.com (weber.siteprotect.com [64.26.0.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9657243EAA for ; Fri, 22 Nov 2002 10:54:07 -0800 (PST) (envelope-from barlow@starkube.net) Received: from starkube.net (bdsl.204.193.117.66.gte.net [204.193.117.66] (may be forged)) by weber.siteprotect.com (8.9.3/8.9.3) with ESMTP id MAA32277; Fri, 22 Nov 2002 12:53:53 -0600 Message-ID: <3DDEC3B4.50003@starkube.net> Date: Fri, 22 Nov 2002 18:54:28 -0500 From: John Barlow User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.1) Gecko/20021005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: faber@ISI.EDU, randall@ucsb.edu, chip@chocobo.cx, anarcat@anarcat.ath.cx, john@utzweb.net Cc: freebsd-multimedia Subject: Re: running xmms from cron in FreeBSD Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 Thanks to all who replied and helped me sort this one out. For the edification of poor souls who may want to run xmms (or any X app) from cron in the future, I'll summarize your suggestions . . . 1. Tell cron how to find X in the first place by running echo $DISPLAY in an xterm. Mine reported :0.0, which is pretty typical. I inserted the following line at the beginning of my crontab: DISPLAY=:0.0 2. Include the full path to xmms. In my old non-working crontab I had the following lines: # wake up with KEXP 0622AM Monday - Friday 22 6 * * 1-5 oenomaus xmms /usr/home/oenomaus/streams/kexp.pls I added the path like so . . . 22 6 * * 1-5 oenomaus /usr/X11R6/bin/xmms /usr/home/oenomaus/streams/kexp.pl 3. It still wasn't working. I then tried leaving out the user ("oenomaus" in this case), and that nailed it - I guess user only needs to be included when a job needs to be run as someone else. Here's how the above line looked in the end: 22 6 * * 1-5 /usr/X11R6/bin/xmms /usr/home/oenomaus/streams/kexp.pl And voila - I'm on my way to having the streaming jukebox of my dreams. I can run realplay as well, as long as I have cron do a killall before switching players so /dev/dsp is available. The only other problem I've had is that occasionally I get loud white noise instead of my stream. I think it's a sound card issue, but until I figure it out I can get around it by opening the stream twice in a row: 22 6 * * 1-5 /usr/X11R6/bin/xmms /usr/home/oenomaus/streams/kexp.pl && /usr/X11R6/bin/xmms /usr/home/oenomaus/streams/kexp.pl a butt-ugly hack, but hey, it works. Thanks again Ted, Randall, Chip, Anarcat, and John. Here's a last embarrassing detail: I should have been able to figure this out myself. About halfway through messing with this last night, I figured out that cron sends me reports about everything I ask it to do in my crontab. Next time I have a problem with cron, I'll start with my system mail. Best, John Barlow To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message