Powering down an old friend

I made bunch of purchases on Prime Day this year.  Among them was a replacement for my old home server, dubbed "Tallgeese".  Yes, I still use the same Gundam Wing naming theme I've had for like 20 years (if it ain't broke, don't fix it).  In fact, I've been using the name "Tallgeese" specifically to refer to my current non-laptop PC, whatever that happens to be, for a very long time.

Front view of the old TallgeeseBack view of the old Tallgeese

This box has served me well for over a decade.  It holds a special place in my heart because I built it myself from parts and upgraded it over many years.  The oldest part, by far, is the case.  I'm not 100% sure when I got that, but I think it might be the replacement for the broken one I referred to in this post from April 2005.  After that, the motherboard and CPU are quite old - I got those in September 2010.  The rest of the pieces are probably newer, but I don't really remember when they were replaced.

Now that I look at it, the specs on this box aren't actually that bad, even by modern standards.  Granted, they're still sub-par for anything made in the last five years, but it's still got enough horse-power to do useful work.  It's got a 4-core processor, the motherboard is maxed out at 8GB of RAM, and it has just over 4TB of storage.  As a media server, it actually works just fine.

The old Tallgeese CPU and motherboard.  It hasn't been cleaned in a while.

But on the other hand, you can also tell its age just by looking at the hardware.  For instance, that PCI card near the bottom is a sound board - a relic from the bad-old-days when Linux users needed to actually care about what kind of sound cards they bought if they wanted audio to work properly.  You can also see an internal media card reader in front with a crap-ton of slots - another relic from before everybody had settled on SD and microSD.  And you can't miss the two DVD drives - a DVD-ROM drive and a DVD+RW drive.  One of them is broken, but they're so irrelevant by this point that I no longer remember which one.  And we can't forget the serial, parallel, and PS/2 ports.  I don't even remember how long it's been since I used a PS/2 mouse or keyboard.  (For those too young to remember: "PS/2" is for the IBM Personal System/2, not PlayStation 2 - though that's old now, too.  And while I still have a PlayStation 2, I never has an IBM PS/2 - we had a PS/1 instead!)  The pictures also don't show the VGA-to-HDMI dongle I had to use for video to get it to connect to my main monitor, which never really worked well anyway.  When everything was plugged in, the back panel was actually kind of a disaster area.

Of course, just "being old" isn't really enough reason to get rid of a perfectly good box.  Like I said, it still works.  At least for now.  But it's been plagued by occasional stability issues, particularly when I tried to do anything that involved graphics (e.g. playing Battle for Wesnoth, which isn't exactly the most graphically demanding game in the world).  It would occasionally just lock up for no obvious reason.  It's also a big, clunky box that's kinda loud and generates a lot of heat.  And most of the components are old enough that it doesn't even make sense to try and mitigate these short-comings.  It's cheaper and easier to just buy a new box and slap my preferred software on it.

The new TallgeeseMkII, with data drive enclosure and some size context.

So I ended up buying this little guy, which I'm dubbing "TallgeeseMkII" - that was the version with the blue trim in the cartoon.  Since it was Prime Day, I actually ended up getting the model with 16GB of RAM and the 512GB disk for about the same price.  It's got considerably more horse-power than the old box and the case is actually smaller than the external 3.5" drive enclosure I'm using to house the 4TB data drive from the old Tallgeese.  The entire setup will fit comfortably under one shelf of my new desk (which is another post).  For context, I included my Huey Games Droid Assault "cassette" (actually a USB drive, but shaped like an old-school cassette tape) and the wood-block panda painting my brother did for me.  For context, he originally started doing them that size because they were being sold out of repurposed vintage cigarette machines.  So yeah, significant space savings here.

But as I said, the old Tallgeese lives on, at least in the form of its data drive, which was relatively new and still perfectly good.  I also pulled out the OS drive, since that was still good and it's easier to just stick that in a USB enclosure to grab any config or files that I need than it is to get them from backups.  I doubt I'll be using it for much else, though - while it is an SSD, it's only 120GB.  But some of the files from it will live on, so I guess that counts for something.

Phone upgrade time

It's that time of the year again: phone upgrade season.  

This one was a long season.  It's been a while since my last phone upgrade - almost exactly four years, actually.  My previous phone (and my wife's - I generally get us the same thing) was a OnePlus 5 which I bought in September of 2017.  It was a really nice phone and, to be honest, I didn't really want to upgrade.  I mean, why spend $500 on a new one when the one you have is perfectly fine?

However, this time I didn't have much choice.  A month ago I got a text from Cricket telling me that my phone would stop working on their network in February.  Apparently, this is due to the retirement of their 3G network.  For your phone to keep working, it has to support "HD Voice".  Of course, I had no idea what the heck "HD Voice" was, but a quick search revealed that that's just AT&T's nicer sounding term for VoLTE (Voice over LTE).  And, sadly, the OnePlus 5 does not support VoLTE.  At least, not out of the box.  In a previous version of the firmware, there was an experimental setting in the debugging utility that allowed you to enable VoLTE and voice-over-WiFi, but that seems to be gone now.  And, frankly, I'm not really comfortable with the idea of downgrading the software on my primary communications device so that I can rely on an experimental feature.  Seems like that's just asking for something to go wrong.

So I decided to bite the bullet and upgrade.  I really loved the OnePlus 5, so I wanted to stick with OnePlus.  And as luck would have it, the 8T happened to be on sale.  

When I got the OnePlus 5, one of the "criticisms" of it was that it was grossly over-powered.  I forget what the processor was, but the model I got had 8GB of RAM and 128GB of internal storage.  So it was closer to a decent-quality laptop than a typical cell phone.  And the OnePlus 8T is pretty much the same - my model has 256GB of storage and 12GB of RAM.  So my wife's phone now has more RAM than her laptop.  Is this necessary?  I don't know - maybe not.  But with the OnePlus 5, I noticed that I never had problems with it feeling "slow".  With my previous Samsung Android phones, that did become an issue after a few years, but the OnePlus had enough horse-power to handle anything the app store could throw at it.  So I figured it would be nice to continue that trend.

There's not really much to say about the OnePlus 8T itself.  Like the OnePlus 5, it's really nice.  It runs the same Oxygen OS, so there's no difference in the UI.  And OnePlus's "Clone Phone" utility made it pretty simple to copy apps, settings, and data to the new phone.  (It didn't get everything, particularly in terms of settings, but it got enough.)  In terms of the hardware, the big changes from the OnePlus 5 are:

  • The lack of front-facing "buttons".  Whereas the OnePlus 5 had reserved space at the bottom for the fingerprint scanner and dedicated virtual buttons, the displayable area on the 8T includes the entire pane of glass.  For navigation, you can either use virtual buttons along the bottom, or gestures (which seemed annoying and counter-intuitive to me).
  • Related to the above point, the front camera is in a cutout in the screen.  That's different.
  • The rear camera is friggin' massive!  Four lenses and two flashes.
  • The fingerprint sensor is under the screen.  So you can actually just put your finger in a certain spot on the screen rather than a dedicated spot at the bottom.  The fingerprint scanner on the OnePlus 5 never really worked all that well for me.  In fact, when I had a screen protector on the phone, it basically never worked at all.  But the one on the 8T seems pretty good.  Having a screen protector does interfere with fingerprint detection, but not so much as to make it unusable.

So far, I'm liking the new phone.  It's very much an incremental upgrade to the OnePlus 5, but that's not a bad thing.  I wasn't looking for anything revolutionary - just a comparable phone that would work on a modern network.  And I got that, plus a few bells and whistles.

I also got a new monitor

In addition to the new laptop, I also took advantage of Prime Day to get a new monitor.  As you can see in my last office photo, I've been using old monitors that I just had lying around for the past year or so.  But I figured that as long as I was upgrading my laptop, I might as well get a new monitor to go with it.

After going back and forth a bit, I decided to pick up this on sale for $170.  It's a 27-inch ViewSonic HD gaming monitor.  This is by far the largest monitor I've ever had and the picture quality is quite good.  It's nice to have a monitor that's legitimately big enough to put multiple windows side by side and actually have them be usable.  It also has decent built-in speakers and a very nice adjustable stand.  The height can be changed quite a lot, it rotates easily , and can flip the monitor into portrait mode.  

Of course, this also necessitated some other purchases: a new KVM and VGA to HDMI converter.  My desktop is very old, so it only has a VGA interface, whereas the new monitor only does Display Port and HDMI.  And since the desktop only has VGA, naturally that's what my old 2-port KVM had as well. So I ended up getting a 4-port HDMI KVM so that I could hook up my desktop, work laptop, and home laptop all at the same time.  I also decided on a VGA to HDMI converter with an audio out port, so I was also able to get rid of the big, clunky speakers on my desk (which I seldom used anyway).

I'm pretty happy with the new setup.  Having a good monitor is awesome - especially for playing Halo (but that's another post altogether).  The lack of external speakers compensates for the desk space taken up by the new monitor, so I don't feel at all cramped.  I also like that the new KVM has USB hub functionality, unlike my old one, so it only needs one USB port.  This makes it a simple 2-plug process to "dock" my laptop and use the big screen.  And with the extra ports, I also have the option of just leaving it hooked up and being able to switch from "work mode" to "play mode" with the press of a button.  That also means I can easily use my UHK with my laptop, which rocks.

I finally got a nice laptop

Well, I finally broke down and did it.  For Amazon's Prime Day this past week, I ordered myself a new laptop.  And this time, it's actually a nice one.

Acer Spin 5 and Lenovo IdeaPad U310 side by side

The old laptop

My previous laptop was a Lenovo IdeaPad U310 that I bought almost 8 years ago.  I know because I looked up the blog entry.  It's actually still in pretty good shape, which is why I haven't replaced it.  It already had decent horsepower (a Core i5, upgraded with 8GB of RAM) and I upgraded it with an SSD about three years ago, so it still performs reasonably well for my purposes.  In fact, my son will be inheriting it so that he has a non-school laptop he can use. 

On the other hand, it is 8 years old.  And while it still works well, it's starting to show its age - the screen hinge is starting to wear out and the WiFi adapter is unreliable.  On top of that, I've been spoiled by having relatively good laptops at work, so I kinda just wanted something nicer.

While the IdeaPad is a solid laptop, it's not particularly fancy.  It's an ultrabook, but a low-end one - I only paid $650 for it in 2013.  It's got decent build quality and a touch screen, but that's about it for amenities.  No keyboard lighting or stylus.  The screen is workable, but not great - the main problem being that it has a very narrow viewing angle.  It's not particularly light (about 3.7 pounds according to Lenovo's specs) and it tends to run a little hot when under any kind of load.

The new laptop

I looked at several of the laptops on Prime Day special, but after going back and forth several times, I eventually decided not to compromise and just spend a little extra money on something nice.  I eventually settled on an Acer Spin 5, which was on sale for $880.  Normally, I'd be too cheap to spend that much, but I figured that as long as I was getting a new laptop, I might as well make it a noticeable upgrade.

Acer Spin 5 with stylus out

And in terms of features, this is a significant upgrade.  Of course, being a new system, the Spin 5 has more horse-power, with 16GB of RAM, a Core i7 processor, and a 500GB NVMe drive.  However, it's the other features that are what make the big difference for me.  For starters, the Spin 5 is a convertible, i.e. it has a 360 degree hinge and can fold into a tablet mode.  (My wife's Dell Inspiron 7000 is also a convertible and I've always thought it looked like a cool capability.)  To complement that, it comes with a nice powered stylus that stows in the body of the laptop.  The keyboard is backlit (which I didn't used to think I cared about, but really does make a difference when you want to work in low light) and the touchpad has an integrated fingerprint reader that you can use to log in with Windows Hello (which is a dumb name, but whatever).

The screen is very nice.  It's a 13.5" IPS display with a 3:2 aspect ratio and very thin borders at the edge.  This actually feels much bigger than the old IdeaPad, even though it has a 13.3" display, but at a 16:9 aspect ratio.  I actually think that this alone may have been worth the price.  The increase in vertical screen space is immediately noticeable and makes the laptop much more pleasant to use, whereas the smaller display on the IdeaPad often felt a little cramped. 

I'm also enjoying the ultra-portable aspect of the Spin.  It's very thin and only weighs about 2.6 pounds.  That makes it very easy to carry around and keeps it from feeling unwieldy in tablet mode.

I've only had it a few days, but so far I don't have many complaints.  I do find the fact that home/end the function key for page-up/down kind of annoying.  Especially when print-screen and pause/break (which I use much less frequently) both have dedicated keys.  I guess I'll get used to it, but it's still dumb.  I also didn't like that, for the top row, F1-F12 are the function keys and the media features are the default.  Luckily, that's easily fixed with a BIOS setting.  One other minor weirdness is that the 3:2 screen means that the system is a slightly weird shape for a laptop.  I mean, it does fit into the bag I use for the IdeaPad, but just barely - it's got plenty of room on the sides, but it's almost too tall to close the bag.

All in all, I'm pretty happy with the Spin 5 so far.  I'm still getting the software set up, so we'll see how it performs with some regular use, but I don't anticipate any problems.  And I'm already using the tablet mode for casual web browsing and finding it just as handy as I'd hoped.  I don't think I'm ever going to be able to go back to a cheap laptop again.

New new office setup

Last year I posted a picture of my work-from-home office setup.  Well, it turns out that working from home is actually a significantly less temporary condition than I thought at the time.  So I moved and re-jiggered my office a little bit.

