Ubuntu Linux on a Tablet PC

I am currently writing about Ubuntu Linux, and for convenience and interest decided to install it on my Toshiba M400 Tablet. I could have used Virtual PC, but although virtual PC and the like undoubtedly have their place, there is no substitute for a real install if you want to get the full flavour of an operating system.

What follows are a few notes on how the installation went, and a few comments on Ubuntu itself.

Install hassles

Ubuntu usually installs easily, but my scenario was a little unusual. One of the M400’s features is that you can remove the DVD drive and replace it with a second hard drive, and this is how I usually run it. I have Windows Vista installed on the primary drive, and Windows XP on the second drive. I can boot from either one by changing the boot priority in the BIOS.

I didn’t want to tinker with the main Vista drive, so I decided to put Ubuntu on the second drive. This means allowing the Unbuntu installer to repartition the disk, always an alarming prospect. A further complication is that Ubuntu is normally installed by booting from CD, not possible in my case because I had removed the DVD drive.

The solution was to boot from a USB drive. This proved surprisingly tricky. I created what I thought was a suitable installation on a USB stick, but all I got for my trouble was a winking cursor at top left of the screen. I tried again with a different configuration, but I still could not boot. Finally I tried a third USB stick, an old one with a measly 128MB space. It booted fine, so the first lesson is to pick the right pen drive. 

I selected a desktop install, and chose a partitioning scheme. It downloaded the required packages from the Internet and announced a successful installation. The installer offered to modify the boot record on my second (Windows XP drive) to enable booting into any of my three operating systems, and I let it do so.

Problem. After rebooting the laptop reported “Missing operating system”. Worse still, I could no longer boot from the USB stick, which reported Grub Error 22. Not good.

I was saved by a handy boot recovery tool called Super Grub Disk. This started nicely from USB and offered to fix my broken Grub (a Linux boot utility). I let it do its thing, following which I could boot into the Grub menu. Unfortunately the only option that worked was Windows Vista. If I tried to start XP or Ubuntu, I got “Drive does not exist”.

One of Grub’s features is that you can modify the startup parameters on the fly, or access a simple command line. I soon figured out the problem. The auto-generated menu.lst was trying to use a non-existent hd2. In reality, my drives are detected as hd0 and hd1. A few straightforward edits later, I was up and running. I can even boot Vista without fiddling with the BIOS, thanks to Grub’s map command which is able to reverse the drives on the fly.

Better than expected

Ubuntu on this Toshiba exceeded my expectations. Sure, there is no full Tablet functionality with handwriting recognition, although the Tablet pen works as a mouse, which is a good start. Otherwise, most things work. The OS is  stable. The wireless works, the touchpad works, the sound works, USB drives work (of course).

It’s not perfect. No Bluetooth. And the biggest irritant is suspend and resume. This worked once, but crashed on resume the next time I tried it. Hibernate failed too.

There is also something odd about cold booting. The Grub menu works, but you can’t actually see it; the laptop just shows a slightly corrupt Toshiba BIOS splash screen. Do a second, warm reboot, and the menu appears fine. Still, bearing in mind that this is an out-of-the-box install on a laptop designed only for Windows, I think it is a good effort.

Ubuntu vs Windows

Ubuntu is not as polished as Vista or even XP, let alone Mac OS X. The fonts look less good; the apps are (even) less consistent in look and feel, and some still come across as a bit home-made. Nevertheless, there are things that it does better than Windows. I like the Applications menu, which is sorted by type of app – Games, Graphics, Internet, Office, Programming – instead of jumbling everything together in one Programs group. And I love the way Add/Remove programs is integrated into the menu. I wanted to install Audacity, the sound editor. Type Audacity into the search box, check the box when it comes up in the list, click Apply, and seconds later, there it is. I guess this works best in a free software world, but there is no inherent reason why something equally easy cannot work with commercial software; it simply needs an extra step where you take payment, or installation of an upgradable trial version.

A related feature shows up in the command line. Type svn (for the Subversion client) and you get a message:

    The program ‘svn’ is currently not installed. You can install it by typing:
    sudo apt-get install subversion

It reminds me of the advertisement feature in Windows Installer, except that is for application features, whereas this is for entire applications. Further, it is much simpler and more reliable in Linux.

I was interested to note that Mono is installed by default, and MonoDevelop is listed in the package manager, making it easy to get up and running with .NET development if you feel so inclined.

