[544]=>Good morning
 [543]=>You know the fee...
 [542]=>Date more, care ...
 [541]=>Moving On



April 2019
sun mon tue wed thu fri sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        


 [RAndoMness]=> 28Sep09
 [JPsDocs] => 22Feb09
 [JPics] => 10Dec11

recent music
Boycott SONY


  getentry(496); getentry(498);

added Sun December 02 2007 at 3:07 PM
My PC is getting rather sad and old. And noisy. I don't like leaving it running at night because it makes quite a lot of white noise in the background, which kinda bugs me some nights. The server, on the other hand, is rather quiet. Probably because it doesn't have a case fan (perhaps I should get a case fan for it, but considering how cold it is in the basement, I don't think that it's a huge issue right now). At any rate, I leave the server on nonstop and it really doesn't bug me.

The problem is that I like falling asleep to music sometimes. I have several media players to choose from on my PC, but I needed something that could be run from a headless server. All my music files are already on there (it's a file server, remember), so it shouldn't be too difficult. It can't be anything graphical because first of all, the server's not connected to a monitor, and second because I don't want to install any graphical libraries on my file server. I could probably pipe X through and SSH connection, but why should it require a gui at all? I needed a music player that is strictly run by a command line interface.

CMus to the rescue. And if I combine cmus with screen, then I can start up the program via ssh and shut down the PC, leaving the music running on a playlist.

Now, cmus is not for the faint of heart. In fact, I wouldn't even necessarily recommend it unless you're in a similar situation, where you want to stick with a CLI-only OS. There are no tutorials, and the man page is written as a reference for someone already experienced with the program. It took me about 30 minutes of poring over the man page to figure out how to navigate through the program sufficiently enough to actually use it. Basically, it helps if you throw out everything you think about interacting with a media player, and think instead about how you interact with, say, vim. Which makes sense, since it's a CLI and doesn't have all kinds of buttons and menus to interact with.

Just a couple pointers that I've picked up so far:
  • use the number keys 1-6 to switch between views. For me, views 1 and 3 are the most useful, because I have a lot of music on my computer.
  • type :a [pathToMusicDirectory] to search in that directory and add music. That's a colon there, like commands in vim.
  • in view 1, you start out with all your artists on the left side. Press space bar to toggle whether the selected artist shows the albums. Highlight an album and the tracks will show up on the right. Hit tab to toggle between the artist/album side and the track side
  • when you have an artist, album, or track highlighted, press 'y' to add it to the current playlist in view 3.
  • in view 3, you can save the playlist by typing :save [pathToFile] or load a playlist by typing :load [pathToFile].
  • you can search for a song by typing /mysearch . This is especially helpful in view 1 or 2, where I have a few thousand songs.

Obviously, that's just skimming the surface of what this program is capable of, but that's probably enough to make the program work. Anything more than that is icing on the cake. After you learn those basics, CMus can be as simple or complex as you want to make it.

stephen says:
i can vouch for cmus. i used to almost exclusively launch media from the terminal using mplayer (for speed reasons) and now i use cmus for music. i had to make sure that my id3 tags are up to date (some aren't showing up correctly; i hope that cmus supports id3 v2).
posted Mon December 03 2007 at 9:09 PM

Merry says:
Funny, I understood little to none of what this post was about. Maybe I should start posting on my blog about all kinds of linguistic stuff so I can feel smart by excluding lots of my readers from the conversation. (This is just a joke. I really meant that first word, funny.)
posted Tue December 09 2008 at 12:28 AM


Allowable HTML:
<a href="">links</a>
Comment guidelines