Spiga

A month with xfce

June 17, 08 by Bryan

I’ve gone from gnome to kde and back again many times. I recently decided to try xfce (on ubuntu hardy) on the recommendation of a coworker. It’s been a month now and I don’t plan on switching back. I’m running on older hardware and both gnome and kde were a bit heavy for it, leading to long load times and slow application switches. Xfce has been really, really fast. I’m really surprised at just how quickly the window manager responds.

I usually have lots of apps open, some of them quite heavy (eclipse). For instance, right now I have the following apps open:

  • Eclipse (editing in 6 tabs, 1 tomcat session running)
  • 2 Firefox sessions (1 for browsing - 5 tabs, 1 for testing - 2 tabs)
  • 8 terminal sessions tabbed across 2 actual window
  • 4 instances of prism (work mail, gmail, google reader, google calendar)
  • Accurev GUI

Xfce isn’t as flashy as gnome or kde, but it’s so much faster it doesn’t really matter. I’ll be rolling with xfce at work and gnome at home for the time being.

The discouraging journey of OOXML

April 04, 08 by Bryan

Much to the dismay of many standards proponents, the OOXML office standard passed the fast track International Standards Organization (ISO) vote last week. For anyone reading this that doesn’t know what this was all about here’s a quick rundown:

Despite the dominant market postion held by Microsoft, some companies had started moving away from using Microsoft Office due to the fact that MS office document formats are proprietary, tying users to MS office. Because of the outcry for open standards, MS decided it would be good to show consumers they are committed to playing nice with everyone else and use an open standard. Of course, there already exists an open document standard, ODF. The problem with using the ODF format for MS is that other products who already use it would suddenly become viable alternatives to the MS office suite. Instead, they proposed their own format, Office Open XML (OOXML).

In true Microsoft fashion and to no surprise of their critics, the OOXML specification was around 10-times larger and infinitely more complicated than the existing ODF format. Despite the problems with this document, Microsoft was able to work “around” ISO rules,  and buy/strongarm enough votes to get the specification to pass. A long list of irregularities in the ISO voting process can be found here.

Here’s what sucks:

  1. Knowing a single company has enough power to pull this off. It makes me skeptical of all politcal processes.
  2. Once again, a company with questionable (at best) business practices and a dominant market position wins. In an ideal world, objectivity would enter into these decisions somewhere.
  3. A single company (with a history of exploiting their dominant market share to make it difficult for competition) will now control an entire ISO standard.
  4. This vote showed some serious flaws in the ISO organization that will likely weaken it’s power and encourage countries to adopt their own standards instead of relying on a newly corrupt international entity.
  5. As the world seemed like it was getting smaller and working better together than ever before, we revert to allowing a single corporation to decide what is good for us.

Perhaps this is a weakness of capitalism or a call for reexamination of business (and ISO) standards. Either way, it’s discouraging to see an entity with only it’s best interests in mind pull off something of this scale.

Ubuntu 7.10 (Gutsy) amd64 on HP dv9000

February 18, 08 by Bryan

Installation procedure and issues I used when installing and configuring my dv9610us. Initially, I decided to try opensuse 10.3, which I found frustrating and couldn’t wait to get back to Ubuntu. Anyway, the initial CD installation was no problem. The following is what I did to get all the random pieces like networking and display working.

Boot Issues

After installing ubuntu, I wasn’t able to boot. Using the disk UUID instead of /dev/sd* caused a timeout when mounting the root filesystem. By default, the grub settings look like:

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=7c10fe3c-d695-48ed-b252-acf5fc169efe ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

To fix the booting issue:

  1. press ‘e’ in the grub boot menu
  2. press ‘e’ again to edit the boot command
  3. change the line beginning with ‘kernel’ to:

kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda1 noapic ro quiet splash

Be sure to edit /boot/grub/menu.1st and make the same change once your laptop boots.

NVIDIA Driver

  • apt-get install linux-source libc6-dev build-essential
  • Do not enable the restricted nvidia driver. If it is already enabled, disable it and reboot.
  • Download the 64-bit nvidia driver here.
  • sh ./NVIDIA-Linux-x86_64-169.07-pkg2.run
  • Ensure all these modes are added to /etc/X11/xorg.conf for your card: Modes “1440×900″ “12801024″ “1024×768″