What else is better? Notably, performance. Everything seems quicker. Another thing is workspaces, which let you switch between multiple desktops. I really don’t know why Windows does not surface this feature, which PC Tools for Windows did nicely all those years ago. Windows does have multiple desktops, but it is hidden except in the context of “Switch user”.

Linux is still geeky, but it is getting more user-friendly, especially in Ubuntu. I wish Microsoft had put equal focus on the user in Windows Vista versus XP. I like Vista better than XP, but it could and should be better than it is.

Technorati tags: , , , , ,

IBM Project Zero

Project Zero is an agile web development tool from IBM, using Eclipse, PHP and Groovhy.  Following my comments on its low visibility on IBM’s site, I received an email from Product Manager Joe Lea:

There are now two pieces on developerworks about IBM’s Project Zero. Much more coming shortly…

http://www.ibm.com/developerworks/podcast/dwi/cm-int071007.html

http://www.ibm.com/developerworks/edu/wa-dw-pzphp-i.html

Anyone tried this tool? If so, I’d be interested to know how you find it.

Technorati tags: , , , ,

How many rotting PDO CDs are out there?

Many millions, in my opinion. The reason is that I’ve been ripping CDs to FLAC for a slimserver installation. I came across quite a few CDs showing signs of corrosion, the notorious “CD rot”. Almost all are made by PDO. The problem seems to strike the outer rim of the label side first, which goes golden brown. The brown gradually spreads across the whole side, eventually being clearly visible on both sides of the CD. The affected CDs seem to cover quite a wide time span in date of manufacturer, roughly 1989 – 1994 according to my impressions. Wikipedia says 1988-1993 in a rather good article on the subject – however, it has no estimate of how many CDs were affected.
The good news is that so far all my bronzing CDs still play. Now that they are ripped to a lossless format, at least I have a backup. I presume at some point they will become unplayable.
In a way, I guess PDO has got away with it. Yes, they are faulty CDs, but even a 15 year life is not that bad. By the time they fail in their millions, probably most people will be playing music from files rather than CDs.

Technorati tags: , , ,

In praise of SlimServer

I’ve been playing with SlimServer, the software developed to serve music to the Slim Devices Squeezebox, and I’m impressed. Don’t have a Squeezebox? Read on, because you don’t need one to benefit from SlimServer. In fact, I’ve not yet tried the Squeezebox itself, only the software. SlimServer is written in Perl, and is both free and open source. There are installers for Windows, Mac OS X and Linux.

Here’s how it works. First, you install SlimServer on a PC. It does not need to be particularly powerful, but it does need plenty of disk space, depending of course on how much music you want to store and what format it is in. If you are installing on Linux, you may have the choice between a package specific to your distribution, or one that you download from the Slim Devices site. I installed on Ubuntu using the Debian packages direct from Slim Devices; instructions are here.

Once installed, you can open a web browser anywhere on the network and navigate to http://yourserver:9000, where “yourserver” is the name or IP number of the machine where SlimServer is running. Select Server Settings, and check or amend where SlimServer looks for music files. You can also change the look and feel of the Web UI, using the Interface settings. I use the skin called Fishbone.

Next, copy your music files to the SlimServer. What format should they be in? Most of the common ones will work, provided they are not DRM-protected, but there can be complications depending on what operating system you use for the server, and which player you use. There are two obvious choices: MP3 if you want to use lossy compression to save space, or FLAC if you prefer a lossless format. An excellent feature of SlimServer is that it can transcode on the fly. This means you can store music as FLAC, but play it as streaming MP3, which is better supported.

Personally I like to store music in a lossless format. Even if you think the best lossy-compressed files sound equally good, the lossless format is more future-proof. Let’s say at some future date you fall for a system that requires AAC, or WMA. All you need is a batch file to convert your lossless files, and you are done. By contrast, converting from one lossy format to another quickly degrades the sound quality.

Playing the music

Now you need one or more players on your network. On PCs and Macs you can use Softsqueeze, a Java player with native support for FLAC, MP3, WAV and AIFF. When I first tried Softsqueeze I thought it was fiddly to use, because searching for a song takes ages if you use its virtual remote. That’s because I misunderstood how it works. The best way to control the player is through the SlimServer Web UI. There, you can easily perform searches, scroll through results, and create playlists. Through SlimServer, you can select music, play, pause, skip, and control volume for the player.

What if you have more than one player? No problem, just use SlimServer’s drop-down list to select the player you want to control. SlimServer will happily serve different music to different players simultaneously.

