DSL Music player?


Forum: Other Help Topics
Topic: DSL Music player?
started by: Stine

Posted by Stine on Aug. 25 2006,01:14
I have been workin a little with DSL and wanted to make a small USB music player with it.

so Basicly boot DSL from CD-ROM, after that I would like it to mount and play MP3s thats are located on a USB thumb drive.

Can DSL hot swap and auto mount a USB drive? Maybe there is a script for this already? if not how would I go about doing this?

thanks for the help!

Posted by Walrii on Aug. 25 2006,02:41
(I'm sure it probably can hot-swap / automount but here is another way just in case  :) )

I did something like this, a script that would load on startup and copy over files in a subdirectory on a usb drive onto the hard drive, if it could find them / mount them.  I did it rather inelegantly like this:

edit .xinitrc to include somewhere:
1) "mount /mnt/sda/" (This will mount the usb drive.  fstab should already be setup to know what device to use and what file system, DSL did this all for me)
2) "xmms /mnt/sda/" (To play all the songs in there)

If the mount fails (ie no usb drive) then xmms won't play any songs since the read will fail.  :p

But if you wanna swap out usb drives as its playing then that's another thing entirely... This will only have it automatically mounted once X loads up.

Posted by Stine on Aug. 25 2006,23:06
yeah I would like to have X running all the time so "I dont have to restart every time I want a different USB drive.

maybe I will have to stick with Widnows.... :(

Posted by ^thehatsrule^ on Aug. 25 2006,23:53
You can switch usb drives in the middle of your DSL session, but there is no automounter... (yet?) in dsl - you could mount it manually.
Posted by Stine on Aug. 26 2006,01:49
I want a small slim "jukebox" I dont want a monitor and a keyboard every time I need to change media...

thx tho

Posted by mikshaw on Aug. 26 2006,02:31
Just throwing this out....no idea if it would work.....

while true do
mount /mnt/sda1 2>/dev null && \
xmms /mnt/sda1/ && \
umount /mnt/sda1 && \
sleep 10
done

I assume this would try to mount sda1 and play the music.  When it's done playing it will umount, wait 10 seconds, and then repeat.
If it doesn't succeed it will continue to try until you kill the process.

...or so i assume =o)

Posted by ^thehatsrule^ on Aug. 26 2006,02:34
Just a side note: isn't hot swapping usb drives not recommended?  Like you should unmount/eject them before physically ejecting the drive, or else you could corrupt the fs/files I guess?
Posted by Stine on Aug. 26 2006,03:58
as it would only be mp3s....im not too worried about damaging a file.....

thanks for the help

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.