Wireless Card (bcm43xx)

  • modprobe -r bcm43xx
  • add “blacklist bcm43xx” to the end of /etc/modprobe.d/blacklist
  • apt-get install ndiswrapper ndiswrapper-utils-1.9
  • untar broadcom driver (SP34152A.tar.gz) into /lib/windrivers
  • cd /lib/windrivers/SP34152A
  • ndiswrapper -i bcmwl5.inf
  • ndiswrapper -m

Disappearing Wireless
On occaision, my wireless card disappears. In the event of a disappearance there are several things that MAY work. In order of what I do to solve them, here they are:

1. Remove the driver from ndiswrapper, readd and restart networking

  • ndiswrapper -e bcmwl5
  • cd /lib/windrivers/SP34152A
  • ndiswrapper -i bcmwl5.inf
  • ndiswrapper -m
  • /etc/init.d/network restart

2. If that fails, first remove the ndiswrapper-common and ndiswrapper-utils-1.9 packages and readd using apt-get, then go to step 1.
Outstanding Issues

  • I’ve had to reinstall the NVidia driver a few times. Once after a kernel update, which is to be expected, but another time after trying to use kdm as my default login manager. I switched back to gdm since I don’t really care but it was somewhat troubling.

Digital Music Management with Linux (revisited)

January 29, 08 by Bryan

A while ago I blogged about the long process of managing my music on my laptop (opensuse 10.3 with KDE). I’ve been able to trim it down a bit so I thought I’d post my findings in the hope that someone else saves some time and effort. My requirements are simple:

  • Somewhat painless CD ripping for importing my existing iTunes collection
  • Easy management on my laptop (playlist, sort options, id3 tagging, etc)
  • Synchronization with my Cowon iAudio 7

CD Ripping

I’m become a fan of  Amarok for my music management. Somehow, Amarok lacks that nice iTunes “do it all” feature set. I understand Amarok CAN rip cd’s using KIO, but I didn’t get a chance to try it. There are really two stages for ripping:

  1. Rip to disk
  2. ID3 Tags