Now imagine you have a real Squeezebox installed in your blissfully computer-free living room. Are you stuck with the fiddly remote? Not necessarily. If you have a wireless device with a web browser, such as a wireless PDA, or the end-of-line Nokia 770 Internet Tablet that is now being sold off cheaply, you can use it as a smart remote. This is where the web UI skins are a great advantage – there is a skin for handhelds, and another specifically for the Nokia 770. Another twist is that you can actually play music directly on the Nokia 770, by using the SlimServer to stream MP3.

Developer? SlimServer is open source and here’s the code. Check out the TCP protocol it uses to communicate with players. At a higher level, you can use one of several APIs. Just install SlimServer, then follow the link to Help – Technical Information. There’s a Web API, a command-line API, and a plug-in API – plenty of scope for customizing SlimServer.

Integration with other media software

This is where it gets a bit ugly. What can you do if you need iTunes for your iPod and iTunes Music store downloads, or if you use Windows Media Center? Can these integrate with SlimServer?

First, buying that DRM-protected music was really a mistake. SlimServer cannot play purchased iTunes music (unless it was one of the few DRM-free tracks), or WMA DRM-protected files.

If that’s not a problem, there are several possibilities. You can point iTunes or Windows Media Center (or Player) at the same shared directory used by SlimServer. This works well for MP3, but FLAC is problematic – iTunes will not play them, WMP needs a plug-in. However, you can use iTunes to manage your SlimServer library. And both iTunes and WMP will play SlimServer tracks streamed to MP3.

Unrealised potential

There is an active SlimServer community, but I think there is unrealised potential here. I’d like to see some more software players, and/or better support for SlimServer in existing music players.

Simply, any device on the network that can play music should be able to play it from your music server. The industry giants seem slow to implement this rather obvious feature. For example, I’ve got Windows Media Center, and a brand new Windows Mobile 6.0 device with a fast wireless connection. Can it play music stored in Media Center? Sorry, no, not without third-party assistance. I can’t even use it as a smart remote for Media Center, at least not without custom coding. SlimServer may be the answer.

MFC not dead – “massive update” planned

Herb Sutter refers to a comment by Bill Dunlap, a product manager for Visual C++, on the future of MFC:

MFC – we are working on a huge update to MFC that should knock your socks off.  I can’t tell you too much right now, but this is closer than you might thing <g>.

Intriguing, since with ATL and then the whole .NET thing, including managed C++ and C++/CLI, I’d assumed that MFC was all-but deprecated.

I can see the value of this for maintaining existing projects, but for new ones? I like this comment by Dan Shappir:

The only reason I can see for doing significant UI development in C++ is for cross-platform support, and in that case I would probably choose Qt.

Actually I can think of a few other reasons, such as performance and compatibility with older versions of Windows, but then again why not use Delphi?

Talking of Delphi, it’s interesting that according to Shappir’s post referenced above, Microsoft’s Visual C++ team had similar feedback to Borland/Codegear:

Damien Watkins, a Program Manager on the Visual C++ team, stated quite frankly that the feedback they have received from C++ developers is that they prefer to use C# for developing managed code for .NET. So what is the new positioning for C++? Apparently it’s:

  • A strong emphasis on developing unmanaged, native applications
  • Tool for achieving interop between existing native code and new managed code

I guess this ties in with renewed investment in MFC.

Technorati tags: , , , , ,

27 steps to download 2 documents – what happened to usability?

Robert Flaming has posted details of the 27 steps it took him to sign up for the Windows Installer 4.5 beta, though in the end he was only able to download two Word documents.

Perhaps it is not quite as bad as it sounds – several steps to get past IE’s download warning, for example – but even so, it is a neat illustration of the torture sometimes inflicted on users who want to accomplish a rather simple task.

How many potential applicants will give up part way through? Quite a lot, I’d have thought. Then again, perhaps this is a test of suitability for the intricate and confusing world of the Windows Installer.

Tip of the day: Robocopy is in Vista

What’s Robocopy? It’s a command-line utility that is part of the resource kit for earlier versions of Windows (so non-Vista users are not left out). It should be called “Sane copy”, because by and large it does the obvious thing, whereas most copy utilities do the non-obvious thing. For example, let’s say you have a directory full of files on your desktop PC, and you want to back them up to another drive. So far, nothing special. A few days later, you want to do the same thing again. Most copy utilities will start asking questions about whether you want to merge folders, overwrite files, and so on. Going through this file by file is impossibly tedious, so you’ll probably ask for the whole lot to be overwritten. Now your very smart computer churns away (if there is a lot to copy) replacing perfectly good existing files with new copies, for the sake of just a few files that have actually changed. What you really want is to copy only those files that have been changed or added.

