Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A script to automatically play MP3s on wake up UNIX
Are you obsessed with music? Do you listen to MP3s? Do you want to have non-stop music? If you answered "yes" to these questions, then this hint might be for you.

The other day I was not quite happy about the idea that when I "woke up" my computer, iTunes was not playing. I was sure that when I hit the Sleep button, it was playing, but not so in the morning when I woke up my laptop. So, I went back to mpg123 that I have had installed for long time (see this hint and tried the following (it's unix 101, I know, but you might find it ... useful?):
mpg123 -q -Z -@ myPlaylist.m3u >& /dev/null &
This tells mpg123 to play myPlaylist.m3u (see this hint on creating playlists); plays the MP3s in random order (-Z); directs the (text) output to /dev/null; and runs the process in the background (&).

Now, if I wake up my laptop, it automatically continues to play from the place it stopped last night. It even survives a log out and continues to play (I have not tested if this works if you are not an administrator).

You can now turn your flatmates / family crazy :). If you use a single MP3 with those settings, it will play it over and over again ... until someone breaks your computer! If you want to make it stop, type killall mpg123 ... restarting the machine kills it, too.
    •    
  • Currently 3.75 / 5
  You rated: 4 / 5 (4 votes cast)
 
[6,313 views]  

A script to automatically play MP3s on wake up | 0 comments | Create New Account
Click here to return to the 'A script to automatically play MP3s on wake up' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.