The app I found most agreeable was Sound Juicer. For the most part, when I insert a CD, it finds the CD artist, album, title, track, etc in CDDB and imports the tracks in the format I specify (~/music/<artist>/<album>/<track# - title>.ogg).

soundjuicer-extract
Music Management

90% of the time, the CD’s are detected and it’s an easy fix. The other 10% Sound Juicer fails to find the data for the CD. This is also an issue with every CD that is made up of mixed albums. For these you will need to import as ‘Unknown Artist’, ‘Unknown Title’ (or something of your choosing). After ripping, Amarok can take care of the tagging and organization.

Right-clicking on the ‘Unknown Artist’, ‘Unknown Album’ album in the collections pane will give you the option to ‘Edit’ the tracks. For each track, if you manually type in the Artist, Album or Name and hit the ‘fill in tags using musicbrainz’ button, it will grab the info for the track in no time. I’ve never had it fail.

amarok-musicbrainz

Of course, even though you’ve filled in the tags, the content on your filesystem is still in ~/music/Unknown Artist/Unknown Album/01 - Track1.ogg format. This fix is simple. Go to the ‘Files’ pane in Amarok and right click the ‘Unknown Artist’ directory. Click ‘Organize Files’ and your music will be reorganized into the correct directory structure.

amarok-organize

After you are done ripping and tagging, you can enjoy Amarok for music management as it’s one of the most feature rich and intuitive applications for Linux today.

Synchronization

Here is where Amarok has failed me. The only way I’ve found to ’sync’ my DAP with my collection is:

  1. Go to the playlists pane in Amarok, dig down until you find the playlist that corresponds to your entire collection, right click and ’synchronize’ with your DAP (assuming it’s already mounted).
  2. Go to the ‘devices’ pane and use the transfer mechanism to transfer your collection to the DAP.
  3. Lather, rinse, repeat. Always repeat.

You need to repeat because several tracks will fail to copy. Hopefully not everyone has this problem but it sucks when you do. If you keep ‘transferring’, it will usually cure itself eventually. However, when you have possibly thousands of tracks to sync, this method sucks.

What I ended up doing was using rsync:

rsync –size-only -r –progress ~/music /media/iAudio\ 7/music

This takes care of the sync and I am a happy camper. It took 3 apps and a lot of trial and error to do it but I’m finally painlessly managing my digital music on Linux. With the advent of non-DRM music (see Amazon’s music store), I think we will see Linux becoming more popular for music management.

Cowon iAudio 7 and Linux - first impressions

January 29, 08 by Bryan

As I blogged about a while ago, I decided to practice what I preach and purchase a digital audio player (DAP) that supports open standards such as OGG and FLAC. I’ve been using it for a couple weeks and now have some actual opinions on the matter. I just plug it into my laptop via the supplied usb cable and it mounts it as it would any other usb device.

Firmware Update

Since I had read the current firmware for the iAudio 7 was 1.15 and it shipped with 1.14 the first thing I did was upgrade. This was a very easy process. First, I downloaded the firmware here. There is only one file in the archive, I7_FW.BIN, which you just need to copy to the players root directory (for me it was /media/I AUDIO7). Restart the iAudio and you get a message that it is upgrading the firmware.

Syncronization

First off, after completing the long and tedious process of importing all of my CD’s using a combination of Sound Juicer, Amarok and EasyTag, I could not believe that Amarok lacks a simple ’sync’ utility to synchronize your collection with your DAP. It does let you dig down into your playlists to find your entire collection and “synchronize” that with your DAP. First, it doesn’t erase files that were previously on your DAP, hence, it’s not a true “sync.” Secondly, I kept getting random errors that it was not able to transfer “such and such” a file. After retrying, the errors mysteriously went away. This did not give me a warm and fuzzy feeling. Before restorting to using rsync or synchroback to do this, I kept looking for something that would play nice. What I found was Banshee. Banshee was able to copy my tracks to the player with ease. One edit was necessary to get Banshee to recognize my DAP as an audio device. I added a file called .is_audio_player to the top level of the mounted device with these contents:


audio_folders=music/

After that, no problems. Banshee synced quickly and I had my music collection on my DAP. However, since this was yet another piece of software I needed, I ended up using rsync in the end for simplicities sake.

Using the iAudio 7

Using the Cowon as a standalone music player takes some getting used to. As many have stated before, the interface needs work. I would call it awful. It’s about the least intuitive device I have used in a while. I’m not sure this matters to me a whole lot because I typically just set it to shuffle and go. Even this was kind of goofy though as you must navigate to your settings, check the ’shuffle’ box and then play your music. What the device lacks is a main menu with options. Navigating to ‘Music’ sends you directly to a file browser which lets you walk through the contents of your music directory. No options to browse by artist or album, no shuffle, it just lays things out the way you have them on your filesystem. For me, not so bad since I carefully laid things out in an ‘artist/album/track - title’ format. One good feature is that you can choose to browse by .id3 tags which has worked nice for me so far. If you haven’t put id3 tags on your files though, it’s filename only.

One good spot is the sound quality, the default settings sound louder and clearer than an iPod and it gives you an interface to adjust your levels. Nicely done.

Album art

I can’t get this to work. Others have reported seeing album art by placing the cover image in the album home directory as ‘cover.jpg’. I went though a lot of hassle to find a program to pull album art of the Amarok database, convert it to .jpg and put it in the right place. After I had a nice script that does this for me, I still can’t see the art. Bummer.

Digital Music Management with Linux

January 10, 08 by Bryan

EDIT: See the updated version of this post here

I have owned an iPod for several years now and love it. It’s a beautifully designed device that has never failed me. However, I find it frustrating to have to use my wife’s Mac to manage my music and since the disk on that Mac was becoming increasingly full, it’s become more of a hassle. Also, I’m an open standards guy and I can’t stand software that ties me to a specific OS or application (thanks iTunes). Though I think that the folks over at Apple are doing great work, I don’t want to be married to their OS and applications (and I would never even think of running Windows). There is also the issue of DRM. I could sit here all day and blog about the sucktitude that is DRM but that’s been covered elsewhere.

Since my iPod’s battery seems to be wearing thin, I thought I may take a look at other options that would allow me to manage everything from the brand new opensuse laptop with tons of available disk space. After much deliberation, I decided to purchase the iAudio 7 from Cowon. Though all the critics seem to agree that it the interface on the iAudio 7 needs work, it supports MP3, OGG, WMA,, ASF, FLAC, WAV, MPEG4, has an FM radio, line in and microphone. Being the open standards guy I am, I was thrilled to see OGG support. The other huge benefit it had was listing Linux as a supported OS. I was also interested in the iRiver products, which many Linux users claimed to have gotten to work, but I didn’t want to have to spend lots of time and energy mickey mousing together like I did with my laptop.

Importing

As I’m waiting for my new Digital Audio Player (DAP) to arrive, I thought I’d be proactive and start importing and organizing my music on my laptop. Because of our friend DRM, the easiest way to do this was to rip it off CD (On a side note, after the way digital music has taken over the industry it’s pretty ironic that I’m going to go back to buying actual CD’s until someone can offer me DRM free digital downloads). This was a reasonable way to do it for me as I must still use CD’s in my car so I already had the CD’s burned. My goals were simple:

  • Import my music to my ‘music’ directory in the format: /artist/album/track - title.ogg
  • Apply id3 labels

As easy as it sounds, it was a huge pain in the arse. First I tried using sound juicer to extract the data. This went well for the first few albums as I was able to just click the ‘extract’ button to pull the CD into my specified directory format and it even ended up with the id3 tags.

However, not all of my CD’s were recognized by sound juicer, which was interesting seeing as how I burned them all the same way from iTunes. I was left with supplying the artist and album data to sound juicer which created the proper directories, but left the songs in 01 - track01.ogg format. Amarok solved some of the problems by allowing me to use musicbrainz to look up the tracks and apply the id3 tags. It did not however rename the files. I also tried kaudiocreator but I couldn’t get it working with CDDB so I gave up.

Enter easytag. Easytag gives me four things I needed:

  • Checks for misnamed directory/track names throughout your entire collection and fixes them
  • Checks for missing id3 tags
  • Performs song/album/artist lookup
  • Allows you to manually search for an album and drag the tags onto specific tracks

That last bullet is huge. The Killers album Sams Town was not recognized by default for some reason. I was able to highlight the list of generic track names, perform a search for “Sams Town” which it found, highlight all the songs and hit OK. Low and behold, the tags were placed on the files, I told easytag to rename them and I was done. So my final accepted ripping procedure of excellence is now:

  1. Rip tracks with sound juicer, don’t worry if song names/tags are
  2. Scan collection with easytag and fix filenames/id3 tags as needed

For the actual “management” part, I prefer to use Amarok which gives you tools similar to iTunes for listening, creating playlists, etc. One thing it does better than iTunes is recognize new music without having to “import” it. You just point Amarok to a directory and it will find everything in it. It even updates on the fly so if you add a new album or song you don’t have to rescan your collection.

As for the iAudio 7, I don’t have it yet. The idea will be to just drag and drop my music directory from the OS or just use synchroback to sync the player with my music directory.

Pros and Cons

The pros and cons of using this method over iTunes on PC or Mac:

Pros:

  • Not tied to a specific OS or application
  • No DRM - play your music on whatever supported devices and computers you want
  • You have your choice of file formats to store your music in, lossy or lossless

Cons:

  • Until it’s easy to get DRM free music, downloading music will be difficult
  • The process of buying a CD and having the two step process to digitize and manage it is an expensive one in terms of time (and most likely a slight monetary increase as well)

Conclusion

To me, and probably a lot of other Linux users the ability to manage music independent of OS is huge. I don’t think that a process like this is all that horrible though some of it will rest in the hands of what DAP you use. I’m hoping that giving up the iPod for a slightly less sexy device won’t be a horrible switch. The added flexibility (and general good feeling) of using an open standard to store music is also a big deal to me. There is evidence that non-DRM music is starting to catch on and hopefully it does, until then I’ll be trying to find storage for all my CD cases and cover art.

Dynamic DNS updates with dnsexit.com

November 24, 07 by Bryan

I recently registered a couple of domains and though I’ve been happy with dyndns figured I’d try a free DNS service. dnsexit seemed to have what I needed and I was able to get up and running quickly without any issues. I typically use ddclient for sending my updated IP address to dyndns, but since ddclient doesn’t support dnsexit, I was left to my own resources. The scripts provided by dnsexit were not as full featured as ddclient and didn’t have support for common routers. What I ended up doing was bastardizing domainUpdate (from the bottom of the scripts page) and using it with routerip.pl

To make this work, first install routerip.pl and domainUpdate.pl updating all the necessary variables. Then just change domainUpdate.pl to use routerip.pl to get the IP address of your router instead of your local machine:

replace:

# get IP from @network
# --------------------
foreach $line (@network) {
    if ($line =~ /.*inet addr:(.*)  P-t-P.*/)
    {
        $ip = $1;
        last;
    }
}

with this:

# get IP from routerip.pl
#--------------------
$ip = `/usr/bin/routerip.pl`;
chomp $ip;

Also, since I had more than one domain to update I changed domainUpdate.pl to handle that too by changing the scalar $domain to an array (@domain) and replacing:

if ($ip ne $lastip) {
    $update = "http://www.dnsexit.com/RemoteUpdate.sv?login=$user&password=$pass&host=$domain&myip=$ip";
    get($update);
    open(FILE,">$ipfile") || die "Can't open $ipfile $!\n";
    print FILE "$ip";
    close(FILE);
    `$logger "IP updated."`;
    print "IP updated!\n";
} 

with:

if ($ip ne $lastip) {
    foreach $domain (@domains)
    {
        $update = "http://www.dnsexit.com/RemoteUpdate.sv?login=$user&password=$pass&host=$domain&myip=$ip";
        $success = get($update);
        die "Could not connect to dnsexitn" unless (defined($success));
        open(FILE,">$ipfile") || die "Can't open $ipfile $!n";
        print FILE "$ip";
        close(FILE);
        `$logger "IP updated."`;
        print "IP updated!n";
    }
}

OpenSuse 10.3 on HP dv9000

November 18, 07 by Bryan

Installation procedure I used for installing OpenSuse 10.3 (32-bit) on my HP dv9610us:

  1. Boot to CD, perform install with ethernet connection to get updates/additional packages. This was fairly straightforward, questions were answered as they came, no special setup.
  2. For the broadcom driver, I couldn’t get the one that came with Suse to work so I used ndiswrapper.
    • Blacklist the bcm43xx driver to prevent the built-in driver from using it by adding blacklist bcm43xx to /etc/modprobe.d/blacklist
    • Remove the card from Yast->Network Devices->Network Cards
    • Reboot
    • Downloaded Broadcom driver (SP34152A.tar.gz)
    • cd /lib
    • mkdir windrivers
    • cd windrivers
    • tar zxvf SP34152A.tar.gz
    • cd SP34152A
    • ndiswrapper -i bcmwl5.inf
    • Check installation - ndiswrapper -l (should report broadcom driver)
    • ndiswrapper -m
    • modprobe ndiswrapper
    • Add a new card using Yast->Network Devices->Network Cards (module=ndiswrapper)
    • Reboot
  3. NVIDIA Driver for 7150m had to be compiled from source:
    • Download driver source here
    • Install kernel-source if not already installed - zypper install kernel-source
    • Stop X - /etc/init.d/xdm stop
    • From the console, install the driver from source: sh NVIDIA-Linux-x86-100.14.19-pkg1.run
    • Follow the on-screen instruction
    • When done, restart X - /etc/init.d/xdm start
  4. Disable horizontal scroll and tap on touchpad, add the following options to /etc/X11/xorg.conf
    • Option “MaxTapTime” “0″
    • Option “HorizScrollDelta” “0″
  5. Eclipse - need jre 1.6 as well as eclipse
    • zypper install eclipse
    • zypper install java-1_6_0-sun

Why I don’t use any Microsoft Products

November 01, 07 by Bryan

I have not run Windows on any machine I am responsible for since 2002. This includes all of my home computers (and my wife’s) along with various desktops/laptops I’ve had at work. The first thing I do with a new computer that shows up in my office at work is to download another Operating System (Ubuntu right now) and replace whatever is on the disk. There are a number of reasons I prefer to use some other distribution.

First and foremost, I am a software engineer with a background in systems administration. I learned more about computing in the first 6 weeks of using UNIX/Linux than I did in my entire college career. It wasn’t that my college was bad, it was that a UNIX box lets you look “under the covers” at what is actually happening at the OS level instead of abstracting important details away from the user like Windows does. What Windows does well is make it easy for your average Joe to use a computer. As a Computer Scientist, I expect a bit more from my OS. I want it to be customizable, I want to be able to troubleshoot problems without looking at MS documentation, I want open standards, I want to see what makes the computer tick. I really believe that Computer Science/Engineering programs should use a Linux distribution as a teaching tool. I even wrote my Master’s thesis on the subject.

I am at the point now that I become frustrated almost every time I touch a Windows box because things don’t work as I expect them to. When a relative asks me for help with a PC, my first response is to tell them to buy a Mac. It doesn’t make sense to me, as an engineer I think logically and some of the things that Windows does don’t seem logically sound to me. I’m always asking myself why something would work like that instead of this. I don’t think I’m alone. Every time I speak with a junior Windows administrator, they seem to think there is some sort of magic that can only be understood by a small group of individuals that makes a computer function. If you talk to a junior UNIX administrator, he/she will likely be able to provide reasoning and solutions for problems because they better understand how things work. I don’t want to be “protected” from anything, I want my OS/Software to let me see what is going on and tailor it to my needs.

There are many reasons people hate Microsoft. The open source community is always a huge culprit. The underlying cause is this: Microsoft’s goal is to maintain market dominance which frustrates those people who are for the advancement of computing. It’s not just that Microsoft is willing to threaten with anyone who may decrease their market share by not using an MS product, it’s that they are less concerned with advancing computing than they are about maintaining their position. There are many, many examples of MS using questionable business tactics in order to secure their spot, all of which bother me. What bothers me more is their unwillingness to adopt open standards. The reason is that these open standards will give people a choice between using an MS product and one released by someone else.

Take for example this whole fiasco with the International Standards Organization (ISO) and OOXML. There is a perfectly reasonable standard for rich documents that had already been adopted by the ISO, Open Document Format (ODF). Because ODF was already in use by products like openoffice.org, and there was no way MS was going to give them a head start, MS said told everyone that they were all for open standards but ODF was insufficient so they would write their own. What they did next was to include their standard, OOXML, in their MS Office distro and then submit it to the ISO for approval. Their document for the OOXML standard is around ~6000 pages while the ODF format is ~700. Evidently the goal was to give themselves a head start and make sure it was a complicated enough standard that everyone else would have a hard time using it. Worse, when the standard failed miserably to pass the first time, they strong armed a whole bunch of nations into taking an active role on the ISO and voting in favor of OOXML. Worse yet, the ISO is now complaining that none of these nations have reviewed or voted on any other submitted standard (the ISO does not only provide computing standards) causing the failure of these standards because they did not get the required 50% vote to constitute a quorum.

I can find plenty of other examples like this but there are more exhaustive lists available for your perusal elsewhere. My main problem is that as a Computer Scientist, I am interested in how we can advance technology and make it better. Too many times Microsoft hinders this effort by using it’s power or just by ignoring the rest of the world’s call for standardization. I don’t want to spend my time trying to figure out why my CSS isn’t rendering as the ISO standard states it should in Internet Explorer. I understand that this is a business and Microsoft has been excellent in maintaining their status. This still doesn’t make me want to use their products though. I want open standards that encourage companies to improve their products to gain popularity instead of only having one choice, I want companies to keep the best interests of the rest of the world in mind.