Enter Robocopy. Open a command prompt and type:

robocopy c:\mysourcedir d:\mytargetdir /e

The /e switch asks for all subdirectories to be copied, even if they are empty. Robocopy will only copy the changed files, and gives you a report showing how many files were copied and how many were skipped.

There is one possible flaw in this arrangement. If you deleted a file from the source folder, then copy it over an existing backup, the target folder will still contain the old file. This might not be what you want, especially if you are a developer and this is source code. Old files hanging around are a bad idea. Robocopy has an answer for this too:

robocopy c:\mysourcedir d:\mytargetdir /mir

This switch asks for targetdir to be a mirror of sourcedir, which means files in the target which no longer exist in the source will be deleted. No fuss. Obviously this presumes that you want them deleted. Disclaimer: don’t blame me if this is not the case.

If you can’t hack the command line, there’s a Robocopy GUI you can download. Follow the link and download the UtilitySpotlight2006 exe at the top of the page. This is a geeky GUI but has some neat time-saving features.

For those with a lot of files to back up – like, say, a 300GB media library – Robocopy or an equivalent is a huge time-saver. It’s actually got a host of additional features that I haven’t mentioned here – why not type:

robocopy /?

and take a look.

Technorati tags: , , ,

Recreating iTunes in Silverlight

Browsing through Codeplex I came across this project to recreate iTunes as a Silverlight application. What’s remarkable is that author Jose Fajardo has kept a kind of developer’s diary on his blog, complete with YouTube videos here, here and here showing how he is recreating Apple’s music app as a Silverlight/Ajax web application.

The videos are not exactly gripping unless you are interested in the nitty-gritty of how to create a control in Microsoft’s Expression Blend and integrate it into a Silverlight application. If you are, then this sort of hands-on demo gives a great picture of real-world use. It’s a also an intriguing example of how to replicate another company’s expensive design efforts with just a few minutes in a suitable tool.

It looks like Fajardo is having a lot of fun with Silverlight, though if he completes the project I’m not sure what Apple will make of it. How’s the DRM piece coming along?

Tafiti: search as a rich internet application

Tafiti is fascinating. Imagine what Google search would look like, if re-designed as a Flash application. This is it, except that it’s Live Search, not Google, and Silverlight, not Flash.

Let’s start with the good stuff. I ran this on a machine without Silverlight installed, and the installation of the plug-in was fast and smooth (though it restarts IE without remembering the open tabs, which is mildly annoying). The Tahiti app looks good and scales nicely. I searched for Silverlight, and results came back fast. You can easily filter the results, or drag and item onto a “shelf” for future reference, and the shelf persists between sessions.

The best feature is a carousel at bottom left. This modifies the search by different types: books, news, feeds, web or images. The layout of the search results changes to match the type of search, so you get book covers and a print-like font for the book search, big headlines for a news search, and so on.

What’s bad about Tafiti? The biggest irritation comes when you actually want to navigate to a site you’ve found. The generic problem here is that you typically want to keep the list of results as well. I normally solve this by right-clicking and opening the site in a new tab. But this is an application, not HTML, so when you right-click you get a single menu option, “Silverlight configuration.” If you left-click it is even worse:

Tafiti is trying to show the site you chose. Please disable your popup blocker to see your selection.

It wants to open the site in a new window, see, and that triggers the popup blocker. Easily fixed with “Always allow popups from this site”, but still a jarring experience.

These are actually minor quibbles. The more fundamental issue is, do you want search as an RIA? The problem is that search is a basic utility. What I want is quick results and easy navigation, never mind the frills, so I will take some persuading. Still, it could work if the application adds real value. Maybe a way of displaying more results on a page, without clutter, or categorising the results in some sensible way. It’s difficult, because attempts to be helpful often end up being counter-productive – and Microsoft is a specialist in over-helpful UIs, sadly.

Despite these reservations, I think Tafiti is a great Silverlight demo, because the technology is nearly invisible. On my system at least, it just works, and at this stage that is what counts for most.

PS: I am not sure what Tafiti is meant to mean, but according to Wikipedia it is a dialect of a Polynesian language and means the strangers, or people from a distance. Perhaps Microsoft is talking about its search market share vs Google?

Update: in the comments here and on the official faq it is said that Tafiti means “do research” in Swahili, and that the app is specifically aimed at “research projects that span multiple search queries and sessions”.

Technorati tags: , , ,