OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Xmms Random Play, Won't save config
dino
post Dec 8 2004, 03:00 PM
Post #1





Group: Members
Posts: 65
Joined: 5-January 04
Member No.: 1,362



Xmms will play in the random song selection mode if you click on the icon that looks like the equalizer bar.
I have a cron job that launches xmms in the mornings, but don't know how to get xmms to come up in the random mode. It does not seem to be saving the settings. Can this be switched on via the command line?

For those of you trying to get cron to launch xmms heres a tip.
Open up a shell and type export to get a list of all your environment variables:
QUOTE
root@collie:~/.xmms# export
export HOME='/root'
export LOGNAME='root'
export PATH='/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin::/opt/QtPalmtop/bin'
export PS1='\u@\h:\w\$ '
export PWD='/root'

Copy the variables to your crontab and remove the word "export":
QUOTE
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.24098 installed on Wed Dec  8 15:53:28 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
#Environmental Variables
HOME='/root'
LOGNAME='root'
PATH='/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin::/opt/QtPalmtop/bin'
PS1='\u@\h:\w\$ '
PWD='/root'
QTDIR='/opt/QtPalmtop'
SHELL='/bin/sh'
TERM='linux'
TERMINFO='/mnt/card/etc/terminfo'
TSLIB_TSDEVICE='/dev/ts'
TSLIB_TSEVENTTYPE='COLLIE'
USER='root'
#Cron jobs
20 06 * * 1-5 xmms -p
Go to the top of the page
 
+Quote Post
ironstorm
post Dec 8 2004, 09:56 PM
Post #2





Group: Members
Posts: 86
Joined: 10-August 03
Member No.: 331



um... I have a way to accomplish the same thing....

create a script called shuffle.awk and set it chmod +x:
CODE
#!/usr/bin/awk
# AWK Shuffle from Carlos J. G. Duarte on Deja News
BEGIN { srand() }
{ while (x[sprintf("%6f%s", rand(), $0)]++){} }
END { for (i in x) print substr(i, 9) }


Then you can call it using:
CODE
cat ~/.xmms/xmms.m3u | grep -v EXTINF | grep -v EXTM3U | awk -f shuffle.awk > ~/.xmms/xmms.m3u


do that before you start xmms (either by putting it in the same line of the cron job, running it a minute before xmms or wrapping into into another script)...

Cheers....
-G
Go to the top of the page
 
+Quote Post
dino
post Dec 9 2004, 07:13 AM
Post #3





Group: Members
Posts: 65
Joined: 5-January 04
Member No.: 1,362



ironstorm,
Works great!
I put the
QUOTE
#!/bin/sh
cat ~/.xmms/xmms.m3u | grep -v EXTINF | grep -v EXTM3U | awk -f /usr/bin/shuffle.awk > ~/.xmms/xmms.m3u

in a script called "xmmsshuffle.sh"
my cron job is
QUOTE
20 06 * * 1-5 xmmsshuffle.sh && xmms -p
for a wakeup at 06:20 on weekdays. Notice I had to use the complete path to shuffle.awk to use it from cron.

People ask "Why do you run Linux?" For one reason, it seems there is always a way to make it do what you want.
Thanks,
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th September 2014 - 09:37 AM