autoplay files on USB?
Topic: autoplay files on USB?
started by: Stine
Posted by Stine on April 22 2008,04:14any way to make DSL autyoplay mp3s from a usb when I insert it?
automount and then play?
im a wicked noob! sorry....
Posted by lucky13 on April 22 2008,12:27You *could* try to script that but I can think of too many things that can go wrong if you were to do that. Autoplay is a (really bad) Windows default setting I've always changed so I have more control over my system. A better idea might be to set up a script or alias that mounts the device and also launches whatever media player to play files from whichever directory. You could add something like this to your .bashrc:
alias mountandplay='mount /mnt/sda1 && xmms -play /mnt/sda1/mp3/playlist.m3u'
If you have no other mount* executables in your $PATH, you'd only need to type mounta and then tab to complete it and then enter. I would also set up an alias to stop and umount the device (alias unmountandplay='killall xmms && umount /mnt/sda1'). Good idea to check mtab and make sure your device is unmounted before removing.