How-To: Create an open-source jukebox
What: An open-source jukebox.
How: Read on!
Recently I was tasked with creating a jukebox for a party. You can read all about my thoughts on the matter at the link; this article is to provide with the specifics on what software I used, and why.
-
The Hardware
The hardware I chose to use was rather limited in performance, which I think illustrates the efficiency of the software and solution which I designed. Components were as follows:
- CPU: Pentium II 300Mhz
- RAM: 384Mb SDRAM
- Motherboard: Intel i440BX-based
- Video: S3 Virge DX/3D
- Storage: 4Gb, 5400RPM ATA HDD
- Sound: Creative Sound Blaster Live! 5.1
Obviously, I chose the software based on the known limitations of this hardware. Luckily I had a spare SoundBlaster Live! card, because I don’t think the system would’ve been able to reliably handle the music playback and the overheads of the user interface without it. Of course, whatever hardware you plan on using will probably be much faster. I really did pull this box right out of the stone age.
-
The Operating System
The operating system I chose in order to optimise performance was of course my favourite Linux operating system: Arch Linux. With the kernel, modules and all packages being i686-optimized, it was a good starting point for a “from scratch” jukebox system. More importantly though is that after installation of the base system, I had a basic, but fully working, command line Linux system at my disposal. This meant there were no unnecessary startup services, configurations and other settings which would have been useless, redundant or otherwise a hinderence to performance on this slow system.
-
The Desktop Environment
I chose to install XFCE as the desktop environment because it is the most lightweight of the ‘fully-featured’ environments. I would have liked to use an even lighter option, but of all the specialty and niche options available, I had never used any before, and this build was to be completed in a few hours. So, I chose XFCE which I found behaved no differently to GNOME, but was still relatively responsive despite limited system resources.
To make the GUI look decent, I had to install a few additional packages that are not explicit dependencies of XFCE. They are listed below.
- ttf-ms-fonts - the easiest way to make websites look nice is by installing this font package
- midori - a lightweight, Webkit based browser for GTK+ environments. I chose this over Firefox due to the AJAX-heavy nature of the relaxx player. Webkit is supposedly superior in performance compared to alternatives
-
The Webserver
Now, you may be wondering why, with such a limited system, I was bothering with so many layers of abstraction between music, player and control. The reason is that none of the music playing applications I investigated (and there were quite a few) offered any functionality near that of a simple party jukebox. So, I had to use a web-based front end for mpd called relaxx, both of which I’ll talk about soon.
The webserver of choice is lighttpd; a light weight simple web server, with all the features (and a lot more) required for what I had in mind.
-
The Music Daemon
Simply put: mpd. Or, Music Player Daemon, as it is less commonly known. I chose this system for multiple reasons: first and foremost, its awesome efficiency. With my 80Gb music collection catalogued and at my immediate disposal, mpd uses approximately three megabytes of system memory. Yes, you read that correctly: three. megabytes. If I go ahead and do something silly like, say, add my entire music collection into a single playlist, that number jumps to a staggering (!!!) eight megabytes. Yeah, I know. It’s ridiculous.
Secondly, due to the daemon nature of mpd, you can use any frontend you like. You can use a text-based terminal application, you can use a GTK+, Qt or other, or you can use a web-based application, like relaxx player.
-
The Music Frontend
This is the party piece — the piece of the system that everyone gets to see. I chose relaxx player because it had some of the functionality that provides jukebox-like behaviour. Well, kind of. It essentially only had one major feature that made it stand out from a variety of other mpd front-ends: multi-user capability. Essentially, you could lock down certain features of the interface for anonymous users, and require a login for those functions. So, essentially that meant I could specify that anonymous users were only allowed to add songs to the playlist and press play. Meaning you had to log in to delete tracks, stop, pause or rewind, etc.
The installation of relaxx was straightforward, but I had to install a few extra packages under Arch to make it work properly:
- Arch wiki: Getting relaxx to work with Arch
This was the only part of the system which didn’t quite work out so well. Its functionality was great, but due to the fact that it’s programmed entirely in AJAX, the old Pentium II powering the computer couldn’t quite keep up. It was slow to respond and not very nice to use, but it was usable. The music itself never skipped a beat (literally), but the performance of this frontend left something to be desired.
Are Valve embracing an open Source?
A few rumours have popped up over the interwebs over the last few days indicating that Valve, the forward-thinking software development company headed by Gabe Newell, are going to be doing something quite extroadinary.
A few years ago they released the Steam platform: it’s essentially a content distribution system tailored for selling games direct from the creators to the public. Initially there were problems with bandwidth availability and some other issues, but Valve worked dilligently to solve them. Today, Steam is not just a game-selling platform, it also delivers news, comics, movies and other types of entertaiment media directly to consumers from the publishers. It cuts out a few middle-men and makes software cheaper to buy, which is only a good thing.
Again, Valve may be showing themselves to be forward-thinking. Apparently they’ve been hiring Linux software developers to port Windows games to Linux.
Also, a few other big-name games that are coming to Steam soon have been noted as making available a Linux-compatible version. Namely, the Penny Arcade comic game, On The Rain-Slick Precipice of Darkness. Penny Arcade has been closely affiliated with Valve since a few years ago when the comic was featured on the main page of Sources’ Steam application; obviously, the new Penny Arcade game is going to be distributed by Steam.
More notoriously, the upcoming Postal III is also being released on Steam, and will also have a Linux client, according to an interview conducted with Vince Desi, CEO of Running With Scissors, the development company behind the Postal series of games.
The piece de resistance however is this gem which states quite clearly
Port Windows-based games to the Linux platform.
What can we make of that?
We can only hope these rumours, which are apparently bolstered by facts, come to light as truths. I personally only play games available on the Steam platform, and if I could chuck away my Windows installation altogether, it’d be most welcome!
Head over to this thread on the Phoronix forums for the discussion that started it all.
No commentsHow-to: Force nVidia Powermizer performance in Linux
You may wish to force the nVidia Powermizer performance level of your Linux laptop for whatever reason. I do it personally because the nVidia 8400GS in my system can run Compiz-Fusion “OK” at the lowest performance level; thus I get a great animated desktop and retain my battery life!
This is rather simple to achieve, as fortunately the Linux nVidia driver retains a mechanism to read Windows registry values. How do you pass Windows registry values to the nVidia Linux driver? I’m glad you asked! Just like this:
-
-
Section "Device"
-
Identifier "Videocard0"
-
Driver "nvidia"
-
VendorName "NVIDIA Corporation"
-
BoardName "GeForce 8400M GS"
-
# force Powermizer to a certain level at all times
-
# PLEASE NOTE:
-
# ENSURE you change the ‘x’ if you copied and pasted to an actual letter ‘x’
-
# Wordpress is doing some funky formatting to change it to a multiplication symbol
-
# level 0×1 = highest
-
# level 0×2 = med
-
# level 0×3 = lowest
-
Option "RegistryDwords" "PowerMizerLevel=0×3"
-
EndSection
-
That’s the relevant excerpt from my xorg.conf; it’s simply a matter of defining the “RegistryDword” option under the Device section, and passing in the appropriate arguments. In this case, we want to tell PowerMizerLevel to be a certain value.
You can copy and paste the above code, but you must be mindful of one thing: change the ‘x’ character above to an actual “x” - Wordpress is doing some funky auto-formatting to change the character from a regular letter ‘x’ to a multiplication symbol as it lies between two numerals. After you’ve changed it, restart X, start up Compiz-Fusion or another 3D app, and keep a watch on the performance level in the nVidia utility. It doesn’t change!
20 commentsThe story: Dell XPS M1330
So, as you may’ve recently read, I decided to order myself a Dell XPS M1330 laptop. For a few reasons, I’m keeping track of the whole process. It’s the first laptop I’ve ever purchased; it’s the first computer system I’ve purchased from a big brand-name; and it’s the first time I’ve bought something that cost more than a few dollars over the internet.
Accordingly, I’ve been keeping a close eye on the entire process.
-
April 13th (Sunday), midday
I placed my order using Dells configurator website around lunchtime. It went without a hitch, and shortly thereafter I received a few e-mails. One detailed the system I had purchased and provided an invoice, and another explained the Dell order processing and delivery system, and promised that Dell would keep me up to date on what was happening.
-
April 13th (Sunday), mid-evening
Around seven or eight o’clock that evening I received a call from Dell to inform me they were having trouble processing my credit card details. Turns out I’d entered them incorrectly; so I gave them the correct information and all was well.
-
April 16th (Wednesday), mid-afternoon
I received an e-mail informing me that my payment had been accepted, the system build had been completed, and my laptop was on its way. The e-mail provided me a link to Dell’s order tracking website which illustratively showed what was going on.
-
April 17th (Thursday), late evening
Checking the dell ordering website as above, it’s been noted that my laptop has arrived in Australia and is now with the local courier. The estimated arrival date is still April 23rd; presumably it’ll be heading up from Sydney via a not-so-fast courier.
-
April 18th (Friday), mid-afternoon
I was at work and received an SMS from my sister to let me know my laptop had arrived. Awesome!
-
April 19th, mid-morning
I arrived home to find my laptop, as promised. I opened the box and was surprised to find some extras that I hadn’t anticipated. Dell has seen fit to include: an IR remote control, some Creative in-ear headphones, and an organiser of sorts which has room inside for a pen, a storage area A5-sized paper, CD-wallet pages, and a microfibre cleaning cloth with its own holder. What really surprised me though was that in the A5-paper holder came two user manuals : an XPS M1330 owners guide, and a Dell Computers and Monitors Guide. The XPS manual is fully illustrated and instructs users on how to do everything with their new laptop. Also included, surrounding the laptop, is a carrying case, though it doesn’t have a handle or shoulder strap. All of the included accesories are emblazoned with the “XPS” logo so nobody will mistake your new toy for a vanilla system.
-
April 19th, early afternoon
Turned the system on, was surprised to note that the battery came fully charged. I’ve thrown in my XP CD and wiped away all of the Dell partitions; the 10Gb recovery partition, the 20Gb Vista partition, and the 2Gb Dell media centre partition which contains software that specifically allows the laptop for use as a media playback device. Dell handily provides XP drivers for all the hardware in the laptop on its support website.
-
Aprtil 19th, mid-afternoon
With XP installed, it’s now time to install Arch Linux. Installation was interesting. First off, when installing the packages, it seemed to lock up, so I rebooted. I then spent the next hour trying to figure out why GRUB wouldn’t install; it was complaining about files missing. Reason being was because before the package manager had installed anything, I had rebooted. Then, when I restarted the install, I went from the same step, without mounting any drives. Therefore I hadn’t actually installed anything to my hard drive, and GRUB was broken.
-
April 19th, late afternoon
After I figured out that dumb problem caused by me, I got everything setup and got the wireless working second go (after disabling encryption on the access point - I was too tired at this point to bother fiddling with that). I installed X.org and GNOME.
-
April 20th, morning
Continued setting up Arch — soo many things to configure. Decided to pop into XP to install all my drivers. I’ve been using the system on battery and am quite happy at the rate with which it’s consuming power. I think I should get about 3 hours out of the 6-cell battery with normal-heavy usage; and probably just shy of four hours with minimal usage.
So, that’s that for the setup. It’s going really well so far. The screen is awesome. I got the special WLED version which uses a different, LED-based lighting mechanism for the LCD panel. It’s meant to give much better contrast and lighting properties, and I think it’s doing that job well. I also got myself the 7200RPM hard-drive instead of the 5400RPM one; I’ll never use a 5400RPM drive again in my life if I have to. They’re much too slow.
Overall I’m very happy with the entire process. Now all I have to worry about is enjoying the freedom my laptop now gives me.
2 commentsBill Gates talks directly with the public about Vista problems
Wait — sorry, no. My mistake.
Yeah, sorry about the title. I’m in a particularly snide mood at the moment. What prompted this, in-part, is a post I came across somewhere linking me to this bug report over at the Fedora bugtracker; nothing out of the ordinary, just a simple problem with Flash and Youtube videos, right?
Actually, if you read carefully, you’ll see that the person who submitted the bug is none other than Linus Torvalds, the initial creator and current project co-ordinator of Linux kernel development. In short, you might compare him — in a sense — to Bill Gates. The major difference being that Linus participates in open discussion of bugs and issues regarding his development project, whereas Bill prefers to send out his chair throwing , hot-headed chief executive officers to do his dirty work.
I find the bugtracker report to be interesting because you don’t often see the lead developer / project manager of any closed-source development actively participating in public discussion of software bugs. While it may be argued that Linus has nothing to do with playing Flash in Linux, the point remains that he personally took the time to log, report and assist in the fixing of the bug. It’s a testament to the transparency of the open-source development philosophy, and I think personally, quite an achievement.
2 commentsSoundBlaster Live 5.1 ALSA 5.1 speaker configuration
I’ve finally figured out the cryptic alsamixer to configure ALSA properly for use with my SoundBlaster Live 5.1 and my 5.1 speaker setup. I think a recent update has made this work properly because I’ve intermittently played with alsamixer over the years I’ve been using Linux, and I’ve never been able to get it to work properly. Though, today I can finally announce that it does. The following configuration, when pasted into your /etc/asound.state file (remember to backup your existing one first!) will hopefully “just work” — no further configuration necessary. It’s advisable to use your physical volume knob to adjust the overall volume level as I would not recommend playing with the software volume levels.
File’s here: asound.conf
4 commentsDesktop computing productivity technology
A few years ago the latest and greatest in desktop computing was the announcement of three-dimensional desktop environments. Much like you’d see in a video game, people were spouting about how your desktop applications could be manipulated in a 3D environment, making access to applications much more intuitive, thereby increasing productivity.
Over the last few years, these systems have been maturing, and I think it’s finally time to say that they’re ready. With the (not so) recent release of Windows Vista and its inclusion of Aero, the ongoing development of Compiz, beryl and now Compiz Fusion (beryl originally branched from Compiz, and now they’ve recombined to create Compiz Fusion), and of course the ever-present prettiness of Mac OS X, it’s finally time to get these 3D systems running on mums and dads computer.
Trying out the open-source alternatives a few years ago (even a few months ago) was a headache of an experience for some, myself included. Making sure your X server was configured correctly, obtaining the correct drivers for your video hardware, and then trawling through config files for the sake of a pretty desktop? Not really worth it. That, and the fact that in the early days, these systems (Compiz especially) would randomly crash, losing you all your work… hardly productive.
Now though, I’m pleased to tell you that Compiz Fusion is very, very mature. I installed it with a single command. It ran with another single command. No configuration, no mucking about. It’s now running, and is running quite reliably. If you want to see what kind of effects you can enable with these systems, all you need to is visit YouTube and type in the appropriate search term.
The best feature of Compiz Fusion by far (stolen/shared with Mac OS X) is the “expose” feature, which enables you to mouse over to the corner of the screen, and all your windows are presented to you in small, iconified format such that you can click on any of them and immediately switch to it. No wasting time tabbing through silly alt-tab menus, no wasting time trying to find which one of the many window tabs in your taskbar is the one you’re actually after!
See what I mean?

