Cooking with Linux: Strike up the Band and Celebrate!
It is good to see you again François, mon ami. I trust that you took good care of the restaurant while I was away on my whirlwind tour of Europe, non? Well, thank you for asking, mon ami. It was indeed, a fine journey. Oui, the food was great as well, but no restaurant is blessed with such a waiter as yourself.
I have seen cities of lights and cities of music—London, Salzburg, Rome, Florence and many others. Then, of course, there was the ultimate city of lights, Paris. It seems somehow fitting that it is in this atmosphere of celebration that I had to prepare the menu for Linux Journal's special 100th anniversary issue. Mais oui, François, what better way to celebrate than with music and light? Quickly before our guests arrive, head down to the cellar and bring up the 1989 Pessac-Léognan.
But our guests are already here. François. Vite! Please, mes amis, sit and make yourselves comfortable. Today's menu of fine Linux cuisine is a bit of an occasion. Linux Journal is 100 issues old—a fine vintage indeed. Have a look at the first item on the menu, a little something called XMMS. Basically a standard Linux media player, XMMS is much more than a music player. Properly used, it is a spectacular light show as well. It supports Ogg Vorbis, MP3 and WAV formats. With the right extensions you also can use it to play RealAudio.
Every major Linux distribution comes with XMMS, so you don't have to go far to find it. If it isn't already part of the installation, then have a look on your distribution CD-ROM. If all else fails, go to the source at www.xmms.org for the latest and greatest.
Building XMMS is easy and follows familiar steps. The current version is based on GTK 1.2.2 or better, and you may need the OpenGL or Mesa libraries if you want to use the OpenGL plugin (more on that later). Starting with the source, here is what we do:
tar -xzvf xmms-1.2.7.tar.gz cd xmms-1.2.7 ./configure make su -c "make install"
To start the program, type xmms & and press the Enter key. If this is the first time you start XMMS, you'll see something that looks like the amplifier on your home stereo system (Figure 1).
That is only the first module. Look at the buttons on the right of the amplifier. You'll see one labeled EQ (the equalizer) and PL (the playlist). Clicking these buttons will bring up two additional modules for your stereo system. Because each of the three modules can be moved about individually on the screen, you may find yourself re-adjusting their position more often than you care to. The easy way to solve this is by right clicking on the amp module, choosing Options from the menu and then choosing Easy Move. There's a Ctrl-E keyboard shortcut as well.
XMMS has extensive plugin support for input, output and visualization. To get at these, use the Preferences menu (the shortcut is Ctrl-P). A new window will pop up offering you tabs for various runtime options, fonts and so on. This is also where you find the control for the various audio I/O, special effects and visualization plugins. If you find you are having any problems with sound when you first start up XMMS, this is the place to look. Look under the audio section and check the output plugin. Having built my XMMS from scratch, I had to set the output plugin to OSS Driver.
I could spend a great deal of time talking about the various options, but instead, I invite you to check out the various options on your own. In terms of visualization plugins, this is where the light show begins. You'll notice that there are things like Spectrum Analyzer and Blur Scope. Earlier on, I mentioned the OpenGL Spectrum Analyzer, another cool plugin that provides colorful 3-D visuals to accompany your music—you can even launch that one full screen; sit back and enjoy the show.
One of my favorite features of XMMS (and there are quite a few) is its skinability. Using skins, I can change XMMS' look from its default black metal face to something more classic, like cherry wood or a refined brushed aluminum. Using the Ctrl-S shortcut brings up the Skin Browser, which you can also select through the right-click menu. Of course, if you just finished installing XMMS, you probably won't see anything there. You need to get yourself some skins. For that, head back to the XMMS web site and click Skins on the menu. I guarantee you won't be getting bored anytime soon. There are literally tons of skins available, including the aforementioned cherry-wood finish.
So, how do you install these skins? All of the skins on the web site are in tar.gz format. Find one that appeals to you, download it and save it to your $HOME/.xmms/Skins directory. You don't need to extract the file—just save it to the directory. If I turn out to be wrong, and you do get bored with the list on www.xmms.org, you'll be happy to know that XMMS supports Winamp skins as well. A visit to www.winamp.com should keep you more than busy. Just click Skins off the menu and have fun. In Figure 2, you'll see my classic cherry-wood XMMS system with various light-show plugins running.
I'm going to leave XMMS behind on this topic of skins because the next application does skins in a great way as well. If you are running KDE, you have a great little program called Media Player. You can access the program either by looking under the K menu, choosing Multimedia, then clicking on the KDE Media Player, or you can type noatun & at the command line. The problem is that when you fire it up for the first time, it tends to look a little boring, as in Figure 3.
Don't let that disappoint you. That is the default skin, named “Excellent”. Click on Settings followed by Configure Noatun. From the pop-up menu that appears, choose Plugins, which will then give you a tabbed menu. Under Interfaces, you'll see four options for player styles. The skinnable styles are K-Jofol and Kaiman. In both cases, you can find additional skins on the KDE-Look web site at www.kde-look.org. Actually, mes amis, this is a great site to visit for numerous ways to dress up your KDE environment, from Noatun skins to desktop themes to replacement icon sets.
Start by clicking off the “Excellent” interface and clicking on the K-Jofol interface. You'll see the menubar at the left change. It now shows a K-Jofol Skins option. The same would happen with the Kaiman interface. If you click on this menu option, you'll see a drop-down list on the right with a preview of the various installed skins. For Noatun, skins live under the $HOME/.kde/share/apps/noatun/skins directory.
To add new skins, switch to that directory, extract the skins you downloaded from www.kde-look.org, and you have just added a new skin. There is a catch, however. Unlike XMMS, the skins must be in PNG format and must be extracted into the skins directory. You can use skins you find on other sites, but you need to convert the JPG images to PNG. Luckily, this is extremely easy with the convert command (part of the ImageMagick package):
convert image.bmp image.jpg
That information is for KDE 2.x only. With KDE 3.x, you'll find that things are a little different. In the $HOME/.kde/share/apps/noatun/skins directory, you will find two other directories called winamp and kaiman. If they don't already exist, create them. Then, in the winamp directory, extract any of the XMMS skins that you find appealing. For instance, let's go back to my cherry-wood example:
cd $HOME/.kde/share/apps/noatun/skins/winamp tar -xzvf /path_to/cherrywood.tar.gzNow, when you click Configure Noatun, you should see this new skin under the Winskin list on the preferences menu.
When I told you about XMMS, I mentioned the variety of cool plugins you could use for visualization. KDE's Media Player, Noatun, has these as well. Among my favorites are Tyler and Blur Scope. Try some of these out for yourself, but be warned. The one called Madness is truly madness. Don't try it unless you are looking for a glimpse of temporary insanity. You have been warned! For a sample of various plugins in action, have a look at Figure 4.
Turn up that volume control, mes amis, or should I say “Crank it!”? François (who has managed to arrange a cameo in this very issue, see page 25) will refill your glasses. Tonight, the cellar is open and you may have anything you desire! Let the music play and the lights dance. It is time to celebrate!
Until next month. A votre santé! Bon appétit!
Marcel Gagné lives in Mississauga, Ontario. He is the author of Linux System Administration: A User's Guide (ISBN 0-201-71934-7), published by Addison-Wesley (and is currently at work on his next book). He can be reached via e-mail at email@example.com. You can discover lots of other things (including great Wine links) from his web site at www.marcelgagne.com.
- Non-Linux FOSS: Code Your Way To Victory!
- Vagrant Simplified
- Disney's Linux Light Bulbs (Not a "Luxo Jr." Reboot)
- Libreboot on an X60, Part I: the Setup
- Dealing with Boundary Issues
- System Status as SMS Text Messages
- Bluetooth Hacks
- New Products
- October 2015 Issue of Linux Journal: Raspberry Pi
- Linux and the Internet of Things