Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 2002 16:51:23 -0500
From:      Chip Marshall <chip@chocobo.cx>
To:        John Barlow <barlow@starkube.net>
Cc:        freebsd-multimedia@FreeBSD.ORG
Subject:   Re: running xmms from cron
Message-ID:  <20021121215123.GA53141@chocobo.cx>
In-Reply-To: <3DDD8821.6090807@starkube.net>
References:  <3DDD8821.6090807@starkube.net>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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.

-- 
Chip Marshall <chip@chocobo.cx>           http://www.chocobo.cx/chip/
GCM/CS d+(-) s+:++ a21>? C++ UB++++$ P+++$ L- E--- W++ N@ o K- w O M+
V-- PS+ PE Y+ PGP++ t+@ R@ tv@ b++@ DI++++ D+(-) G++ e>++ h>++ r++ y?

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE93VVa8vyTVl6qbdQRApbVAJ9TxdGcMwCphXDUmswKwSUmoPe95ACfXSss
v0nH3bgCfGaGq831AKlHHDA=
=YhxC
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021121215123.GA53141>