Also I love the funky icon bar down the bottom which is basically an index of all my open windows — no messy application bars and ambiguous title names, I can just mouseover and see for myself what’s in each window!
2 commentsOSS is transparent, interoperable and efficient

The benefits of open-source software have been known to its proponents since the concept’s inception. Open source, by its very nature, is open software that allows for addition and modification of source code by any and all who choose to do so. Consequently, follow-on benefits become apparent: this open nature is conducive for producing an IT environment powered and supported by open technologies that are transparent, interoperable, and efficient.
Instead of being restricted by proprietary licencing and arbitrarily enforced limitations, open-source software leaves developers and users alike to make free choices about the software they use. Unrestricted by vendor lock-in, users are free to switch software solutions as they please, allowing IT departments and home users alike to make quick and resolute decisions concerning software they use.
This of course is much to the chagrin of large software organisations that rely on said vendor lock-in to maintain market share. This has been one of the main sticking points for many governments, businesses and other organisations plans to transition to free and open-source software solutions. However, recently the US Department of Defence and the Croatian government have both made serious efforts toward evaluating and implementing open-source software solutions for use in their day-to-day tasks; the Croatian government has implemented an open-source software policy for all government departments, which encompasses the following guidelines:
- Government institutions will choose and/or develop open source solutions as much as possible, instead of using closed source alternatives.
- The government will support development of closed source solutions that use open standards for protocols and file formats, and which are developed in Croatia.
- The government will support the use of open source programs and open standards outside of its institutions.
- The government will support the use of open source solutions in educational institutions; both closed and open source solutions will be equally presented to students.
(provided by NewsForge, “Croatian Government adopts open-source software policy“)
Indeed, from the NewsForge article linked above, here are the words of Domagoj Juricic, deputy state secretary at the Central State Administrative Office for e-Croatia, who is the leader of Croatia’s Open Source Software Policy project:
“The use of information technology in government administration bodies is increasingly becoming important. So far, most of the software we use is proprietary software, so we cannot modify or complement it, or link software from different vendors. These software products impose rigid commercial conditions of use and limit our possibilities. In this way, government administration bodies may be led into a dependent position on the supplier of the software. This could lead to closed information systems, which make the success and efficiency of our eAdministration project more difficult.”
Similar sentiments are put forward by the US Deparment of Defence’s report, The Open Technology Road Map. The report identifies critical differences between the acqusition of physical goods vs the aquisition and use of digital media. While currently, many proprietary software programmes are treated the same way as a physical good, the report argues the arbitrary limitations of proprietary software, stating:
Digital goods (software code, music, movies, etc.) once created can be copied perfectly with relative ease: limiting distribution enforces scarcity, but that scarcity is arbitrary and negotiated, rather than an innate property of the product.
This arbitrary limitation of software availability also has an impact on inter-departmental software sharing:
Currently within DoD, there is no internal distribution policy or mechanism for DoD developed and paid for software code. By not enabling internal distribution, DoD creates an arbitrary scarcity of its own software code, which increases the development and maintenance costs of information technology across the Department. Other negative consequences include lock-in to obsolete proprietary technologies, the inability to extend existing capabilities in months vs. years, and snarls of interoperability that stem from the opacity and stove-piping of information systems.
Alongside vendor lock-in and the consequent reliance upon the software vendor, proprietary software suffers from lack of features, as well slow turnaround time for bugfixes and feature requests. Open software does not suffer the same limitations, as software developers can be contracted as needed to make additions to existing software, without the arbitrary licencing restrictions placed upon alternative proprietary software. Software developed for use in one department can be easily deployed in other departments, and collaboration of efforts between inter-departmental software development is made easier.
If the Croatian government and the US Department of Defence can adopt open-source ideals, technology and software, there is no reason why other governments and government departments cannot do the same. Open software allows for consistent interoperability (code-sharing, systems compatability, data management), offers system transparency (ease of auditing, bugtracking and fixing, feature implementations) and improves efficiency (reduction of code duplication through code re-use, ease of integration of new features and technology, streamlining of developer contracting) and overall, produces not only a better system of software, but at the same time reduces cost, eliminates vendor lock-in, and produces community-friendly code, which benefits everyone.
No comments