Playing Audio CDs

Last updated: November 26, 1998

It's quite easy to set up Linux to play audio CDs for you: all you need is a CD-ROM drive, speakers/headphones, an audio CD, and a little luck.

First, you need to have your CD-ROM drive get recognized by Linux when you run cdplay or cdp. This is all in the manual pages, but anyway, here it is. Type:

cd /dev
ln -sf mcd0 cdrom

Above, type everything exactly except for "mcd0". That represents where your CD-ROM drive is. In my case, I would type this:

cd /dev
ln -s hdc cdrom

This creates a link from "hdc" in /dev to "cdrom" in /dev. It's pretty simple, actually. All you need to do now is run cdplay or cdp. CD Play only starts the audio CD, but you can use the following commands to control what it does concerning the audio CD in your CD-ROM drive. Here are some extensions of CD Play you can use to control how the audio plays.

These are the only features I find useful to myself in CD Play. A similar extension of the program, cdp, gives a "GUI" (sort of). You can change tracks, stop the CD, or eject it while running cdp. To use the following commands, make sure you enable Number Lock (that's what the manual page says; I don't have any problem with it, number lock on OR off).

This is directly from the cdp manual. You can access the rest of the manual page by typing man cdp at the console (the main Linux prompt).

       the '9' key on the keypad is "play"
       the '8' key on the keypad is "pause/resume"
       the '7' key on the keypad is "stop"
       the '6' key on the keypad is "next"
       the '5' key on the keypad is "replay"
       the  4  key on the keypad is "previous"
       the '3' key on the keypad is "go forward 15 seconds"
       the '2' key on the keypad is "hard abort" (music stops)
       the '1' key on the keypad is "go backward 15 seconds"
       the '0' key on the keypad is "soft exit" (music continues)
       the '.' key on the keypad is "help"
       the 'enter' key is edit current song.
       the 'a' key is edit artist name
       the 'c' key is edit CD name

You might get an error message when you're trying to play your CD as a non-root user about /dev/cdrom having to be changed to mode 666. At first I thought this was some sort of satanic error message, but it appears that there really is a mode for 666. It's basically so that you can play audio CDs as a non-root user, so you might want to go ahead and do that. However, note that users logged in can eject your CD-ROM drive when you change the mode to 666.

In the X windowing system, you can also use a graphical player like xplaycd.


Copyright © 1997-1999 Joshua Go (joshuago at users dot sourceforge dot net). All rights reserved. Permission to use, distribute, and copy this document is hereby granted. You may modify this document as long as credit to me is given.