I moved my desk from the basement upstairs to what was the spare bedroom (it's actually not much of a bedroom anyway - just barely big enough for a queen-sized bed) and moved the spare bed down to the basement.  This was a major improvement over the winter, as the heating situation in the basement is not great.  It also gives me a lot more natural light, which is just makes things more pleasant in general.

In terms of hardware, things are much the same, but with some minor changes.  As you can see, I kept my old monitor setup, with my crappy old monitors.  Not because I'm particularly attached to them, but just because it's convenient and I don't have a lot of desk space to work with.  I also have my trusty Ultimate Hacking Keyboard, which I still love.

I did get an upgraded laptop - still a ThinkPad, so you can't really tell the difference, just a newer model with more RAM.  I also added the tablet I got myself for Christmas (in lieu of exchanging gifts, my wife and I decided to upgrade our tablets), a Samsung Galaxy Tab 6 Lite.  It's actually a fairly nice little tablet, especially for the $250 price tag.  It's also really nice as an additional screen to play videos, podcasts, or music in the background while I work.  That way that stuff doesn't get in the way as it might if I put it on my computer (and it also doesn't have to go over the VPN). 

I've also upgraded my trackball from a Logitech Marble Mouse to a Kensington Expert Mouse.  This was actually necessitated by the fact that my Marble Mouse was really old and the left-click button finally started to die.  I've actually wanted to try an Expert Mouse style trackball for a long time - pretty much ever since I've been using left-handed trackballs.  But until relatively recently, I was too cheap to justify spending $100 on a trackball, so I settled for the Marble Mouse, which is much less expensive, but still good.  However, this time I decided to give the Expert Mouse a shot.  There aren't really that many choices for ambidextrous trackballs anyway, so why not get a nice one?  And so far it is pretty nice.  The large trackball takes a little getting used to, but it controls well enough and is fairly comfortable with the wrist rest.  It's got a scroll wheel that's nicer than the buttons on the Marble Mouse, and the configuration software works pretty well.  The Expert Mouse actually has four physical buttons and the scroll wheel, compared to the four buttons total (including scroll) on the Marble Mouse, and will treat clicking both top or bottom buttons at once as fifth and sixth buttons.  That's nice because it actually gives you a little more slack to do something useful with the extra buttons. So I have the top buttons configured for universal scroll, copy, and paste.  However, I did find that there's not way in the UI to control the concurrent-click detection time, so using the click-both feature on the bottom two buttons (right- and left-click by default) doesn't work well - it's easy for it to confused and do things like swallow double-clicks.  Still, I'm happy with the change.

Right now I'm quite happy with my home office.  The hardware and desk space situation is good; I get plenty of sunlight, but due to the angles the sun never shines straight in the window; and I can even open the windows and get some fresh air!  And this is a good thing, because I'm going to be in it for a while.  My company isn't planning to require anyone to return to the office until at least October.  The offices are currently open with various COVID restrictions in place, but non-essential employees are returning on a purely voluntary basis.  And so far there aren't that many people in the office, so unless working from home is a problem for some reason, we don't really have much of a reason to go back.

I guess we'll see what happens toward the end of the year.  I know a lot of people are rooting for a "part-time office" model where we could go into the office two or three days a week for meetings and work from home the rest of the time.  So far there are no plans for that model, but I find it appealing as well.  My team was already distributed across two offices, so just having everyone work from home wasn't really that disruptive to us.  In fact, it might actually be easier in some expects, since while it does take away the in-person aspect, it also takes away the risks associated with that in a distributed team.  Sure, we can't have spontaneous, ad hoc conversations, but we also are less likely to leave important people out of those spontaneous conversations. I experienced that several times in a previous team where we had one remote person, who we would frequently forget to include in or notify of decisions we made in those spontaneous discussions.  Instead, we just have the conversation in the Slack channel and everybody can see it and join in if they want.  

A very retro Christmas

I'm certainly not a "hardcore" gamer by any stretch of the imagination.  However, like many kids who grew up in the 80s and 90s, I have fond memories of playing Nintendo.  So I still have a soft spot for retro games, which I occasionally play via emulation.  Turns out there's a large community of retro games on YouTube, so I sometimes watch their videos.  I particularly like channels like The Gaming Historian, that trace the history and context of games, franchises, or pieces of hardware.

I've also recently taken to watching the odd retro gaming video on YouTube.  In particular, I'm kind of fascinated by speed-running.  Several months ago I stumbled upon this video of a Dragon Warrior speed run in less than half an hour.  I loved Dragon Warrior as a kid, and I remember spending hours and hours grinding so that I'd be at a high enough level to move on to the next area.  But this run used random number generator (RNG) manipulation to control the "random" actions of the game and basically beat it over lunch.  I find the amount of work and investigation that goes into this type of thing truly impressive.  (Though I can no longer remember what it's like to have the free time that you'd need to do this.)

Anyway, while I'm watching these videos on my tablet or phone, my son will sometimes sidle up and watch them over my shoulder.  So he knows about and is interested in various old-school games.  He even sometimes watches me plays them or takes a turn playing them on my phone.  He's also been getting more interested in games, coding, and computers in general lately.

So this year, we got him a DIY project for Christmas - a retro gaming console.  Or, more specifically, the components to build a retro gaming console.  This consisted of a Raspberry Pi 400 CanaKit and a couple of IR wireless controllers.  I walked him through assembling the hardware, showing him what the components were and what they're for, and took care of flashing the microSD card with a RetroPie image and getting some games onto it.

Overall, this was actually a remarkably easy process.  The CanaKit comes with all the hardware you need, except for controllers, and it's pretty easy to up together.  I don't think I even needed any tools.  The controllers I got were advertised as working with Raspberry Pi and "just worked".  Even installing RetroPie was pretty painless.  The process was fairly well documented and required minimal configuration.

So now we have a nice little retro gaming console.  RetroPie works well and has a fairly easy to use interface (it even has some instructions for controlling it with the gamepad on-screen).  My son hasn't had much problem with it so far.  In fact, we beat Contra together this afternoon.  We used the Konami code to get 30 lives, of course.  I can't imagine playing without it - I'd almost forgotten how brutally difficult early video games could be.

USB drive repair

This week, a note to my future self: undoing a USB drive that was flashed with a bootable image is a pain in the neck.

This week my wife wanted a USB thumb drive so she could take some documents to her mother's house and print them out using her printer, because ours is a pain in the neck and it's out of ink.  Well, the good news is that I had two drives handy!  The bad news is that neither of them did anything when I plugged them into her computer.

Of course, it turns out that, at some point, I'd used both of these as bootable drives for a something Linux-based.  This means, of course, that Windows can't read the partitions, so it can't write files to them.  In fact, when I plugged the drives in, nothing happened - they didn't even show up in Explorer.  So I had to fix them.

Well, the first one was pretty easy.  I just used the "Disk Management" console (a.k.a. diskmgmt.msc).  Using that, I was able to see the disk and it's partitions.  It was then a simple matter of deleting the existing partitions, creating a new one, and formatting it.  Then Windows found the drive just fine.

That didn't work so well for the second disk.  The drive showed up with an EFI partition and a lot of unallocated space.  I tried to create a partition in that space, but it didn't work.  So I eventually ended up downloading Rufus.  This is a handy tool that I've used in the past to image USB drives with ISO images.  Well, it can also do a plain-old reformat of a drive.  I just selected "unbootable" for the boot image, GPT for the partition type, and told it to format.  Rufus successfully blew away the entire drive and gave me back a fresh, working USB drive.

So the process wasn't too bad.  It's just a matter of realizing what's going on and getting an appropriate tool to fix it.

More laptop repair

Following on my previous post, this last weekend I did a little more laptop repair.  I was successful again, but this time it was much easier.

This time my task was to fix up an old laptop for my son.  After a month off, it's time for him to get back to doing some school work.  He functions better when he has a regular schedule and the whole learning-from-home coronavirus pandemic thing really threw him for a loop.  So it will do him good to get back to a little Reflex math and Lexia reading, in addition to doing some writing on the computer.  (He hates writing, but seems to tolerate it better when he can type rather than print.  Plus he likes the "learn to type" program he was using.)

Well, to do that he needs a computer.  He was using the school laptop that he used in the classroom (you know, back when kids were allowed to go into the school - we still don't know for sure if that'll be a possibility for the fall), but we had to return that at the end of the year.  And since neither I nor my wife wanted to sacrifice our laptop to the cause, we decided the easiest solution would be to fix up the old MacBook Pro I had sitting on a shelf.  It's a 2010 model that we hadn't used in several years, but it was still functional.  It also had the benefit of being a retired web development laptop, so it had a decent amount of horsepower.  This may serve us well if he has to do distance-learning from home in the fall, because the school laptop he was issued was hideously slow.  It basically had the memory to run Windows 10, whatever central management software the school had installed on it, and just barely enough left to run one actual user application.  Any more than that and it started thrashing like crazy and ground to a halt.  And don't even think about letting it go more than a day without a reboot.

Anyway, shortly after setting about this task, I realized this laptop would need some hardware work.  There were actually two things wrong.  The first I already knew about: the trackpad was broken.  It tracked finger movement, but it wouldn't click, which made it fairly useless.  You could sort of work with it by turning on the "tap to click" setting, but that was highly limited and painful at best.  However, I figured that problem would be solved with a USB mouse.

The second problem was more immediate.  While creating an account and figuring out what to do software-wise, I realized that the bottom of the Macbook wasn't flat.  In fact, one side of the bottom panel wasn't even flush with the rest of the case.  At first, I figured maybe a screw had come loose, or that I'd opened it up for some reason and put the panel back on crooked.  But no.  It was the battery.

Bulging Macbook battery

That's the battery that I took out of the Macbook.  In case you can't see in the image, it's bulging to the point that the external plastic casing has started to break open.  It was actually putting so much pressure on the case that it was forcing it open.  So that had to be replaced too.

Fortunately, this was a much less involved operation than the Dell repair.  I don't know about the current models, but the 2010 Macbook Pros are built to be pretty easy to service.  No annoying plastic clips or other weird tricks needed to open the case - just take out the screws on the bottom.  I'm sure replacing the keyboard would be more difficult, but the battery and trackpad were pretty easy.  In fact, I was just able to follow the video below.

The only hard part was getting the trackpad out.  That's because one of the screws was hopelessly stuck and I managed to strip the head trying to get it out.  I eventually had to leave that screw in, remove the screws that fixed the support bracket to the case, and bend the bracket to get the trackpad out.  Then, after some struggle, I was able to work the stripped screw out with some pliers and a little WD-40.  I didn't have any other screws of the proper size, so I had to put the stripped screw back in the new trackpad using the pliers, which was a pain, but less difficult than getting it out.

All in all, it was a pretty painless repair.  The next part was just cleaning it up the software on the system.  The first thing was to upgrade OSX.  Since I hadn't used that laptop in years, it was still running Mavericks (OSX version 10.9), so I updated it to High Sierra (version 10.13), which is the newest one that supports the Mid-2010 hardware.  It's still two releases out of date (current is Catalina, v10.15), but it's better than nothing.  

The next step was removing all the old (and in some cases no-longer-working) software and upgrading the things that my son might actually need.  The two big ones were, of course, Chrome and Microsoft Office.  I also set up KeePassXC along with the Chrome plugin and created a password database for him to use.  He might only be seven, but it doesn't hurt to start instilling some basic security awareness.  Last but not least, I got a copy of MSP360 (formerly Cloudberry) Backup for Mac and set that up like the instances on our other laptops, so that he's all backed up.

So for an investment of a few hours time and about $110 in parts and software, my kid has a nice, working laptop.  I walked him through logging in, what applications are available, using KeePassXC, and the other things he needs to know for now.  It'll take a little practice for him to get used to it, since there's a lot there and he's never used a Mac before, but he took to it pretty well.  Hopefully this will be the beginning of a good educational experience for him.

My biggest laptop repair

I am very proud of myself.  Last weekend, I undertook my most extensive laptop repair yet, and it worked!

My task: replace the keyboard in my wife's laptop.  Now, this might not sound difficult, but the problem is that my wife has a Dell Inspiron 13 7359.  It's one of those convertibles where the screen will fold all the way around to turn into a quasi-tablet.  It's actually a fairly nice laptop, and it's got more than enough horsepower for her use.  The problem is that she's kind of tough on it and the keyboard was going bad.  In fact, it had quite a few keys that were either flat-out dead or very hard to press, to the point that the keyboard was basically unusable.  So it needed to be replaced.

The problem is that you can't replace this keyboard from the top.  The top of the case is all one piece and covers the space between the keys.  So you have to do it from the bottom, which means that you need to take literally all the components out of the case.  But it's not even that simple.  You can't just  take everything out and then unscrew the keyboard.  Noooo, that would be too easy.  You need remove a layer of adhesive plastic, which is on top of a protective metal plate which is glued and plastic-welded to the case and keyboard.  Then you can remove the glue that holds the keyboard to the case and replace it.  And, of course, then you've got to put back the plate and all the components.

The good news is that I managed to get through all that without too much difficulty.  I used the YouTube video above as a guide to disassembling the core components.  Then I took the advice from this iFixit thread to use use a soldering iron to melt the plastic welds (and also the glue).  I was able to use the soldering iron to go around the edges of each plastic weld and push the melted plastic to the middle of the post, as in the image below.  I used a small screwdriver to pry up the plate as I removed each weld. The soldering iron also easily melted the glue.  After replacing getting everything out, I was able to snap the new keyboard in over the plastic posts without too much trouble.  I used a little hot glue to hold it, then replaced the metal plate, using the soldering iron to spread the plastic from the welds back over the edge of the metal.  Probably not as good as new, but good enough to hold.  Then it was just a matter of putting back the sheet of adhesive plastic and all the system components.

Inside of the case with some of the plastic welds melted

The only part that I actually had any serious problems with was reconnecting the circuit board that houses the WiFi chip to the the motherboard.  For some reason, I just couldn't get the cable to stay put.  I'm not sure if it was just loose or if I wasn't getting it seated properly.  This was especially annoying because that board is what the power button is connected to, so the system wouldn't even turn on if it came loose, which kept happening in the process of putting the back cover on.  I eventually was able to get it to stay put with some tape, so at least it worked out.

In the process, I also upgraded the laptop hard drive from spinning rust to solid-state.  I used EaseUs Todo Backup Home version to and a USB hard drive enclosure to clone the existing system from the HDD to the SSD and just swapped in the SSD when I was putting the system back together.  It worked out great.  The drive cloning process was fairly painless.  It took around 45 minutes to clone the 500GB drive.  The only annoyance was the progress bar that stayed at 53% for half an hour before jumping to 90% when it was about to finish.  The software seemed fairly nice, but I didn't use it much - I really just needed to clone that one disk.  They have a free version, but sadly it does not seem to include the system cloning feature, so I just used the free trial of the paid version.  This does require you to sign up for a subscription and cancel before the trial ends, which is annoying, but not ultimately a big deal.

So now my wife can actually type on her laptop and it has a faster disk.  Total cost: $115.  That's probably less than I would have paid for just the parts if I'd taken it to a shop (which I don't know if they're even opened now).  The break-down was $20 for the keyboard, $70 for the SSD, $15 for the hard drive enclosure, and $10 for a soldering iron.  Yes, I had to buy a soldering iron.  I'd never actually used one before, believe it or not.  But I used it successfully and only burned myself once.  Not bad for a software guy, if I do say so myself.

Isn't SanDisk considerate

Author's note: Here's another article from the archives. This one was written way back on March 17th, 2007. At the time I was still working for the county government and using Linux on all my home computers. This rant came out of frustration at the interaction of not-fantastic bespoke software and annoying semi/anti-features in a commercial flash drive.

We don't have that in the Linux world. Most of our software is free or open-source and is installed from a single trusted distributor. We don't have to worry about whether a package is bundled with spyware, a crappy browser toolbar, or a useless systray icon.

This was brought home to me today when I had to deal with a user's flash drive at work. His department has a number of laptops that can't connect to our network, but this crappy application that the state foisted on us requires them to move data from back and forth between our file server and the laptops. The easy solution to this is just to use flash drives.

Well, this user's flash drive broke and the department didn't have any spares, so he went out and bought a 1GB Cruzer Micro. Nice enough drive, plenty of capacity for his purposes. The only problem was, it didn't work with The Crappy Software Foisted On Us By The State (TCSFOUBTS, pronounced 'ticks-fouts').

You see, TCSFOUBTS is one of those half-baked, government consultingware type of systems. It has a bazillion features and is highly customizable. On the down side, it's slow as all hell, has a terrible user interface, and is difficult to configure. For example, some customization options require manually editing MS Access database tables and quite a number involve hand-editing INI files or other text files.

Now, having planned ahead, the TCSFOUBTS people built in a feature to let users automatically copy their data onto a removable drive with just a couple of clicks. However, by "removable drive," what they really meant is "a path." For this feature to work, you have to configure TCSFOUBTS with the drive letter for your removable device.

By now, you probably see where I'm going with this. TCSFOUBTS needs the drive letter, which has to be configured by the system administrator. However, unlike the old flash drive, the Cruzer Micro has a bootable partition that displays as a CD-ROM drive. (Note from the present: this was before booting from USB was a common thing.) Of course, that's the first partition, and so get the drive letter where TCSFOUBTS wants to copy its files.

What was on that first partition? I don't remember. Some useless utility software that nobody asked for. One of those "value-adds" that they put on flash drives because they want to use the space for something. But it meant that the drive was stuck with an unusable partition that I didn't immediately have the ability to remove. So for the user to use this drive, they would have to hand-edit some INI file, and then edit it back when they got a different drive. And since the users for this system were all non-technical, that sounded less than appealing.

Eventually the user decided to just not bother and requisition an "official" drive. It was just a frustrating series of events. It goes to show how a few misplaced assumptions can completely mess up a user experience.

Good headphones are good

I've had a lot of headphones over the years, but until recently I never really had any good ones.  You know, headphones that cost more than $30.  But now I do, and I have to say it really makes a difference.

It started with Christmas.  Every year my company gives out a cool company Christmas present, customized with the company logo.  Well, this year the gift was a pair of Beats Studio3 wireless headphones.  These are really nice headphones.  I never would have spent that kind of money on headphones for myself, but they might actually be worth it.  They're quite comfortable, have a cord and Bluetooth, have good battery life, charge quicky, and have noise-cancelling.

The only problem with the Beats is that they're not super portable.  I mean, they're fine, but they're full-sized headphones and they block a lot of background noise even with the noise-cancelling turned off.  They're not optimal for things like jogging, or those times when I'm doing chores around the house and want to listen to  a podcast in one ear while I keep the other one free to listen for my kid.

So to that end, I bought a set of Raycon E25 wireless earbuds.  They're not Beats, but they're actually quite nice.  They're comfortable (as earbuds go), sound great, and come with a highly portable case with a built-in battery.  They're perfect for ad hoc listening, such as when washing dishes, or when exercising.  And while Bluetooth can be a pain in the neck at times, I have to say that wireless earbuds and headphones are much more convenient.  You don't realize what a pain it is to always be catching wires on things until there are no wires to catch.

So if you don't have a good set of headphones, and you have the money, I recommend you get one.  It's one of those little things that really does make a much bigger difference than you'd think.

Theme parks and microchips

This year, we spent our son's spring break in Florida.  My parents rented an apartment down there for a few weeks and invited us to come stay with them for the week.  It was a very nice week and we enjoyed some good family time and lots of unseasonably warm weather (it was in the 80's most of the week, which I'm told is a good 10 to 15 degrees higher than normal).

One of our outings for the week was a trip to Universal Studios in Orlando.  It turned out to be a beautiful day (despite predictions of rain) and we had a good time.  My son was especially excited about the Harry Potter areas.  We got the "park hopper" tickets, so we were able to visit both their "Adventure Island" park, which had a Hogsmeade area, and then take the Hogwarts' Express to the main Universal Studios park, which had Diagon Alley.  We didn't do many rides, since he's still a little young for most of the ones they have at Universal, but we had fun shopping and doing some of the non-ride activities.

Anyway, on a vaguely geeky note, they had kind of a neat drink package at Universal.  We went to Sea World two days before and they had a similar thing, but more manual (I assume it must be common for theme parks now).  Basically, rather than spend $3 or $4 per bottle of soda or water, you can spend $16 on a souvenir cup and get unlimited refills all day.  This was actually a pretty good deal, because it was unseasonably hot and we wanted to do the park all in one day (both because we were staying an hour away and because we didn't want to pay for multiple tickets).  At Sea World, you could just take our cup to any concession stand to get it filled.  At Universal, you could take it to a concession stand, but there were also free-standing Coke Freestyle machines throughout the park that you could use.  You're allowed to refill your cup every ten minutes until 2:00am the morning after you buy it.

Of course, this immediately raised the question "how do they enforce this?"  You don't have to show a receipt or talk to anyone to use the Freestyle machines.  What's to stop you from just bringing your own cup and not paying for anything?

Well, it turns out the souvenir cups actually have a microchip in the bottom.  If you look closely, you can see it in the bottom.  You can test this by not actually fully placing the cup down on the Freestyle machine.  We know this because somebody had dumped their slushie on the cup holder of one of the machines and just tipping your cup under the dispenser didn't work, presumably because it couldn't read the cup's chip.

I found this both kinda cool and kinda weird.  It was convenient, but at the same time it seems weird to have a computerized soda cup.  It's just one of those applications that I wouldn't have thought of.  Although it does explain why the Universal drink cups cost the same as the ones at Sea World despite the Sea World ones being way nicer.

UHK case

If you saw my review post, you know that I have an Ultimate Hacking Keyboard.  And that I love it.  It's an awesome keyboard.  In retrospect, I wish I'd ordered two of them at the crowd-funding price.

Over the holidays I took some time off and wanted to take my UHK home.  Because, you know, maybe I'd have a chance to actually use it.  The only problem with this is safe transportation.  My UHK has palm rests and I keep it in a "tented" configuration, i.e. split with the inner portion elevated.  To fit it back in the box it came in, I'd have to take off the feet and palm rests, which requires a screwdriver.  It's not really difficult, but takes a few minutes and it's kind of a pain in the neck to do.  This is actually the only thing I don't like about the UHK - you can't reconfigure it without changing a lot of screws.  (Though on the up side, the fact that things are screwed together makes the entire rig feel very solid.)

What I really needed was a carrying case.  Unfortunately, they don't sell one on the UHK site.  I briefly considered trying to make one, but wasn't sure I had the proper tools and, realistically, there was almost no chance I was going to find the time to do it.  Luckily, the UHK blog did the hard work for me and collected a bunch of examples of DIY cases submitted by users.  

My UHK in its new case

I ended up choosing the second option and buying this case.  It's a hard-shell case with some padding on the bottom and egg-carton foam on the top.  It's actually built for some form of min keyboard/synthesizer, but it's exactly the right size and shape for a UHK with the palm rests still attached.  It works perfectly, required zero work, and cost less than $20.

My UHK has arrived

My Ultimate Hacking Keyboard (UHK) finally arrived the other week.  It's only about a year and a half over-due, which I guess isn't really that bad for a crowd-funded product.  I was in love with this keyboard as soon as I saw the promotional video, so I've really been looking forward to getting my hands on one. 

If you haven't heard of the UHK, I recommend taking a look at it.  It's an extremely cool piece of hardware, even if you're like me and are neither a "gadget person" nor a keyboard aficionado.  It's a fully programmable mechanical keyboard that can control the mouse, splits down the middle, and has support for plug-in modules (not yet available).

Initial Impressions

Just taking the UHK out of the shipping box, it looks very nice.  I'm not sure what I was expecting, but I was pleasantly surprised.  The packaging was very slick and professional - far more so than conventional keyboards I've purchased.  It came with a nice "thank you" card and minimal instructions that just point to the URL for their online tutorial (which I highly recommend new users try out).

The very nice UHK and palm rest boxes.

I purchased both the keyboard and the palm rests.  At first glance, both look exactly as nice as they do on the marketing site.  The palm rests are a beautiful, smooth wood mounted on extremely solid metal plates.  The keyboard itself has a solid-feeling plastic case.  The seam where the halves separate is magnetic and has all metal contacts - no visible wires, circuit boards, or weird connectors.  The bottom has some thick no-skid nubs to stand on and metal mounting points for the palm rest.  Overall, it feels much sturdier and higher quality than any single-piece conventional keyboard I've used.

The opened UHK box.

The open UHK palm rest box.

Setup

Setting up the UHK was a bit of a mixed bag.  In the most basic setup, you can plug one end of the USB cable into the keyboard and the other end into your computer and it "just works" - no additional software or configuration required.  And that's great.  But if you have the palm rests and want to set up something more ergonomic, it's a different story.

My configuration of choice was to separate the keyboard and use a "tented" configuration with the palm rests, so that the center part of the keyboard is elevated.  This is similar to the setup of the Microsoft Ergomonic keyboard I had been using.  And once I got it set up, I found it to be very comfortable.

Comparison of the UHK with my old Microsoft Ergonomic keyboard.

The palm rest and tilting setup was the only aspect of the UHK that I'm not crazy about.  The setup process was not especially difficult, and there were clear instructions for all the standard palm rest configurations, but you can't do it without a screwdriver.  Installing the feet for tilting was the most painful part.  The feet are a thick plastic, which is good for durability, but makes it harder to bend them enough to fit into the mounting brackets.  And you can't really get the three screws for the mounting brackets in or out with the feet in them.  So it's not really feasible to quickly switch between configurations - at least not if you're using the "tented" setup.  I found that a little disappointing, but I can live with it.  The up side is that the final setup is surprisingly solid.  I had been worried that the palm rest would wobble or that the feet would have some give, but that's not the case at all.

The Agent

One of the really cool things about the UHK is that you can configure everything, but don't have to install any special software to use it.  The configuration is stored on the keyboard itself, so as soon as you plug it in, all your settings are already there.  You do, however, need a special program to do the configuration.

Screenshot of the UHK agent software.

The "agent" software itself is pretty intuitive.  It's cross-platform (looks like an Electron app - there's a web-based live demo here) and consists of a few settings panes and a visual representation of the keyboard that you can use to remap keys.  It allows you to remap literally any key on the keyboard, including modifier keys and layer-switching keys.  You can even map different functions for different modifier keys

The agent also has some support for running programs or doing other system functions, such as controlling volume.  Initially, these seemed to be a little dodgy, but that seems to have been resolved when I upgraded the keyboard's firmware.  That upgrade also gave me support for keyboard macros, which weren't yet implemented in the pre-installed firmware version.  I haven't actually had occasion to try out the macro feature yet, but it seems like a really cool idea.

Adapting to the UHK

The biggest challenge with the UHK is adapting to using it.  When you first look at the keyboard, the most remarkable thing is how small it is.  As one of my teammates put it, "Looks like you're missing some keys there."  And that's because, compared to most standard keyboards, it is missing a lot of keys.  Instead of having a lot of dedicated keys, the UHK has a concept of "layers".

My UHK setup.

If "layers" doesn't ring a bell, think of the "numlock" key on a conventional keyboard.  When you turn it on, the numeric keypad types numbers.  When you turn it off, the numeric keypad keys function as arrow keys, "delete", page up/down, etc.  That's two "layers" - the "number" layer and the "navigation" layer, if you will.  With the UHK, the entire keyboard is like that, but with four possible layers instead of two.  They are:

  1. The "base" layer, where you do normal typing.  This is the "no layers selected" layer.
  2. The "mod" layer, which gives you access to arrow keys, page up/down, home/end, F1 - F12 keys, and a bunch of other things that would have a dedicated key on a conventional keyboard.
  3. The "function" layer, which gives you access to the kind of things associated with the "function" key on a laptop - media control, volume control, etc.  Note that this is not for the function keys as in "F1", which was initially slightly confusing.  Instead, the number keys on this layer are pre-configured to change the key map (e.g. form QWERTY to Dvorak).
  4. The "mouse" layer, which is used to control the mouse, including left/right/middle clicking, movement, and scrolling.

I'll be honest - this setup takes a little getting used to.  You can't just open the box and immediately be productive using this.  However, it's really not as bad as I feared it might be.  The key arrangement is standard, so you can type text on the base layer with little to no adjustment.  It's just the layer switching that is an issue.

For me, the first week was spent mostly getting used to switching layers and getting the different key combinations into my muscle memory.  The second week was spent on customization and figuring out what did and didn't work for me.  For the most part, the default key mapping is pretty good, but there were a few things that didn't work for me.  For instance, I had to swap the left "Fn" and "Alt" keys because I was used to "Alt" being right next to the space bar and kept accidentally hitting the wrong key.  I also converted the right "Fn" key into a secondary "Mouse" key because, frankly, I never use the function layer and it seemed more useful to be able to control the mouse entirely with my right hand.  After the second week or so, I found that I pretty much had the hang of the layer switching.  My control started to become much faster and more natural.  After about a month, I found that when I used my laptop keyboard, I would instinctively reach for the non-existent "mod" key because it was more natural than moving my entire hand to find the arrow keys.\

Conclusion

It's been a little over a month and I LOVE my UHK.  If it wasn't so expensive, I'd consider buying a second one to use at home.  (Also I spend most of my time at home on a laptop, which doesn't lend itself to an external keyboard.)  It's a physically solid device with lots of features and it's just really comfortable to use.  I'm really enjoying the whole "not having to move off of the home row" thing.  It's not cheap, but I would definitely recommend it to any code who is willing to invest $300 or so in a keyboard.  I have no regrets and am actually looking forward to giving them more money when the modules come out.

New SSD for me!

I've been going back and forth on getting a new laptop for a few months.  My Lenovo IdeaPad U310 is about four years old and it's been starting to drag.  However, while it was never top-of-the-line, the specs are still decent compared to what I could buy for a reasonable price (translation: "a price I wouldn't feel uncomfortable communicating to my spouse").  So eventually I settled on just upgrading the spinning disk to a solid state drive.

I was slightly apprehensive about this choice.  I've upgraded laptops before, but the IdeaPad officially has "no user-servicable parts", so it clearly wasn't going to be as easy as the last time.  I found a good guide, but the short version is that replacing the drive was simple.  The hard part was getting the stupid case open.

The difference between the SSD and the rotational disk is actually pretty dramatic.  I knew there would be a big performance difference, but it's interesting to see just how big it is on otherwise identical hardware.  Boot time went from "forever" to 15 or 20 seconds.  Running backups and other disk-intensive activity no longer grinds the entire system to a halt.  It's fantastic!  Makes me wish I'd sprung the extra cash for an SSD when I originally bought the system.

Fixing Lenovo IdeaPad function keys

Note to self: you actually can turn the function keys on your Lenovo IdeaPad back into actual function keys.  It's just a BIOS setting.

For anyone else who comes across this, Lenovo's IdeaPad series of laptops (at least the version I have) does weird things with the function keys.  You've probably seen those keyboards where the F1 through F12 keys have alternate functions.  They often have a "function lock" button that's equivalent to caps lock or scroll lock and you can turn it off to access the alternate functionality. 

What Lenovo does is similar, except that the alternate functionality is on by default and there's no function lock button.  There's just an "Fn" button that you have to press and hold to access the normal function button keystrokes.  So on my laptop, F11 and F12 turn the screen brightness up and down and I need to press Fn+F12 to do a regular F12 keystroke.

This is probably great for "regular" users, most of whom wouldn't miss the function keys if they went away completely.  On the other hand, for a developer, this adds a second keystroke to a row of what were previously absurdly convenient hotkeys.  Granted the volume and brightness keys are convenient, but when I'm coding I use F11 and F12 for my IDE keybindings much more often than I need to change the screen brightness.

But luckily, as I found in the link above, you can turn that off in a BIOS setting.

Fixing Synaptics right-click button

Tonight I finally got around to fixing my trackpad.  Again.

So here's the thing: like most Windows-based laptops, my little Lenovo ultrabook has a trackpad with two "button" regions at the bottom.  They're not separate physical buttons, but they act as the left- and right-click buttons.  However, rather than force you to use the right-click pseudo-button, the Synaptics software the comes with the laptop lets you turn off the right-click button and use two-finger-click as the right-click, a la a MacBook Pro.  I find this preferable, in particular because my laptop centers the trackpad under the space bar, rather than in the actual physical center of the unit, which means that when you're right-handed, it's easy to accidentally hit the right-click button when you didn't mean to.

Prior to upgrading to Windows 10, I had this all set up and it was fine.  After the upgrade, not so much.  Sure, the same options were still there, but the problem was the that option to turn off the right-click button did just that - it turned it completely off!  So rather than clicking in that region doing a standard left-click, that part of the trackpad was just dead, which was even worse than the problem I was trying to fix.

Luckily, it turns out that the functionality is still there - the Synaptics people just need some better UX.  I found the solution in this forum thread on Lenovo's site.  It turns out you can just change the value of the registry key HKEY_CURRENT_USER\Software\Synaptics\SynTP\TouchPadPS2\ExButton4Action to 1, which is apparently the standard left-click action.  By default, it's 2, but when you turn off the "Enable Secondary Corner Click" (i.e. right-click to open context menu) feature in the Synaptics UI, that gets changed to 0, which is apparently the "do nothing" action.

Long story short: my mouse is much better now.

Upgrade time again

It's upgrade time again.  As I mentioned in my last entry, my desktop/home server had been getting short on disk space - and by "short on disk space," I mean I started to see Explorer reporting the free space as less than 1GB on my C: drive.  So it was time for a new hard drive.

Since the only real problem was my 100GB C: partition, I decided to go with more of a "start over" approach and just got a modest 120GB SSD.  My Windows 7 installation was about 5 years old, so it had accumulated a fair amount of cruft.  For instance, the winsxs folder alone had swollen to almost 14GB.  So I reasoned that a clean installation would probably fix most of my problems.

Along with the new hard drive, it was also time for some new software.  I started that out with an OS upgrade from Windows 7 Pro to Windows 8.1.  Yes, I know - everybody hates Windows 8.  But I think it's a good OS, damn it!  Sure, I'll grant you that the initial release had some rough edges, but aside from the questionable decision to remove the start menu (which is trivially fixed by installing Classic Start), the 8.1 update fixes every complaint I had.

As a change of pace, this time I decided to try the downloadable purchase of Windows 8.1 from NewEgg rather than waiting for physical media to ship.  It turns out that this process is actually pretty simple.  You place your order and then get an e-mail with a license key and a link to a downloader program.  You run that, give it your key, and it gives you several options for downloading the installation files.  One of these is to just download a bootable ISO image that you can burn to disk.  So it's actually not as wierd as I initially feared.  Of course, the one catch is that the downloader runs under Windows, so this probably doesn't work so well if you're a Mac or Linux user.

The one thing of note here is that this time I decided to save myself a few bucks and drop down from the Professional edition to the standard one.  I made this decision after considering the non-transferability of the OEM version and looking at the feature comparison matrix.  It turns out the the Pro versino contained exactly one feature that I cared about: the Remote Desktop Server.  So I reasonsed that if I could find a suitable remote access solution to replace RDP, then there was no need to buy the Professional edition.  And after playing around with TeamViewer for a few days, I decided I'd found that. 

It turns out that TeamViewer actually works quite well.  For starters, it's free for non-commercial use and it's in Ninite, so there's basically zero overhead to getting it set up.  Registering for an account is also free and helpful, though not strictly necessary.  The performance seems to be pretty good so far and it has the ability to start LAN-only connections or go through their servers for over-the-Internet access.  After using TeamViewer for a couple of days, I was more than convinced that I could do without the Windows RPD server.

Next on the list was a service to run Virtual Box.  As you may know, Virtual Box is a free system virtualization package.  It works pretty well, but it doesn't come with the ability to run a VM on boot (at least in Windows) - you have to wait until you log in.  To fix that, I installed VBoxVmService.  This is a little Windows service that will run selected VMs on boot without anyone having to log in and also offers a systray app that allows you to manage those VMs.  Previously, I had been using the similarly named VirualBoxService, which does essentilally the same thing but isn't quite as nice to use.  Of course, there are some limitiations, but for the most part it works well enough for my setup.  All I really wanted to do was have a Linux VM run on boot to serve as a web server because setting the stuff up on Windows was just too much of a pain.

While I was at it, I also decided to give Plex a try.  I'd previously been a little turned off by the requirement to create an account, even though I only wanted to use it on my LAN, but it turns out that actually isn't necessary.  The account registration is really only needed for remote access.  And with Android and Roku apps, Plex provided more functionality and required less work than my home-grown solution of using PHP scripts to generate customized web server directory listings for Roksbox.  That was all well and good, but just using Plex is much easier and seems to work better.

So far, things seem to be going pretty well and I'm happy with my new setup.  Granted, there are no radical changes to my setup, but in my days of Linux on the desktop, painful upgrades were not always such an uncommon occurrence, so I guess I'm a little battle-scarred.

One last thing to note is that I'm actually kind of impressed with Windows 7.  I days gone by, a Windows install lasting for 5 years of heavy use would be unheard of.  And even with seriously limited hard drive space, the system was rock-solid and actually performed pretty well.  If I'd been inclined to migrate it to the new drive, I probably could have kept that installation going for much longer.  Switching back to Windows was definitely a good move.

New toy - Sandisk Wireless Flash Drive

I got a new toy the other week - a Sandisk Wireless Flash Drive. This was not normally something I would have bought, but it showed up as a Kindle-exclusive special offer on my new Kindle Fire HDX (post on that coming later) - the 32GB model was only $20, which is about 66% off the normal retail price. I didn't really know anything about the device or how it worked, but for only $20, I figured, why not?

Sandisk Wireless Flash Drive(Photo by Pierre Lecourt, licensed under Creative Commons BY-NC-SA 2.0.)

It turns out that this is an interesting little "flash drive". First, to be clear, it's not really what I would normally consider a "flash drive". For starters, it doesn't actually have any built-in storage - it has a MicroSD slot with a 32GB card in it. So the "flash drive" itself is more like a MicroSD card reader that's also a networking appliance.

The networking portion is actually kind of cool. In it's most basic configuration, the Wireless Flash Drive acts as a WiFi access point. You associate to it and it supplies you an IP and can serve out content. However, it also allows you to configure it to associate to an internet-connected access point. So you can tell it the SSID and WPA credentials of your network and anything on the LAN will be able to access it.

The device is built to work with a mobile app (available for both iOS and Android) which allows you to not only access the data on it, but also configure it. However, while the app is actually not bad, it turns out you don't need it. The device provides a web interface that lets you configure it as well as browse content. And on further research, it turns out that the Wireless Flash Drive serves it's content out over WebDAV! So forget the mobile app - you can actually access it from any PC with a WebDAV client.

Though I haven't had opportunity to use it heavily yet, I have to say the Wireless Flash Drive is actually a pretty cool little deice. I probably wouldn't pay $60 for it, simply because I don't need it that much. But if you happen to have a distinct use for such a device, it's pretty cool and more open to tinkering than I'd expected.

A trackpad caveat

I've discovered a small caveat to the technique for OSX-like trackpad behavior that I posted about the other week. I probably should have anticipated this - it seems fairly obvious in hindsight, but didn't seem so at the time.

It turns out that X-Mouse runs in a different user context than the Window UAC dialog. Who knew, huh? The upshot is that any button that's been configured with X-Mouse will revert to its default behavior in the UAC. In other words, you have to click the system-default "left button" to make the dialog work.

Not actually a huge deal, since your X-Mouse config comes back once the elevated process has been launched, but a bit weird.

Faking out a Mac trackpad

So a couple of weeks ago I bought myself a new Ultrabook - a Lenovo IdeaPad U310. I've been used to using a MacBook Pro for work and I wanted something with a similar form-factor, but that didn't cost $1300, have an unnecessarily weird keyboard, and run OSX. The IdeaPaf U310 was fairly cheap and seemed like it would fit the bill.

For the most part, I'm pretty happy with it so far. I even like Windows 8.1 well enough (after installing Classic Start Menu, that is). There are only two parts that I'm not crazy about:

  1. The viewing angle of the screen is pretty limited.
  2. The trackpad is harder to use than on a Mac.

While there's obviously not much to be done about the first complaint, I figured the second one could be remedied in software.

Background

Now, the actual problem here is not with the physical trackpad - that works well enough. It's with the click handling. If you're not familiar with a MacBook trackpad, it has no "buttons" as you customarily see on PC trackpads. Rather, you can just press down (as opposed to "tapping") on the trackpad with one finger to "click" - the pad actually gets depressed a bit and makes an audible clicking sound. To do a right-click (or command-click in Mac speak), you just press down with two fingers. It's a little unintuitive at first, but you get used to it and it works pretty well.

The Lenovo IdeaPad, however, doesn't quite do that. It still uses the same "press to click" mechanism, and you can still press with two fingers to double-click. However, it also has two "virtual buttons" at the bottom of the track pad. There's just a small vertical line, about half an inch long, at the bottom-center of the track pad that. You press on the left of that line to left-click and on the right of it to right-click. Even simpler than the Mac. And, in fact, when using a Mac I'd often wished it had something like that.

Problem is, that doesn't actually work out so well all the time. Because there's no tactile feedback as to whether your finger is over the left-click or right click button, it's very easy to accidentally click the wrong one. This is especially the case if you're using the laptop on your lap and so end up with your hand coming at the trackpad from one side.

The Fix

So my solution to this was to try and change the behavior to work like a Mac - that is, make both virtual buttons left-click and use two fingers to right-click. Seems simple enough, but the Synaptics trackpad software that came with the laptop - which is actually quite good and contains a surprising number of options - doesn't support that. The only option it has for the primary buttons is to swap them, which doesn't help.

However, I did find a solution that uses Synaptics in conjunction with X-Mouse Button Control, a little third-party freeware app that lets you remap mouse buttons if various sophisticated ways.

  1. In the Synaptics settings, I configured the "Two-Finger Click" action to "Middle Click". (It doesn't have to be "Middle Click" in particular, just something other than right-click that X-Mouse can recognize.)
  2. I installed X-Mouse and configured it to set the "Right Button" action to "Left Click" and the "Middle Button" action to "Right Click".

So far this configuration is working pretty well. It's not ideal perfect - two-finger clicking on the left-click button doesn't trigger a right click. However, it does prevent those accidental right-clicks, which is what was really bothering me.

Clip Zip annoyance

OK, I partially take back my comments from yesterday. I found another thing about my new Sansa Clip Zip that's annoying.

Yesterday I tried upgrading the Clip Zip firmware. It came with firmware version 01.01.12, but the current release is 01.01.18, so I figured I'd get up to date. The firmware upgrade process itself was actually totally painless. You can use Sandisk's upgrade utility or just copy the file into the root of your device and disconnect it from the PC to start the upgrade. Nice and simple.

The problem is with the new firmware. As far as I can tell, there were no major bug fixes or improvements that I care that much about, but there is one major bug. In the 01.01.12 firmware version, the media refresh will pick up M3U files and add them to the device's list of playlists. The file paths need to be relative, of course, or else you end up with an empty playlist, but it's actually a very nice feature.

Well guess what's missing in firmware version 01.01.18 - no playlists. They don't even show up. A thread on the official Sansa forum suggests that this problem is actually shared by all the newer firmware versions, not just the latest. So nice going, Sandisk! Way to snatch defeat from the jaws of victory.

On the up side, reverting to the 01.01.12 firmware was dead simple. Just download the appropriate archive and follow the normal upgrade instructions. Once I did that, my playlists were back...after the hideously long media refresh.

New MP3 Player - Sansa Clip Zip

I got myself a little treat for the new year - a new MP3 player. I'd been thinking about it for a while, and a combination of my Christmas bonus and the fact that my old Sansa e280 would no long connect to my computer finally motivated me to take the plunge.

This time, I decided to go minimal. As I mentioned, my last MP3 player was a Sansa e280, which isn't exactly the Cadillac of MP3 players, but has a pretty decent feature set. It was certainly one heck of an improvement over the one I had previously - an old Digitalway MPIO with a whopping 256MB of internal storage and a massive 3-line monochrome display. The Sansa e280, on the other hand, has 8GB of internal storage, a decent sized screen, and can display pictures and videos. With the RockBox open-source firmware, it also has some simple games and apps, as well as microSDHC support (the Sandisk firmware only goes up to 2GB microSD cards).
My MPIO, Sansa e280, and Sansa Clip Zip
The thing is...I never really used any of that. Granted, the microSD slot is a God-send, and I used to occasionally play games on it. But I never had more than a couple of pictures of videos on it and really only used it for listening to music and podcasts. And for videos or games, I now have a CAANOO. So why not get something a bit smaller that just does the one thing I really care about?

So this time I went with the Sansa Clip line. In particular, the new Clip Zip, successor to the Sansa Clip+, which I was originally considering.
Close-up of the Sansa Clip Zip
The Clip Zip has a lot of things going for it. First, there's the form factor. It's tiny - only 2.25" by 1.42", about the same size as the pouch I use for my headphones. Second, it's cheap. The Clip Zip comes in both 4GB and 8GB models and starts at $50. I got a 4GB model on sale for $40, which is about what you'd pay for a 4GB no-name MP3 player. Third is the storage capacity. Of course, there's nothing impressive about the internal storage, but it doesn't matter because the Clip Zip has a microSDHC slot. So for another $30, I added a 32GB microSD card to my order, giving the Clip Zip a total capacity of 36GB. Not bad for a $70 investment.

So far, I really like the Clip Zip. I was initially disappointed that RockBox didn't have a stable port for it yet, but it turns out that the Sandisk firmware is actually pretty nice. The menu system is easy to use and looks nice, as does the "playing" screen with background cover art turned on. The firmware automatically sorts by artist, album, genre, etc., and separates podcasts and audio books into a separate menu item, which is kind of nice. It also includes the option to let you browse the actual folder structure on disk rather than using the database, which is something I always wanted in the Sandisk firmware on the e280.

The only thing I don't like about the firmware is the media refresh. As with the e280, the Clip Zip will do a "media refresh" every time you write data to the disk when it's connected to a computer or when you insert a microSD card (even if it's the same card you just removed and nothing has changed on it). This normally wouldn't be a huge deal, except that with a large media collection the refresh can take a very long time. I have a little over 20GB of audio on my microSD card, and the refresh was initially taking between 12 and 15 minutes. With some adjustments to the ID3 tags on my files, I was able to knock it down to about 8 minutes - still a long time, but not as bad. (For future reference, I used Mp3tag to tag everything as ID3v2.4 UTF-8, removing all other tag versions and blanking the comments field.)

As far as the hardware goes, I have no real complaints. I must confess that the Clip Zip does feel a bit flimsy compared to my e280, probably because the casing is all plastic as opposed to the metal backing on the e280. However, it seems to be reasonably well made. The controls are easy to use and I've found myself using the clip on the back far more than I ever thought I would. And I have to say the that the micro USB charging port is a welcome change from the proprietary port that the e280 used. With the Clip Zip, I don't even have to bring a dedicated cable with me when I travel - I can just use the same one I use for my cell phone or Kindle.

So I would definitely recommend the Clip Zip. It's simple, inexpensive, does its job well, and is surprisingly full-featured for the price and size.

Fixing MediaMonkey playlists in RockBox

Yesterday I tried creating a playlist in MediaMonkey and synchronizing it with my Sansa e280 running RockBox. I never really bothered with trying to sync playlists to my MP3 player before, because syncing, well, anything that's not an iPod using third-party software is a little iffy. Needless to say, my fears were well founded.

While MediaMonkey's syncing feature is nice, I ran into several problems. First, and most obvious, MediaMonkey didn't like the layout of my media directory. You see, I have a main "Music" folder which contains a bunch of artist and album sub-folders, but also a bunch of miscellaneous MP3s at the top-level. MediaMonkey didn't see those MP3s for some reason. After the sync, they just weren't there - I had to copy them over manually.

My other problem was a combination of the playlists themselves, how RockBox on the Sansa works, and where I'm putting my music on the Sansa. A couple of weeks ago, I "upgraded" my Sansa by buying a 16GB microSDHC card for it to complement the 8GB of internal flash storage. This resulted in a change of organization - I now keep all my actual music on the microSD card and put podcasts and other spoken material on the internal storage. Turns out that this messes with MediaMonkey's assumptions about playlists.

There are several issues here. The first is that when MediaMonkey syncs to the microSD card, it sees it as a separate device and creates the playlists accordingly. The result is that the playlists use absolute paths within the microSD card. However, the real absolute path for files on the microSD card starts with the device path, i.e. <microSD1>. So, basically, the paths in the playlist are wrong for RockBox.

The second issue is that the playlists get synced onto the microSD card. This isn't really a problem, just now what I want. I want the files synced to the main RockBox playlist folder on the Sansa's internal storage.

The third issue was with those assorted MP3s in my root "Music" directory. Even though I set the sync path to <Path:2> in MediaMonkey's sync configuration, which should mirror the directory structure on my hard drive, when I ran the sync, the assorted files on my playlist got copied into a "Music" folder on the microSD card. I'm not sure why. But as long as that's the case, I decided to "solve" that problem by just moving the rest of the assorted files there too. They weren't being synced anyway, so why not.

I decided to solve the playlist path and location problems with a simple Powershell script. You can download a copy here. It simply reads your playlists, adjusts the paths, and moves them to the main device storage. The code is below:

$source = "MUSICSD"
$device = "Sansa e280"
$listDir = "Playlists"

function findDriveByLabel {
   $drives = [System.Io.DriveInfo]::GetDrives()
   foreach ($drv in $drives) {
      if ($args[0] -eq $drv.VolumeLabel) {
         return $drv.RootDirectory
      }
   }
}

$sd = findDriveByLabel $source
$dev = findDriveByLabel $device
$sdDir = [System.Io.Path]::Combine($sd, $listDir)
$devDir = [System.Io.Path]::Combine($dev, $listDir)

$lists = ls $sdDir

foreach ($lst in $lists) {
   $outFile = [System.Io.Path]::Combine($devDir, $lst.Name)
   $outFile
   Get-Content $lst.FullName | ForEach-Object {
      "/<microSD1>" + $_.Replace("\", "/")
   } | Out-File -Encoding utf8 -Width 1000 $outFile
   rm $lst.FullName
}

$remLists = ls $sdDir
if ($remLists -eq $Null) {
   rmdir $sdDir
}

So far, this part is working fine. I'm still not 100% happy with the sync experience, though. The missing files is the part that really bugs me. I'll have to do a little experimenting at some point and see if I can make it work. Only problem is that it takes a while to write 16GB of data to the device....

Post-upgrade fixes

It's that time again - time to fix things after upgrading!

This time, I did something unusual for me - rather than copying my existing Ubuntu install over to the new drive, I just did a fresh install. This was partly because I'd been carrying around that same install for at least 3 years (probably more like 5) and partly because it was the 32-bit version, and I wanted to use the x86_64 version, what with the new CPU and all. Of course, I did copy across my home directory, so I'm probably going to see some config problems there, but that's just how these things go.

My first two problems were a little unexpected. The first was that the numeric keypad on my keyboard didn't work. I mean, it worked, in the sense that certain keys responded in approximately the desired way, but it didn't actually type any numbers. Fortunately, a little Googling turned up this post, which had a very quick fix - turn off the "mouse keys" in the keyboard config dialog. Not something I would have expected to be on by default.

The second problem took a few minutes for me to figure out, probably because it's still early. When I fired up Thunderbird and opened Lightning, none of my calendars were there. And I couldn't add them back - the dialog just didn't respond. The solution dawned on me when I tried to install the newer version of Lightning. The install bombed out, complaining that the package didn't support x86_64. Duh! I was still running the old x86 pre-upgrade Lightning binaries that were in my profile directory. Unfortunately, the main Lightning page didn't have any x64 binaries linked, so I had to go hunting. Turns out you can grab them from the contrib directory, so that was an easy fix too.

We'll see what else is broken over the next few days. Hopefully I won't hit too many more snags.

Upgrade time! Yay!

Hooray! Sarah agreed to let me order an upgrade for my desktop!

This is the first big, i.e. multi-component, upgrade I've had in 5 years. I got all the parts on Wednesday, installed them on Thursday, did the trouble-shooting on Friday and this morning, and am not posting this from my fully upgraded machine. And boy is it fast! Or, rather, it's fast compared to my pre-upgrade machine and the piece of crap laptop they gave me to use at work.

My pretext for this upgrade was actually a previous upgrade. For my birthday, I got a $50 Newegg gift certificate, which I used to order a new 1TB Samsung hard drive, because my 750GB Western Digital drive was down to about 20GB free. The up side is that between the gift card and a sale, I only paid $10 for the new drive. The down side was that I forgot to do my homework, so it turned out that the drive only supported 3Gb/s SATA II. Which was great, except that my old motherboard only did 1.5Gb/s SATA. So it was either upgrade, or buy a SATA II controller, which seemed like a waste of money.

So this upgrade was basically replacing the guts of the system - motherboard and CPU. I ordered myself an ASUS M4N68T-M microATX socket AM3 board, with integrated audio and NVIDIA GeForce 7025 video. I might have gotten something a little better, except that I had to set aside $25 of my budget for a new power supply, because my old one was making some troubling noises. For the CPU, I splurged a bit and got a 2.8GHz Athlon II X4 quad-core processor. I topped that off with 4GB of Crucial RAM (because 8GB was outside my price range).

So now I've got a quad-core with decent RAM, a modern video card (even if it is integrated) to replace the 64MB Radeon 7000 I'd been using, which didn't even support Compiz, and a bit under 2TB of total storage. Plus I can use the old 160GB hard drive I took out of my system in another old box which I intend to hook up to one of my TVs a low-end digital video player.

And for the first time in a long time, Ubuntu flies on my system!

Annoying mtools inconsistency

I hate upgrading Ubuntu, because every time I upgrade, something breaks. Sometimes it's small things, sometimes not so small. For instance, the last time I tried upgrading to a newer version of KDE 4, I ended up irreparably borking the installation and just switching to GNOME. (And by "irreparably", I mean messing it up bad enough that I had neither the time nor inclination to repair it.) Interestingly, the change was much less disruptive than I thought. Apparently I just don't care that much about desktop integration anymore. Chalk it up to switching back and forth between platforms all the time.

Anyway, this time the breakage was in the permission fixing script for my Sansa e280 MP3 player. The short version is that when the script ran mattrib -h to clear the "hidden" attrbiute on a directory, it just printed out the mattrib usage message, despite the fact that there was no error in the command syntax. After all, the same script had been working flawlessly for over a year in Ubuntu 8.10 and 9.04.

Well, after an hour or two of messing around and fruitless Googling, I finally stumbled upon the answer. It turns out that in the build of mtools 4.0.10 that ships with Ubuntu 9.10, the option to remove the hidden attribute has changed from -h to -H. Of course, the usage message still says -h and the man page still says -h, but it's -H that actually works. So, basically, I lost an hour of my life because somebody, whether in upstream of the package maintainer in universe, screwed up and forgot to update the documentation.

Anyway, I did my duty and filed a bug report. We'll see if anything comes of it. I'm sure it's not a high priority, though - if the Google results are any indication, I'm about the only person in the world who uses mattrib on a regular basis anymore.

Sansa repair

I finally got around to fixing my MP3 player this weekend. I have a Sandisk Sansa e280 running the Rockbox open-source firmware replacement. Despite being a little light on capacity (8GB internal flash plus 2GB for the non-HC microSD slot), I like it a lot. However, recently the headphone jack had gotten very loose. If I jiggled the jack a little, the sound would cut in and out. After a while, it reached the point where I had to pull the cord at just the right angle to maintain enough contact to listen to anything.

Fortunately, this turned out to be relatively easy to fix. I found some instructions on the abi forum, along with links to pictures. It took a little time, but I got the headphone jack working like new again.

The main problem I had was prying up the plastic headphone jack. The plastic part is only held to the board by the metal contacts, which are soldered on. So you can just lift it off to get to the contacts themselves. However, I didn't want to use too much force to pry up the plastic, lest I break one of the contacts or crack the board. After fiddling around with it for a while, I decided to try the opposite route, taking advantage of the fact that you can see the top of the contact poking through the plastic. So, rather than pulling on the plastic, I held onto the plastic part and held the board up off the table. Then, I pushed down on the top of the contacts with a pin and they slid out without too much effort. So I bent the contacts in a bit and put small pieces of a rubber band behind the to try to prevent them from bending in the future. Then, to get the plastic back over them, I gently pushed on the top of the contacts with a straight screwdriver to guide them back into the channels in the jack.

Worked like a charm! I listened to my Sansa all day today and didn't have the sound cut out once. I was starting to fear I'd have to get a new MP3 player. And while the Sansa View and Sansa Fuze look nice enough, and have high-capacity microSD slots, Rockbox isn't stable on them yet. And frankly, Sandisk's native firmware isn't that great. If nothing else, I just like that Rockbox lets you use both database and file system navigation. Not to mention those handy plugins and the extra media formats.

Have I mentioned I hate computers?

In case there was any doubt, I'm not a hardware guy. Yeah, I can do the basics - put a PC together from parts, swap out components if something goes bad - but it's not an area where I have a lot of experience or confidence.

So what should happen to me last week? Hardware problems galore! It started with one relatively small thing and just snowballed to both the PCs in my house being more or less out of commission.

The first problem was with Sarah's PC. It would occasionally soft-lock (meaning it wasn't completely unresponsive, but wasn't operational either) and need to be rebooted. A quick inspection revealed a bunch of I/O errors. My first instinct was "bad drive", but just to be safe, I figured I'd put the drive in my PC, just to make sure the SATA controller wasn't going bad.

Good thing I did, because after some testing, it looked like it was the controller! On Sarah's PC, heavy disk activity (copying a few dozen gigs of data) always resulted in an error sooner or later. But on my PC, I never saw any problem. I even tried swapping out the SATA cable with one from my box and it didn't make any difference. So I concluded that the problem was the SATA controller.

Meanwhile, some time during this testing, one of the drives on my PC went bad! I'm assuming the problem was in the drive's controller card, because the disk was still spinning up and not making any funny noises, but the system BIOS just wasn't seeing it. In fact, when the drive was connected, the BIOS would hang on detecting it! The worst part was that it was the new 750GB drive I bought just over a month ago! On the up side, I didn't have anything irreplacable on it, and was eventually able to revive it long enough to copy most of the data off (unfortunately I didn't have enough working storage for everything, but I got the stuff I really cared about). Of course I was just past NewEgg's return window, so I had to put in an RMA to the manufacturer.

So fast-forward to this past weekend. The new $20 PCI SATA/RAID controller for Sarah's box came in. I've never dealt with an add-on SATA controller before, but it was dead simple to install - put it in the PCI slot, connect the drive, and you're done. It worked great - for one evening. Then I started seeing more disk errors. This time they were failures from ext3_find_entry() rather than generic I/O errors, but that's still not too helpful. So now I'm back to square one on that.

On top of that, I've now been seeing lock-ups on my PC. Hard locks, too, as in the system goes totally unresponsive and the capslock light starts blinking. That, for the Linux people in the crowd, indicates a kernel panic. This one was a bitch to track down, too, because it was happening randomly as I did things from within X11, but didn't seem to happen on the command line. And since kernel panic output gets dumped to the console, I couldn't see what was going on (because you can't switch from an X display to the console when the system is crashed). So I ended up leaving the system at the console and eventually got a kernel panic again. Turns out it was coming from the USB subsystem somewhere. I still don't know if it's one of my peripherals, my hub, or the USB controller, so I'll have to do some experimenting.

It's weeks like this when I really appreciate the philosophy of technical people who say, "Forget building it, just buy from a system vendor so that you can have it repaired under warranty." Fixing problems like this is sickeningly time consuming and generally not much fun. Especially if you're not a hardware guy.

More laptop fixups

As I mentioned the other day, I recently acquired a hand-me-down laptop. My sister-in-law bought herself a shiny new Dell and gave me her old Compaq Presario R4000 with the dead battery.

So I'm currently in the process of fixing this system up. So far I've just wiped the drive, laid down a fresh install of Windows XP SP3, and installed the drivers and some standard applications. It's actually not a bad little system - Athlon XP-64 processor, 80GB hard drive, DVD burner. Hardly state of the art, but it beats the pants off my old Dell Inspiron B120.

Aside from the battery (which is gonna cost me about $75 to replace), there's only one problem: memory. The system comes with 512MB of RAM, which was fine for the time, but is a little small now. The problem is that the system has two 256MB RAM modules - one of which is under the keyboard, which is really annoying. And they're not especcially cheap modules, either - it takes DDR PC2700 sticks, which go for about $40 per gig on NewEgg. By way of contrast, I recently got another 1GB stick of DDR2 PC5300 to max out the RAM on my Dell, and it only cost me $12 with free shipping.

So I'm debating how much to get now. In better times, I'd just spend the $80 and max out the memory. But times are tough, and it's an old laptop, and I'm already spending $75 to get a new battery. So maybe I'll just stick to 1GB, or perhaps even half a gig. It wouldn't be quite so annoying if they'd just used 1 stick in the first place. As it is, I'm going to lose half the existing RAM if I upgrade either DIMM slot, so I'm not going to get out of this as cheap as I'd hoped.

Either way, it'll still be nice to have another laptop around, so that Sarah and I aren't fighting over the one. And even if I max out the RAM, it's still way cheaper than getting a new system, so it's still a win-win situation.

No more dollar store USB cables

Note to self: no more buying cables at the dollar store.

Last week I was in the local dollar store looking for pocket-sized packages of tissues and lint rollers (because there's no point spending a lot of money on that sort of thing), when I came across some of those retractable USB cables. You know, the kind that have the spring-loaded roll so that they wind themselves back up - kind of like cheap blinds. I probably should have known better, but come on - it was only a dollar!

Anyway, this afternoon I tried using that cable and it didn't go so well. I attempted to use it to connect my 320GB external USB drive to the hand-me-down laptop that my sister-in-law just gave us after buying a new system. I was using SystemRescueCD and PartImage to take a drive image of the original installation - you know, just in case - and the performance was...let's just say "disappointing". More specifically, the estimated time to completion, on a 75GB drive, with about 40GB used and no compression on the image, was around 11 hours. For those with no point of reference, using the same external drive to image my other laptop, which has about 30GB of used disk, takes maybe half an hour.

And what's worse, partimage kept hanging every 5 or 10 seconds, so even that estimate wasn't accurate. I left the laptop to image while we went on a wine tour of Seneca lake this afternoon, and after being gone for about 7 hours, partimage still said it had 6 hours of work left.

So, just to check, I tried it with my regular USB cable and, sure enough, it's running along at 667MiB/min, estimated completion time 55 minutes. It's still running a little choppier than my other laptop, but not too bad.

So I guess this discredits my old opinion that cables are cables and they either work or they don't. Turns out there are different levels of "not working". Like I said, I should have known better.

Well, what was it there for in the first place?

I must be loosing my touch. Either that or I'm going senile. You see, I was always under the impression that you needed to plug in electronics to make them work. But apparently that's not the case.

A couple of months ago, I bought a new USB hub. I'd had my old one for about 5 years and it only did USB 1.1, which meant that using it to transfer large amounts of data to my thumb drive or MP3 player was painful. And due to an oversight in ordering the case for my current system, it only has one front USB port - the one in the memory card reader. So I ordered a nice little 4-port Rosewill USB 2.0 hub. Only problem was, it didn't work.

The wierd thing was, the hub looked like it should be working. The power light on the hub was on. When I plugged my MP3 player into it, it at least detected that it was connecting to something. But I couldn't get my system to detect any USB device I plugged into it - not my MP3 player, thumb drive, gamepad, nothing! They just sat there and udev never even made a device node for them.

So after putting it off for a couple of months (mainly because the only time I ever thought of it was when I was on my way out of the house and needed to dump something on a USB drive), yesterday I finally got sick of it and took a look at the hub. My plan was just to quickly verify that it was, in fact, broken and then just junk it and pick up a new one in Walmart. So I unplugged it, tried it in a different USB port, swapped out the cable - you know, the usual stuff. Well, just on a lark, at on point I decided to try it without plugging in the external power cord. And it worked!

Maybe I just don't know enough about hardware, but I found this bizarre. When I unplugged the hub, it worked perfectly. When I plugged the power cord back in, it stopped working. I have no idea why. Maybe it has something to do with the unreasonably huge converter on the plug - it weighs over a pound, whereas the hub itself is less than three ounces. I don't know if that would cause any problems, but it just doesn't seem right.

I still don't understand why, but at least everything is working now. The plug for my hub is sitting in a box in the closet and my MP3 player is transfering data through the hub. It just feels weird to have fixed the problem by getting rid of the power cord. Sounds like it should be a sign of the apocolypse or something.

Fixing Sansa attributes

As previously mentioned, I have had some file attribute problems with my new Sansa e200 series MP3 player. Basically, when I plugged it in to charge, the "hidden" attribute on various directories on the device's FAT32 filesystem were being changed.

Well, I have now automated the correction of that particular annoyance. With a simple script and udev rule, the attributes are now reset automatically whenever I plug in the device.

The script to change the attributes is as follows:

#!/bin/bash

DEV_PATH="/dev/$1"
export MTOOLS_SKIP_CHECK=1

mattrib -i "$DEV_PATH" +h ::\TMP
mattrib -i "$DEV_PATH" -h ::\MUSIC
mattrib -i "$DEV_PATH" -h ::\PLAYLISTS

Note that this script requires no changes to the mtools configuration. Instead, the -i parameter and the environment variable take care of the stuff we did with .mtoolsrc last time.

To fire this script when the device is plugged in, I added to following to my /etc/udev/rules.d/80-programs.rules file:

KERNEL=="sd[a-z][0-9]", ACTION=="add", ATTRS{model}=="Sansa e2[0-9]0*", RUN+="/home/pageer/bin/sansa-perm-fix.sh %k"

This runs when a new SCSI drive device is added and the model string matches the Sansa e200 series. It then runs the above script, passing it the name of the device, e.g. sdb1.

So, that fixes that. Now I only see the files and directories I want to see in the Rockbox file browser. I consider this a small victory for the picky among us.

My new MP3 player

As I alluded to in my last post, I finally broke down and bought a new MP3 player. In fact, it's the first MP3 player I've bought for myself. Up until now I've been using the MPIO FL100 my parents gave me as a gift 4 or 5 years ago. It's a nice player, but with 128MB of internal storage plus a 1GB SD card, it's been feeling a little cramped. Plus I cracked the screen a few weeks ago, so I fear its days may be numbered.

Sansa and MPIOFor my new player, I chose a SanDisk Sansa e280. I paid $130 for it at New Egg. I chose the Sansa because it received generally positive reviews (some even went so far as to call it an iPod killer), has a color screen, small form-factor, microSD expansion port, and, most importantly, it doesn't require special software to load music.

Hardware-wise, the Sansa e280 comes with 8GB of internal flash storage and a microSD port to allow for extra space. In addition to playing MP3's, it also has an FM radio receiver and a voice recorder. The screen is 1.8-inches and full color, running at 220x176 pixels. It has a mechanical scroll wheel with 4 buttons surrounding it. The controls are a little awkward at first, but you get used to it quickly. On the down side, the Sansa has a non-standard USB port, very similar to the iPod - but not close enough that the plugs are interchangeable.

The Sansa firmware has its ups and downs. Probably the nicest feature is that it includes a metadata database for browsing media. However, rather than requiring special client software to keep the database up-to-date, the Sansa simply auto-generates the database from the media file ID3 tags when it boots. You can just mount the Sansa as a USB mass storage device, copy your files anywhere under its music directory, and they will be detected. On the down side, this means that you may have to wait a minute or two after boot while the Sansa rebuilds the database - it does this in the foreground, so you can't listen to anything until it's done.

My main complains about SanDisk's firmware is that the Sansa's native data formats are fairly non-standard. This means that, unless you use the bundled Windows-only conversion software, it's a pain to use any of the media features other than generic MP3 playing. In particular, while the Sansa supports movies, pictures, and playlists, its native formats are Quicktime, 16 bit-per-pixel bitmap, PLP/PLA respectively. No MPEG or WMV, no JPEG or PNG, and no M3U.

All in all, the Sansa is a good MP3 player out of the box. I like it and I wouldn't hesitate to recommend it to anyone.

But on the other hand, if you're willing to do a little hacking....

One of the reviews on New Egg led me to a project called Rockbox. It's an open-source firmware replacement that runs on a number of MP3 players, including the iPod and the Sansa e200 series. Rockbox is still a work in progress, but the main features are all stable and it is more than usable for every-day purposes.

If you have or want a Sansa, I definitely recommend installing Rockbox on it. Rockbox takes the Sansa from "good" to "exciting." Just take a look at some of the key features. Rockbox offers more music navigation options than the SanDisk firmware, includes an MPEG viewer, a JPEG viewer, M3U playlists, theme support, and assorted games and applications. You can play DOOM on Rockbox, for crying out loud! They have solitaire, Pacman, a Gameboy emulator, a text editor, and a paint program, among others. Of course, the controls for all this are a little awkward, but the point is that using Rockbox over the SanDisk firmware buys you a lot of functionality compared to the little that you lose (mainly WMA support and control through the USB port).

While the Rockbox installation is isn't graphical, it's quite easy: run one interactive command to install the boot loader and then just extract a ZIP archive into the Sansa's root directory. That's it. To remove it, you just re-run to boot loader installer and tell it to uninstall. It's also worth mentioning that installing Rockbox is not an all-or-nothing deal. The boot loader includes a dual-boot feature. By holding the "prev" button during boot, you can boot back into the standard SanDisk firmware.

So if you're searching for good MP3 player, give the Sansa a look. And if you're looking for a great MP3 player, give Rockbox a look.

Editing FAT32 file attributes

Here's a quick and useful tactic for dealing with file attributes on FAT32 drives. I got the idea from this post on the Ubuntu blog

My new MP3 player (which I'll be blogging about when I have more time) uses a FAT32 filesystem. I needed to change the attributes on some of file attributes so that it would show the media folders but hide the system folders. Why I needed to do that is another story. Anyway, the point is that there was no obvious way to do this from Linux and since charging the MP3 player seems to reset these attributes, I didn't want to have to rely on a Windows machine being handy.

After way more Googling than I thought necessary, I discovered that you can do this with good old mtools. The really old-school people in the audience will probably remember them from the days when floppy disks were still in common use. Well, it turns out that they can be used with USB mass storage devices too.

The first step, after installing mtools of course, is to set up a drive letter for your USB device in your ~/.mtoolsrc file. This can be done by adding something like the following:
drive s: file="/dev/sdb1"
mtools_skip_check=1

The first line associates the S: drive letter with the device file for my player. The mtools_skip_check line suppresses errors which, I believe, arise from the fact that this is a USB device, not an actual floppy disk. Either that, or there's something about the FAT that mtools doesn't like, but can still work with.

Once that's set up, I was able to simply use mattrib to change the file attributes and [cdoe]mdir[/code] to show the attribute-sensitive directory listing. The actual commands look something like this:
mdir S:
mattrib +h S:/TMP
mattrib -h S:/MUSIC

Note the use of the S: drive letter to prefix paths on the root of the device. The +h and -h flags turn the hidden attribute on and off respectively. Also note that you can have the device mounted while doing this - mtools doesn't need exclusive access as far as I know.

Eventually, I'll be scripting this so that I can (hopefully) run it automatically after charging my player. Ideally, that script would include some HAL or udev magic to detect the dynamically assigned device node and add that to the mtoolsrc file. When I get around to writing that, I'll post the result.

Multi-monitor goodness

Remember how I said I had dual monitors at my new job? Well, that's not quite true anymore.
new_desk-tn.jpg

That's right: I now have three, count 'em, THREE monitors. This was not by design, but actually came about because one of the other programmers left for a new job. His last day was Wednesday, so we divided up his stuff on Thursday morning. Edwin, our lead developer, moved over to his desk and took his PC and one monitor, while I took the other monitor and moved to Edwin's old desk. So I now have three monitors, a bigger desk, more light, and a more comfortable chair. What I don't have, as you can see from the picture, is real monitor stands. But I'm not complaining.

Setting up three monitors on Kubuntu was a little complicated. Fortunately, Edwin has some experience with tri-monitor setup, so he helped me through it.

The first hurdle was the BIOS. I'm using a dual-port nVidia card for two of them and the integrated Intel card on my motherboard for the third. By default, the BIOS disables the onboard video when it detects an external card, so I had to set the onboard video to always be active. I also had to set the onboard card to be the primary video device. Failing to do that actually caused a kernel panic on boot.

Once both cards were detected, it was just a matter of X configuration. I was able to set up the two monitors on the nVidia card using the nvidia-settings utility. That let me set the relative position and resolution of those two screens and enable Xinerama.

The integrated card had to be added by hand. The final configuration wasn't too hard, though. I added another "Monitor" section (which was actually identical to the other two), another "Device" section using the "vesa" driver and had the integrated card's bus ID, and another "Screen" section for them with the appropriate resolution. After that, I just added this line to the "ServerLayout" section.
Screen 2 "Screen2" LeftOf "Screen0"
The last step was to restart the X server and watch all three screens come to life.

There's only one problem with this: now I'm going to want three monitors at home, but I don't have $500 to drop on that project. Maybe if I can get some used....

Dual monitors rock

Well, it's only been a little a couple of weeks, but I'm already spoiled. You see, at my new job I have dual monitors. And you know what? I don't think I'll ever be able to go back. I'm already trying to figure out how I can talk Sarah into letting me buy another 19-inch widescreen LCD.

The benefit of dual monitors is exactly the same as that of having a bigger single monitor - you can see more things at one time. This leads to greater productivity, as Jeff Atwood has been saying for years. And it's not just opinion and anecdote - studies have shown that increased monitor space can improve productivity by 9 to 50 percent, depending on the task.

For programmers, having an extra monitor is very handy. You can have your IDE full-screen on one monitor and use the other one for testing, documentation, supporting files and programs, and so forth. No more flipping between windows. It sounds like a small thing, but once you've tried it, it really does make a difference.

Of course, setting up dual monitors is naturally trickier than a single monitor. In my case, I'm working with an Nvidia card under Kubuntu 7.04. The setup wasn't too difficult, but there were a few hitches. I simply had to install the nvidia packages from the APT repositories and run the installer from Nvidia's website, which built the kernel modules. However, for some reason the kernel module doesn't work the when it is loaded after boot, but it's fine if you reload it. That makes no sense to me. Plus, it seems to have broken guidance-power-manager. Annoying, but not a big deal since this is a desktop. On the up side, the Nvidia configuration tool works well and is easy to use.

Screw encryption!

On Friday, I said I was finally going to secure my wireless LAN. As you can probably tell from the title of this post, that didn't go so well. As of this writing, I am still running an open system because that's the only configuration I can get to work with all three of my computers.

268023_d-link_switch.jpgI've spent several hours messing with this today, and it's put me in a really foul mood. There was a time when I enjoyed messing around with my system configuration, but I just can't do it anymore. I don't care that much about networking. I have too many other things I want to spend my time on. I just want my damn network to function and not let anyone who drives by eavesdrop on all my traffic. Is that too much to ask?

My upgrade process started with a firmware update to my D-Link DI-524 C wireless router. This update included WPA2 support, which was a nice bonus. So my encryption options were now: nothing, WEP, WPA, WPA2, and something called WPA2-auto. On the down side, it included no additional documentation, so I have no clude what this "WPA2-auto" is supposed to be. But "auto" sounded promising, so I decided to go with that mode.

Turns out this was a bad idea. According to this forum thread, WPA2-auto doesn't seem to work consistently. Unfortunately, I didn't discover this until I had spent a considerable amount of time trying to get my PC configuration right. You see, I was misled because my laptop was able to connect one time while the router was in WPA2-auto mode. That led me to assume that the problem was with my PCs, not the router. Guess I should have Googled first.

So, eventually, I ended up going with plain-old WPA. The client configuration was a bit tricky for this. You see, my laptop uses NDISwrapper, so I could just use KNetworkManager to enter the pre-shared key. However, my desktops both have RaLink cards and use the rt2500 driver. This driver does not use the Linux wireless extensions and hence does not work with NetworkManager. To configure these cards, you need to add some lines to your /etc/network/interfaces file, as described here. It works, but the down side is that it breaks NetworkManager. However, since these are desktop PCs with 1 WiFi card connecting to 1 access point, that's not really a big deal.

While the desktops weren't that difficult (one I got the right router settings, that is), the laptop was another story. I still haven't figured that one out yet. Of course, I was out of energy by the time I got around to it, so I wasn't exactly in peak form.

The laptop has in integrated Broadcom card which, as I said becore, is configured to use NDISwrapper. This means it works with KNetworkManager. However, I couldn't get KNetworkManager to connect to the access point with WPA enabled. I selected the encryption mode, entered the pre-shared key, and then the connection progress bar would hang at 28%. The iwconfig output said that the card was associated with my access point, but I never got an IP address.

My current suspicion is that the laptop is using stale configuration data from my failed WPA2-auto attempt. I had some problem with stale configuration on the desktops too. For those, I just did a /etc/init.d/networking stop and then unloaded the driver module, then reloaded and restarted. That cleared everything up. In this case, however, I'm thinking it's the data stored by KNetworkManager. The only problem is, I have no clue whatsoever where I would look to find out. The interface is really spartan and there's no obvious way to delete stale configurations.

There is still one big functionality question I'm left with: how do I get NetworkManager to centrally configure an access point for all users? Both Sarah and I have our own accounts on the laptop, and I'd really like NetworkManager to automatically detect when our home network is present and connect to the access point at system start-up. I'm thinking there must be a way to do that, but there's nothing obvious in any of the configuration tools.

My wireless insecurity

I have a confession to make: it's 2007 and I still haven't set up any encryption on my wireless router. <Wince>

I know I should. I've known I should since I bought the thing two years ago. Every now and then I think I'll set it up, but then I just never get around to it. There just never seems to be a good time. However, as recent events have shown, even the best of us can have security problems, so it's time for me to get my butt in gear.

The real problem is two-fold. First, I'm a programmer, not a network admin. I know the basics of how networking works, and I can set up a basic home LAN without any problems, but I'm hardly an expert. I also know very little about WiFi, so I don't exactly have a lot of confidence that I'll get it right the first time.

This is a problem because I'm married to a lovely woman with absolutely no interest in geeky computer stuff. She also has a very low tolerance for things being temporarily broken. This goes double for "the internet," since web browsing and e-mail are 90% of what she does. This means that my only window of opportunity to mess with our LAN is when she isn't home. However, I usually have other chores to do at those times, so it never gets to the top of the priority list.

The second problem is technical. I wanted to set up encryption when I first installed my wireless hardware. However, the WiFi cards in my desktops are RaLink 2500 chipsets, and at the time, the drivers had only recently been open-sourced. The upshot is that I started out using beta releases of the community-supported driver and I was lucky to get it working at all. Encryption isn't a high priority when the network interface is just barely functional.

On top of the driver, both the router and my software were little help. My router is a D-Link DI-524 C1, which only included WPA-PSK support in a firmware upgrade (I'll be damned if I'm going to set up a Radius server) and included little to no documentation on it. And at the time I was using Slackware 10 and Xandros 3, neither of which had much in the way of helpful wireless configuration tools. So setting it up would have been a command-line, /etc/*, and vi hackathon of the type for which I have long since lost my enthusiasm

Today, however, I'm using Kubuntu 7.04. It includes a nice, stable RaLink driver and the KNetworkManager utility, which allows you to easily connect to any number of wireless networks. I essentially have no excuse anymore.

So, tomorrow afternoon, I'm going to give it a try. I've already downloaded the latest firmware upgrade from D-Link in preparation. I'll just need to dig out my 25-foot network cable, wire up one of my computers, and go to work. With any luck, it will go smoothly and I'll be done in half an hour. If I'm not so lucky...I may still be running an open network next week.

Desk upgrade

The second half of my latest upgrade arrived from NewEgg today. I ordered two more gigabytes of RAM - one for my desktop, one for my laptop.

As a brief aside, the laptop upgrade was much smoother than I expected. I'd never tried upgrading a laptop, so I wasn't sure how hard it would be. Turns out adding more RAM to my Inspiron B120 was actually pretty easy. I just followed the Dell service manual. The process was pretty much "open up the correct panel, then slide in RAM module."

The desktop upgrade arrived just in time, since I was about to disassemble and move the system anyway. That's because I just finished "upgrading" my computer desk.
My new computer desk
We've consolidated office space, so Sarah and I are now sharing one large desk. Of course, I still have to finish putting the doors and drawers back in and get some keyboard trays, but it's basically done. I built it out of kitchen cabinets and laminate counter. It's a little higher than a normal desk, but it should serve us well. It will also be a lot sturdier than the pre-fab fiber-board desks its replacing.

Reverse DVD pain

While all went well with purchasing that DVD set off eBay, all did not go well with watching it. The first disk didn't play correctly in either of our DVD players. Yet, oddly enough, it was fine in my PC. Isn't that the reverse of how it's supposed to work?

The DVD set is a Japanese release of the first season of Kyo Kara Maoh. It's an all-region disk that has both the Japanese and English dubs. I'd have preferred an American release, but they didn't have any boxed-sets available yet and buying the disks one at a time would have cost at least 6 times as much. The disks came in imaculate condition, with no visible scratches or defects, still in the factory shrink-wrap.

We have two stand-alone DVD players in the house, one for each TV. One is at least 5 years old, the other about 2 or three years old. Both of them displayed the same problem when playing the first disk in the set. During playback, I experienced random pauses, ranging in duration from just a moment to several seconds. The pauses seemed to become more frequent and longer lasting the longer than disk played. However, the pauses did not appear to be due to disk defects, because they never occurred in the same places. In addition, the entire third episode was completely unplayable. The video was garbled and the had frequent pauses and skips, eventually just hanging. And, of course, the menus are seriously messed up and only sort of work.

The weird thing is that when I put this same disk in the DVD-ROM drive on my PC, it plays perfectly. No pauses, no glitches, and both the third episode and the menus are fine. Normally, what with CSS and all, you'd expect it to work the other way, with the PC having problems while the stand-alone appliance works flawlessly. But not this time.

I'm still not sure exactly what the problem is. I've read that newer DVDs can expose bugs in older players. I do know that the DVD is a little wonky, what with having only 1 title, but 48 chapters, not to mention weird subtitle settings. But it seems odd that both players would have the same bug. So far, the all-seeing oracle, a.k.a. Google, has failed to turn up any answers. Does anyone else have any ideas?

Windows has problems with FAT32?

Here's a weird one. For some reason, my Digitalway MPIO FL100 MP3 player can't see files that are copied onto the removable SD card from Windows. But files copied from Linux show up fine. Is it just me, or does that seem a little backwards?

What happened was that I wanted to listen to a few podcasts this morning. I didn't feel like running downstairs to get the SD card out of the MP3 player, and I didn't want to download them from work, so I just dumped the files on my USB thumb drive before I left the house. When I got to work, I whipped out my portable USB SD card reader, copied the files from the thumb drive to the SD card, and slapped the SD card back in my MPIO. I turned the player on, started browsing the playlist and...nothing. The files just weren't there.

My frist thought was that something must have gone wrong. Maybe I disconnected the card too early and the files didn't copy. So I hooked the SD card back up to my Windows XP workstation and checked. Hmm.... The files were definitely there. Were they corrupt? Didn't seem to be. The file sizes looked right and they played in Windows Media Player.

Maybe it was because the card was almost full. It's a 1GB SD card and there were only 6MB left. Maybe the MPIO can't quite address a full gigabyte. So I moved the files I was trying to play off the card, deleted a few old files, and moved the new ones back. OK, now I've got about 50MB free, which has always been enough before. But when I plugged the card back into the MPIO, it was still a no-go.

After a few more unsuccessful variations on this same process, I started to wonder if the problem was with the SD card reader or even Windows itself. After all, this never happened with my internal SD card reader on my home Kubuntu system. So just for the heck of it, I fired up a copy of Kubuntu running in VMware. I plugged in the SD card reader, moved the MP3s off the card, unmounted and remounted, and moved them back on. This time, when I put the card back in the MPIO, it saw the files. I was able to select them in the playlist and they played perfectly.

At this point, the question is: What the hell happened? According to fsck.vfat, the SD card uses a FAT32 filesystem with long filename support and doesn't show any errors. Theoretically, Windows should be able to read and write that with no problems. And it can - but not in a way the MPIO can read. Is there some extension to FAT32 that Windows uses but Linux and the MPIO don't? Is this due to some implementation-specific detail where the MPIO agrees with Linux but not Windows? There's got to be some rational explanation for this. Does anybody have any ideas?

Loading up the iPod

This is going to be a short one, because Sarah and I are on our way out the door. We're taking the weekend to go to the lilac festival. To that end, I finally loaded up basically all the music we have on her iPod.

Is it just me, or are the iPod apps available on Linux a little lacking. I like the iPod integration in Amarok, but there doesn't seem to be a simple and obvious way to say, "Just dump this 10GB directory onto the iPod" or "dump the new files in this 10GB directory onto the iPod."

GTKPod, on the other hand, makes it relatively easy to dump large directories onto the iPod. However, have you seen the user interface? I found it more than a little confusing. For instance, why is the "save" button the one that transfers the files? That just doesn't make sense to me. And neither does the rest of it, frankly.

I guess I'm going to have to do some more research on this iPod stuff at some point. But not today.

DHCP fails on boot in Feisty

On Friday, I upgraded my laptop to Kubuntu Feisty. For the most part, it was uneventful. My only immediate complaint was that this upgrade, too, took 24 hours to complete. There are just too many places where the upgrade tool prompts for user input, so if you walk away, it end up taking 5 times as long as it should.

However, later on, I did find one problem: my wireless network wasn't working. It's an integrated Broadcom BCM4318 which uses the Windows drivers through NDISwrapper. NDISwrapper was still working and the wireless extensions seemed to be functioning properly. Moreover, the interface was up. It's just that it never got an address from the DHCP server.

After some experimentation, it turned out that just restarting the network devices with sudo /etc/init.d/networking restart got things working. Same thing if I did an ifdown and ifup or even manually ran dhclient. Once the system if booted, pretty much any network re-initialization will fix things. It's just on initial boot that I don't get an IP.

KNetworkManager configuration progress
Another thing is that if I use the knetworkmanager to reconnect my wireless access point, I lose my IP again. For some reason, the progress never gets past 28%, the "Activation stage: Configuring device" stage. I suspect there's some relationship, but I really have no idea what it is. I'm not that deep into the bowels of Ubuntu configuration.

The immediate fix was to simply add /etc/init.d/networking restart to my /etc/rc.local. That gets us an IP at login time and keeps Sarah from calling me in because she can't check her e-mail. In the long term, I'd like to figure out what the heck is causing this. There's a bug in Launchpad that looks similar, but I didn't see a fix.

Sabotaging productivity

This week, .NET Rocks had a great interview with Jeff Atwood. Jeff is a really insightful guy and listening to him was as much fun as reading his blog. In fact, this interview inspired me to start listening to other episodes of .NET Rocks. Well, that and the fact that Carl Franklin co-hosts Hanselminutes, which I also enjoy.

One the topics the interview touch on was Jeff's Programmer's Bill of Rights. It enumerates six things a programmer should expect if he is to be productive.

I found this both depressing and comforting. It's depressing because, as Jeff pointed out in the interview, these things are neither unreasonable nor hard to fix. You can basically just throw money at them without putting in any real effort. These conditions should not be widespread enough that anyone needed to bring them up.

pipecat.jpgAs for comfort...well, it's just nice to know you're not alone. I'm currently one of those poor schleps Jeff talked about who's still working on a single 17" CRT monitor, a three year old PC, and sitting in a cubicle right next to one of the network printers. I'm not even within sight of a window and my cube is literally just barely big enough to fit my desk. I write my code in SharpDevelop because my boss won't spring for a visual studio upgrade. Two years ago it was, "Well, we'll wait for the 2005 version to come out instead of buying 2003." This year it was, "We'll wait for the 2007 version to come out instead of buying 2007." And last but not least, despite the fact that we write mostly reporting-heavy information systems, I use the version of Crystal Reports that came bundled with VS.NET because, as crappy as it is, it's the best thing available to me.

I have to agree with Jeff, Richard, and Carl. The message you get from a setup like this is clear: you are not important. We don't value you as a person, we don't value your work, and we're certainly not going to waste money on making your life easier. The net effect is that morale, especially among the more clueful people in my office, is in the gutter. There's misery galore and productivity is next to nothing. But fortunately we work for the government, so nobody notices. And no, that was not a joke.

Sometimes it seems like our environment is tailored specifically to sabotage productivity. It's kind of like the keyboard they put on the laptops that the police use.Keyboard of actual laptop used in police cars I'm the happless IT guy who has to do configuration and maintenance on these laptops, and I can tell you that the only explanation for those keyboards is that I did something really, really terrible in a past life. They're ruggedized keyboards made of semi-hard plastic. The problem is that they're so rugged that it's completely impossible to type on them. You have to use the two-finger method because the keys are too hard to press with your little fingers. Trying to type with any speed at all is completely futile. And yet the cops are somehow expected to type up tickets and accident reports on these things. It's a wonder they even give out tickets anymore. Actually, maybe that was the idea....

I suppose this is what I get for taking an IT job when I really wanted to be in software development. In retrospect, maybe I should have stayed a full-time student that extra semester or two, finished my damned thesis and looked for a job with a real software company. But I thought I needed some experience and this was the best offer I got, so I took it. Unfortunately, I was too inexperienced to know that crappy experience isn't necessarily better than no experience.

Though on the up side, when I took this job is when I moved in with my (now) wife. It also provided the money that paid for that engagement ring. So in some ways this was the right decision. It's just the professional advancement wasn't one of them.

Now I just need to finish my damned Master's thesis and get the hell out of here.

Laptop battery life

battery.pngI finally got around to looking up solution to my laptop power problem. I'd actually never really worried about it, since I almost always use the laptop plugged in, but I read a blog post complaining about battery life under Ubuntu, so I figured I'd look into it.

My Dell Inspiron B120 normally got about an hour an ten minutes on battery. I never actually ran Windows on it, so I have no basis for comparison. However, I'd read other comments about people getting two to three times as much battery life on Windows. For instance, my brother's Inspiron 1501 gets about 3 hours.

The good news is that there's "laptop mode." By flipping on the ENABLE_LAPTOP_MODE setting in /etc/defaultacpi-support, I gained about 20 or 30 minutes.

The bad news is that there's not an awful lot of other tweaking to be done. There are some other tips on the Ubuntu wiki, but I haven't found anything that seems to make a dramatic difference. At least, not anything I can configure with a truly intimate knowledge of the system.

So basically, it seems like we're kind of out of luck for the time being. But I'm not going to complain too loud. I'm just glad all the hardware in the laptop actually functions.

Semi-working OpenGL

After playing around with my /etc/X11/xorg.conf a bit, I seem to have OpenGL sort of working on my new monitor. I should probably still replace my aging ATI Xpert 128 card, but for the time being I can at least play ZSNES at a decent resolution.

The main problem was that my card apparently can't do 1440x900 resolution with 24-bit color. In order to get DRI working with anything above 1024x768, I had to drop down to 16-bit color. That does make things just a little less pretty, but I can live with it. However, even after that, the generated monitor setup still didn't work.

After hacking up my xorg.conf file, I seem to come up with something functional. I've been testing two monitor setups, with corresponding screen setups. The first, named "Generic Monitor," is the monitor section generated by the Kubuntu display configuration tool. It has about 16 modelines and looks oh-so-very important. The second is "Old Monitor," which is my simple, hand-written configuration. It simply has horizantal and vertical refresh rates and two modelines stolen from the other section. Both monitor configurations work for 2D graphics, but I've only been able to get the "Old Monitor" setup to work with DRI. For some reason, when using the "Generic Monitor" setup, the glxinfo command dies with a segmentation fault. Don't ask me why. I was just happy to get both OpenGL and widescreen resolution working at the same time.

Small problem with new monitor

All is not sweetness and light in hardware land. The other day, I discovered a problem with my new monitor. Or, to be more precise, it's a problem with using my old video card with my new monitor. It seems I can't get OpenGL support for my old 16MB ATI Xpert 128 card (Rage 128 chipset) to work in widescreen mode.

It's weird. I can get 3D acceleration no problem when running at 1024x768. But when I switch to the widescreen aspect ration and run at 1440x900, hardware acceleration is just gone. The card is supposed to support resolutions much higher than my monitor can handle, so I'm not sure why this is. I suspect it's the widescreen, as I haven't found anything one way or the other about the card's support for this.

I've looked at the X.org logs, but I don't really know enough about the inner workings of it to make much of them. I suspect it had something to do with the highlighed lines shown below, but I really don't know. I suspect I'll just have to get a new card. It's not like I'm not due anyway.
xlog.png

New monitor

I got my new monitor today.
New HANNS-G 19-inch flatpanel
It's a 19-inch widescreen flatpanel. I ordered it from NewEgg for $170 plus free shipping.

The monitor this replaces is an old 14-inch CRT.
Old DigiView 15-inch CRT
And when I say "old" I mean it - I've been using this monitor for over ten years. I'd been hoping this would break down so I'd have an excuse to replace it, but it never did. I finally ended up overcoming my inherent cheapness and replacing it anyway.

The difference really is like night and day. I can actually sit back in my chair and still read the monitor now. I'm really liking the wide screen, too. I've only used it for a couple hours, I'd say this monitor is probably the best $170 I've spend on hardware.

Isn't SanDisk considerate

Linux has spoiled me. I've gotten so used to things "just working" that I sometimes forget just how miserable the Windows world can be.

That probably sounds weird to some people, but it's true. Granted, lots of hardware vendors and ISVs don't even pretend to support Linux, game companies largely ignore it, and many online services don't seem to be aware of its existence. But there is an up side to that - no malware or crapware.

This was driven home to me he other day when I had to "fix" a user's flash drive. The flash drive in question was a SanDisk Cruzer Micro which the user had purchased to replace his "official" one which broke. The short version of the background is that this user needed a flash drive to work with a system I'll call TCSFOUBTS (pronounced 'ticks-fouts'), which stands for The Crappy Software Foisted On Us By The State (not its real name). Since the "official" keeper of the flash drives had no extras and it would take days or weeks to get a replacement (welcome to civil service), he just bought one on his own.

As with all such cases, this didn't work out well. TCSFOUBTS, being a crappy Widnows application, requires an administrator to set drive letter at which the flash drive will be mounted. However, SanDisk saw fit to include something called U3 on the drive, which adds an annoying systray icon that allows you to install and run software from the flash drive.. This apparently adds a second partition to the drive, which Windows sees as a CD-ROM. Naturally, this is the first partition, so instead of the writable portion showing up as D:, it shows up as E:. Needless to say, TCSFOUBTS was configured to use D:.

The up side is that SanDisk was considerate enough to provide a removal utility for this crapware. It would be better if they didn't include it in the first place, but as crapware purveyors go, this makes them a good citizen. Most of the companies that push this stuff go out of their way to make it difficult to remove. Funny how even annoying things can look good by comparison.

New cell phone goodies

My order of goodies for my new cell phone came in the other day. For about $75 after shipping, NewEgg sent me a Bluetooth headset, a USB Bluetoothe adapter for my PC, and a 1GB microSD memory card.

The funny thing is, the memory card made me feel old, probably because I'd never actually held a microSD card in my hands before. I mean, I remember the days when 1GB was a good size for PC hard drive. Heck, I even remember, when I was a kid, playing Zaxon off a cassette tape on a Radio Shack brand computer that hooked up to the TV. And now we can fit huge amounts of data on a chip that's literally smaller than my thumb nail. How times have changed....

So far, the news is mixed with the new gadgets. The good part is the microSD card. I basically just stuck it in my phone and it created the appropriate directory structure when I accessed it. I was then able to dump MP3s in the card's mp3 directory and my phone is now a music player. I'll review the phone in greater depth in another post.

The Bluetooth headset is Cardo scala-500. It's a hice headset, works perfectly with my phone, and comes with a whole bunch of little add-ons, including a belt clip, car charger, lanyard, and even a clip to hook it onto your glasses. However, I haven't had a chance to use it in an actual conversation yet.

The Bluetooth adapter, a KINAMAX BT-USB, has given me some problems. The good news is that it Kubuntu detected it right out of the box. The bad news is that I'm not entirely sure what to do with it from there.

Part of the problem is probably that I don't have the first clue about Bluetooth. I know it's a wireless communications protocol popular in cell phones and PDS and...that's about it. I certainly don't know what to do once kbluetooth detects my phone and connects to it.

My original purpose in buying this device was actually to access my phone with BitPIM over Bluetooth. However, it appears that isn't as simple as I'd hoped. From what I've read so far, doing that requires setting up an rfcomm device for the Bluetooth connection, which seems to be a non-automatic command-line affair. I also can't get it to work. Or rather, I can get a connection established and the rfcomm device created, but I can't keep it working long enough for BitPIM to actually complete a data transfer. I suspect this will take some research.

CD burning in VMware

Project: Burn a CD in VMware using a Windows guest to a Linux host.
Status: Near total success.

Research on the web led me to believe that it was possible for VMware to let a guest system burn CDs. Perviously, I had attempted this with a Linux guest on a Windows host and met with complete failure. This time, things were different.

On a Linux host, there was really nothing to it. The only configuration required was to set the CD-RW drive's deviceType in the virtual machine's VMX file to "cdrom-raw".

There was one catch, however. It seems that the CD burning wizard built into Windows XP doesn't like working in a VM. When I tried to burn a disc, the wizard was unable to detect any CD in the drive and refused to let me proceed.

The good news is that the other two applications I tested worked without a hitch. I tried burning a data disc with an OEM copy of Nero Express and an audio disc with iTunes. Both worked perfectly. And really, iTunes was the only one I even cared about, so I'd say things worked out pretty well.

Card reader and flash drive

I got the rest of my order from NewEgg today. I ordered an internal multi-card reader and two of the 1GB SD card/mini USB card reader combos. Oddly enough, I got the two SD cards last week, but the three card readers shipped separately from the cards, despite the combo deal.

Anyway, there is good news here. First, the multi-reader, a RosewillRCR-100/101, works flawlessly with Kubuntu. Card inserts are detected correctly and writing is fairly fast, unlike with the reader built into my printer. Now I can fill up that 1GB card for my MP3 player without having to wait forever! This reader also gives me a front USB port, which I had been missing. (Due to an oversight in ordering the parts for my PC, my case has no front USB.)

In fact, it's even better than that. It turns out that my Edgy USB drive problem no longer occurs when I use the new front USB port. Apparently it only happens when I plug the pen drive into my Walmart-special Belkin external hub. I'm not sure why, but it was the cheapest USB hub they had on the shelf when I bought it, so I guess I can't be too surprised.

Keyboard config with keyTouch

As you may recall, yesterday I mentioned that I had some keyboard problems in Edgy. I have now solved them thanks to a little program called keyTouch.

By way of background, I have a Microsoft Natural Multimedia keyboard. It's a very comfortable split-keyboard model with lots of extra internet and multimedia keys. The problem is getting all those extra keys to work under Linux. Many of them are not detected by X.org and, in fact, many are not detected by the 2.6 kernel keyboard driver. So, to make them work, I needed to mess around with the setkeycodes command and xmodmap. Not fun, and I still had problems getting some of them to work.

KeyTouch takes all the pain out of it. My keyboard is supported out of the box and setting actions for the keys is incredibly easy. In fact, the interface is simply a list of the special keys and a choice of pre-set actions or custom commands. It even includes a fairly reasonable set of defaults. In particular, I found the default AMixer command for the volume buttons to be much better than KMix, because the volume display is much smaller and less intrusive. Plus the mute function works with AMixer.

Of course, the down side is that now I need to configure hotkeys in two place - keyTouch for the special keys and KHotKeys for everything else. I also have to run a separate daemon for keyTouch to work. I would much rather have everything in one place, but it's a small price to pay. KeyTouch just plain rocks.

That was easy

The replacement for the laptop keyboard that was destroyed by the cat came in today. It's now installed and working perfectly.

As is often the case, my main problem was getting the damned case opened. I don't know why I always have trouble with that. On more than one occasion, I've spent significantly more time getting the case open than actually working inside it. The last time this happened was with a last-generation Gateway desktop at work. It had thumb screws and a semi-hidden button that you need to push to release the case latch. I spent 20 minutes figuring out how to open the case and less than 5 taking out the PCI card I needed.

Fortunately, a quick Google search yielded a link to the eletronic version of the service manual for my laptop. Once I had that, it was quite easy to find the instructions to get the keyboard out and install the new one. It certainly took a lot less time than sending the system to Dell would have.

And for reference

And now, because I thought it would be nice to have a point of reference for yesterday's low-quality picture (and because I like animal photos), here's a shot from the same zoo, taken at comparable distance with a real digital camera.
Two Siberian tigers

This one was taken with my Canon Power Shot A70. It's not the greatest camera in the world, but it's good enough for me. (I wouldn't know how to use a really good one anyway.) It's 3.2 mega-pixels with an actual optical zoom. By contrast, the digital camera only has software zoom, and only at the lower quality settings.

What I'd really like is to have a digital camera with a telephoto lens and enough speed to capture action shots. However, I don't want to pay that much for a camera (upwards of $500 according to my brother, who is a professional artist), particularly given that I know nothing about photography. And, really, unless you're sickeningly rich and have money to burn, it's silly to spend that much on a camera.

And as long as I'm at it, here's another of my favorite zoo shots:
Giant Flemish rabbit
This is the giant Flemish rabbit we saw in the Toronto zoo. It was keeping the wallaby company. (Seriously, that's what the sign said.) It's hard to tell in the picture, but this rabbit is the size of a small dog, i.e. upwards of 20 pounds. Apparently you can breed them and keep them as pets. Just imagine having the Easter bunny hopping around your living room. How cool would that be?

One MPIO problem down

Tonight I finally sat down and fixed one of the problems with my MPIO software. This was just a small configuration issue and there are still lots of others, but it's better than nothing.

The problem was that, on Kubuntu 6.06, I could only connect to my MPIO FL100 as root. This never used to be a problem.

Turns out that the issue was with hotplug. In particular, it seems Ubuntu Dapper doesn't use hotplug anymore. Apparently everything is done with udev now, so the configuration files under /etc/hotplug/ are no longer used.

The solution? Convert the hotplug script and usermap to udev rules. You can grab the file here and drop it in /etc/udev/rules.d/ to make it work. I just used the libgphoto2 rules file as a template, assigning the MPIO devices to the plugdev group so that regular users can read and write to it.

Now I just have to figure out why I have to unplug the player before I can reconnect, hack the code to support my player's SD card slot, and write a better GUI. On the up side, it gives me a good excuse to brush up on my C and get into KDE programming in C++.

Adding to the MPIO

After having it for around three years, I finally got an expansion card for my MP3 player yesterday. Now it has triple the capacity.

As you may already know, I have a 128MB MPIO FL100 player. It comes with a Secure Digital (SD) card expansion slot. Up until recently, I was too cheap to buy a card to put in it, but while shopping in Target (I love Target), I saw some 256MB Lexar SD cards in the checkout lane. They were only $15 and I had just been thinking about finally getting one, so I couldn't really pass it up.

Unfortunately, the Linux software that I use to access the player (no, it does not work as a USB mass storage device) doesn't support the expansion card for my model. However, there is a simple solution: just use a standard card reader. I was able to copy MP3s onto the card and they were picked up when I inserted it into the player. Yay!

The only problem with this method is that the only SD card reader I have is in my printer, an HP PhotoSmart 7760. It does work, but not as well as I might hope. In addition to being a bit slow, HAL doesn't seem to detect it. The system seems to register the card insert, but no new device node is created. It just uses /dev/sdb, which is created when the system starts up. I'm not sure if that's normal or not, but it is slightly annoying.

But at least everything works. That's really all that's important. Maybe at some point I'll take a look at the code for the MPIO software and see if I can get the external card access working. At the very least, I should look at the KDE-based GUI. It's very non-standard and not particularly easy to use.

Miscellaneous hardware pain

Yay, I can blog again! I was going to post something when I got home, but Time Warner's internet service has been completely unreliable for the last few weeks. It's like having dial-up, but more expensive. I'm going to have to call anc complain, because it's just getting ridiculous.

On a different note, I spent way too much time trying to install my new SATA hard drive last night. I ordered it from NewEgg earlier this week, along with a 1GB flash drive. I thought it would be a quick, painless installation. Just plug the drive into the integrated SATA controller on my motherboard, hook it up with th epower cord adapter, and I'm good to go. Little did I know....

After hooking up the drive, my system wouldn't boot. Heck, it wouldn't even finish detecting the available IDE devices. Even the memory test slowed down to a crawl. It made no sense. I tried fiddling with everything I could think of in the BIOS, but nothing helped.

The breakthrough came when, in desparation, I decided to try out the jumpers on the drive. Initially, I made the really stupid mistake of actually believing the label on the drive that said no jumpers were required. I guess the guys at the hard drive plant were in the mood for a practical joke that day. Anyway, after I set the jumper for 150MB/s only mode, everything worked perfectly.

In other news, I spent half a day at work last week configuring wireless modems for police data terminals. Why they need a Systems Analyst at pay grade 15 (for reference, the assistant IT director is a grade 17) to do boring, repetitive hardware configuration, I don't know. Well, actually I do know, but it would be unprofessional to say. At any rate, all you need to know is that it's boring, repetitive, and time-consuming. Sadly, I didn't know I'd be working on them that day, or I'd at least have brought my MP3 player.

Corollary: don't use udev scripts

Quickly following up on yesterday's tip to newbies, the advent of HAL and volume managers means that you no longer have to do things like mess around with udev scripts to accomplish automounting and such.

See, this is the beauty of HAL. At the system level, all it does is keep an up-to-date list of hardware. That's all. The HAL daemon just tracks when devices are added, removed, or changed and doesn't actually do anything.

All the actual actions are carried out by client applications, such as the desktop volume manager. The beauty of using a volume manager is that it's just a regular program run by a regular user. That means that you can customize things on a per-user basis without even needing root access. You can even run more than one of them if you really want.

So if you're trying to set up auto-mounting or some form of auto-execution, just use your freakin' volume manager. Don't mess around with udev or hotplug scripts. Don't use old solutions like the autorun program or supermount. Just use the HAL solution. And if distribution you use for your desktop doesn't support HAL, then I suggest you change distributions. Handling removable drives no longer sucks in the Linux world and there's no point in suffering when you don't have to.

Newbies: "auto" does not mean auto-mount

Listen up Linux newbies! I'm going to let you in on a little secret: the "auto" and "noauto" options in /etc/fstab don't mean what you think they do.

Why do I bring this up? Because if you frequent forums like LinuxQuestions.org, you've probably seen threads like this one, asking about getting USB thumb drives to auto-mount or not auto-mount. Invariably, somebody suggests adding an "auto" or "noauto" to /etc/fstab.

To an inexperienced user, this might seem like a natural suggestion. "Auto" means auto-mount, so that should do the trick, right? And if you specify "noauto" then the device should not auto-mount. It makes sense and it's easy to do. Perfect!

Unfortunately, the system doesn't work that way. If you read the man page for the mount command, you'll see that the auto and noauto options actually control whether or not the filesystem is mounted when you run the "mount -a" command. This command mounts all filesystems not specified as "noauto" and is typically run on boot to mount your local hard drives and network filesystems.

So, in other words, the "auto" option in /etc/fstab really just means "mount this device on boot." For USB thumb drives, this is pretty useless, as you don't normally have them plugged in when you first boot up. What you want is for the drive to be automatically mounted when you plug it into the system. However, /etc/fstab has absolutely nothing to do with this.

On modern Linux systems, such as Ubuntu, Fedora, or anything released since 2005 (except for Slackware), automounting of removable drives is accomplished through the magical combination of D-BUS, HAL, and a volume manager (which is often integrated into the desktop environment).

The good thing about this setup is that it's highly flexible. D-BUS is a generic message bus and HAL is a generic hardware abstraction layer, so they can handle most any kind of hardware hotplugging, not just USB drives or CDs. It can also work for printers, digital cameras, MP3 players, or what have you. The down side is that it's a fairly complex software stack with lots of dependencies, so if it's not working out of the box, you're pretty much screwed. Sure, you might be able to get them working eventually, but it will probably take some significant knowledge of the system.

So if you want auto-mounting and it's not working, the news is bad. But if you're just looking to turn off the auto-mounting or popping up a file manager or something, the news is good. In fact, if you're using GNOME or KDE, the news is great, because they both have graphical configuration for the volume manager. In KDE, for example, you can set custom actions by the type of media, so you can choose to auto-mount USB drives, but not DVDs, or choose to automatically play audio CDs and video DVDs.

So the lesson for today is: don't worry about the auto and noauto options in /etc/fstab. They don't do anything interesting. And if you're trying to get your USB or other removable media to mount when you insert them, they don't do anything at all.

And, lastly, if you see somebody spreading this myth of "auto" and "noauto" around, call them on it. Correct them and point them to this page. And, if you're a real jack-ass, laugh and mock them for their lack of skillz.

The Laptop Saga: Cut Short

Well, that was easy. The new laptop is up and running with Kubuntu Breezy. What's more, I worked on it for less than two hours and everything I've tried is working perfectly.

So here's the deal. On Saturday morning, my neighbor brought over the box with my new Dell Inspiron B120 in it. It was actually delivered $500 worth of laptop sitting on the front steps, so my neighbors picked up for safe keeping. (Thanks guys!) I was out of town until Sunday night, so I didn't get a chance to play with the new system until this afternoon.

By the way, while I was away, I went shopping for a case and USB mouse. I found a nice, padded case with lots of pockets in Staples for $30 and a Logitech optical mouse for $15. This beats the $44 that Dell wanted for a laptop case.

The install was pretty painless, as usual. It took a little longer than expected, because the battery died half way through the installation. (Apparently they don't come pre-charged.) I could have tried to rescue it, but I figured it would just be faster to plug it into the wall and start again, so that's what I did. After the initial install, everything worked except WiFi. Even the integrated sound works. Of course, I haven't tried suspending it yet, but that's not a huge concern for me at the moment.

Getting the integrated Broadcom WiFi card to work was actually surprisingly easy. I pretty much just had to follow the instruction in the Ubuntu NDISwrapper how-to, and it worked. No compiling necessary! Based on the lspci, the integrated WiFi card was the first Broadcom card on the supported cards list. Basically all I had to do was download the two linked files and follow the directions in the how-to and everything worked. In fact, the process was so easy, the Ubuntu team could probably automate the process. Wouldn't that be sweet?

So, I am glad to report that my quest to put Kubuntu on my laptop was cut short when everything unexpectedly worked. I guess it turns out I didn't need to order those Windows CDs after all. In fact, I wish I hadn't, because not only did I not need the driver disk, the CDs are those OEM restore disks, not real Windows, so they're basically useless for anything except restoring the system you bought them for.

Dell makes me uneasy

Well, I finally did it.  I bit the bullet and bought a laptop.  I just finished ordering an Inspiron B120 from Dell.  It's basically the cheapest laptop they sell, but they were offering $150 "instant savings" plus discounted shipping and no-charge upgrades to half a gigabyte of RAM and an integrated wireless card, so I figured I'd go for it.  

Eventually, I'll be putting Kubuntu on this machine, but I did shell out the extra $10 for the Windows CDs anyway.  If nothing else, they may come in handy for use in VMware.  I'm also not sure how Linux-friendly the WiFi card is, so having Windows around might be useful.  From the research I've done, I'm lead to believe the card is a Broadcom chipset that can be made to work with ndiswrapper (yuck), but I'm not entirely confident in my ability to get that working in a timely fashion.  It doesn't help that the laptop doesn't have any PCMCIA slots, so it's not like I can just get a card to stick in it.  I guess I'll see how it goes.

I have to say that, during the checkout process, I saw a few things that made me uneasy.  First, there was an option on the payment page for paying with two credit cards.  And, when I paid with a single card, there was an option for the daily charge limit.  Now, maybe I'm just cynical (which I am), but does it sound to anyone else like Dell's business model is to sell over-priced computers to people who can't really afford them?  It kind of seems that way to me.

And just to be fair, it's not that Dell's systems are over-priced.  They're actually really cheap.  The base systems are cheap, that is.  It's just the "upgrades" and add-ons that are over-priced.  Then again, it's not like any of the other vendors are any better in that regard.

Powering down...

It's time to turn off Tallgeese and take it apart. "Tallgeese" is the name of my home desktop workstation (and yes, I do have a Gundam Wing naming convention - Sarah's box is "DeathScythe" and the one I built for my mother is "Sandrock"). It's an aging 500MHz K6-III with 224MB of RAM, which is serviceable, but it's painful to program on using anything other than Vim. In fact, even Vim takes a while to start up on it. So, for my birthday last week, I ordered myself an upgrade - one of those new 64-bit Semprons with half a gig of RAM. Not the greatest development system on the face of the earth, but the motherboard has lots of expansion slots and I managed to get away with spending just $215 after shipping and a sound card (I bought a $15 card with a C-Media chipset, because I didn't want to fight with the integrated Realtek piece of crap).

So this will be the last post from the old Tallgeese. Later tonight, I'll finish putting the new system together and, hopefully, make my first post from the Tallgeese II (refer to the anime if you don't get the reference). The remaining old components will probably be put together with what I had left over from Sarah's old PC to make a test server, or possibly an MP3 jukebox. Or maybe both - I haven't decided yet.

Not an automount article

You know what I need to write an article about? Automount. It's a great feature, it's very useful in these days of removable USB drives, and yet nobody seems to know about it.

If you don't know about automount, it's simply a feature whereby you can configure devices to be mounted on demand. So if, for example, you have an NFS share that you only access every once in a while, you can set up automount to handle it and then every time you access the mount point, if the share isn't mount, the system will mount it for you. And after the share is unused for a certain amount of time, it gets unmounted automatically. This magic happens through the combination of the kernel level autofs filesystem and the userland automount daemon.

This is really great for USB thumb drives. You can set it up so that you just stick the drive in a USB port, open it up in a file manager, do your stuff, close the file manager, and after two seconds the drive is cleanly unmounted and you just yank it out. Of course, there can be some complications. For one thing, this doesn't work if you're using a 2.4 series kernel and have multiple USB storage devices. To make this really work, you need udev, which is only supported on 2.6 kernels. That's because USB storage device names are not static - the first device you plug in gets the first available device name. Udev, however, lets the kernel assign static names to particular devices based on things like device serial numbers. Of course, it might be possible to fake this out in a 2.4 kernel by using hotplug and sniffing the output of dmesg, but that's not the easiest or most pleasant way to do things.

I wonder why it is that automount isn't more widely used by Linux distributors? Is it just because they like to handle things on the desktop level rather than the system level? I've heard that many distributions do things like automatically creating icons on the desktop when you plug in a USB stick, but, as a Slackware user, I've never actually seen it. I guess the thinking is that by using D-BUS or hotplug or whatever they use to do that, they can achieve greater flexibility than simply mounting. Maybe they see things like the Windows XP device dialog box as a goal. Although I'm not actually too fond of that feature of XP, I guess it might be useful to people new to computers.

Welcome to LinLog (and the world of WiFi)

Welcome to LinLog, my Linux-related weblog. I've read on web forums that many people keep record of all the tips and tricks they pick up in their adventures with Linux. That's what this is.

Of course, I've been using Linux on my home workstation for five years, but there's no time like the present, right? Plus this is public and in more of a narative format than most people probably use, and I have no intention of describing the minutia of configuration or the basics of UNIX. So maybe that's not such a good reference point.

Anyway, I just recently joined the Wonderful World of WiFi. That's right, I sent NewEgg $120 and they sent me a box with a wireless LAN in it. I would have stuck with wires, but Sarah (my wife) and I just bought a new house, and since her office is downstairs and mine is upstairs, it was either a wireless network or start pulling cable. Needless to say, wireless was cheaper an easier.

So, for my $120 I got a D-Link DI-524 802.11b/g wireless router and two Edimax EW-7128G 802.11b/g wireless LAN PCI cards. I got the D-Link router because most home routers are pretty much the same and it was cheap. The network cards were a different story.

Being a knowledgeable Linux user, I did some hardware research before purchasing my LAN cards. It turns out that driver support for wireless cards under Linux is somewhere between "pretty bad" and "terrible." Most of the in-kernel drivers are for old cards that aren't manufactured anymore, and support for cards with a PCI interface seems to be pretty crumby in general. There's always NDISwrapper, but I like to use native drivers, preferably in-kernel, when at all possible.

So, with the help of Google and this page, I discovered the Ralink RT2500 chipset, which is what the Edimax card uses. It not only has a native driver, but Ralink released the driver under the GNU GPL! Yay, open-sourced drivers! Plus, the Edimax card is listed on the NDISwrapper site as being supported and it was only priced at $26, so I figured it was hard to go wrong.

Well, I got the driver working, but it was a somewhat harrowing experience. See, the RT2500 driver version 1.0.0 has some serious stability problems, particularly on 2.6 series kernels. By "serious stability problems," I mean causes kernel panics when you try to use it. Fortunately, there is also a 1.1beta version, which is fairly stable. Of course, it still causes a kernel panic if I try to use the driver configuration file, which it appears is the only way to enable WPA-PSK support (the iwconfig man page says it doesn't do passphrases), but that's not the end of the world. Maybe I should e-mail the RT2x00 guys about that some time....

One cool thing about this driver is that it actually comes with a Qt-based graphical configuration utility. Unfortunately, it doesn't really do me any good because it works by saving the configuration to the driver config file, which, as I just mentioned, causes my system to crash. Also, for some reason the program segfaults when I try to look at the statistics tab. I don't know why....

So, if you're looking for a wireless card, the RT2500 chipset is definitely feasible. It might not be painless and it definitely won't be as simple as it should be (the configuration utility should work), but it'll work. The RT2x00 developers are hard at work fixing and integrating the drivers, so hopefully things will only get better.