Eduardo Valle’s Blog

Technology, Science, Teaching

Archive for March, 2009

The Quest for Scholarly Tech: Virtualisation

Posted by eduardovalle on Friday, March 27, 2009

As a computer scientist, I find OS monogamy an impossible commitment: I want to use my desktop applications (Microsoft Office, Adobe CS) in Windows but the staple of my experimental work has to be done in some flavour of Unix.

To handle both systems, I have tried all sorts of solutions:

  • a single dual-boot machine;
  • two complete boxes side by side on my desk;
  • two boxes and a single head (one monitor, keyboard and mouse) with a hardware “interface switch” to alternate between the systems;
  • a headless Linux box connected to the Windows system with a SSH shell prompt (giving up Linux’s GUI);
  • a headless Linux box connected to the Windows system using a free version of VNC (prompting the ire of the sysadmin guy — apparently I’ve unwittingly opened some ports I shouldn’t, but he eventually got it figured out).

The dual-boot configuration was, of course, the worst. Using two complete boxes was, surprisingly, the second to worst solution, not only because of that confusing alternation of keyboards and mice, but also because of the impossibility to do “copy and paste” between the systems. With the “interface switch”, there was no keyboard juggling, but no “copy and paste” either. Worse, the switch was quite unreliable, causing video quality issues and an irritating “keyboard-sudden-death-syndrome”  treatable only by reboot.

The “Linux client in Windows” solution was not a bad choice. Actually, I’ve been using it for years, but… there is still the problem of having to use two machines. As soon as I take my laptop from its docking station and quit the building, I am cut off from my Linux half.

Enters virtualisation, a not-so-recent technology (the term was coined in the 1960’s) that has recently gained the status of buzzword because of its potential benefits on grid computing applications. As the name implies, virtualisation is the creation of a virtual machine on the top of which a system is executed. This allows a guest system to run on top of a host system in a controlled, isolated environment — and what is best: the guest and host systems don’t have to be the same!

The possibilities are many:

  • I can run Linux on my Windows box and have my Linux machine just an “alt+tab” away;
  • I can have several Unixes (FreeBSD, Ubuntu, openSUSE, Mandriva, Debian…) to run as I fancy;
  • I can make a copy of the virtual machine’s files before doing potentially disrupting stuff (like installing suspicious software). If something goes wrong, I can easily and completely rollback the machine to its pristine state;
  • I can even run Windows on Windows for the same purpose. I can for example, keep a virtual machine exclusively to open suspicious mail attachments.

Now, for the drawbacks:

Each virtual machine implementation has its quirks. Microsoft Virtual PC does not officially support Linux, Sun’s VirtualBox demands a lot of tweaking to get things running, and VMware Player (my favourite) has no support to create the virtual machines, just to execute them. By the way, all three solutions are free-as-in-beer, but only VirtualBox is (mostly) open source.

As I said, you can’t create virtual machines with VMware Player. To do that, you have to buy another VMware product, VMware Workstation, for about 190 bucks. Or (like me) you can be cheap and look for prêt-à-porter machines on VMware Application Marketplace — I’ve found neatly installed images of most Linux distros.

If you need something more exotic, customised, or… proprietary, there is EasyVMX, an useful website, which creates, for free, an empty virtual machine where you can install the OS of your choice.

VMware does not come with VMware Tools, an optional (but absolutely essential) package which, among other things, enables copy & paste between the host and guest OSs. But this is not deal breaker, as this website has a workaround, and this thread in VMware community says it is legal, but use it at your own risk, or better yet, check it with your favourite lawyer.*

Speaking of lawyers, I’ve found that software licensing for Virtual Machines is prone to hazards. I’ve discovered for example, that my OEM Windows XP license does not allow me to put it in a virtual machine. If you, like me, can’t live without proprietary software, brace yourself for some entertaining EULA deciphering and a few interesting phone chats with the juridical department.

* EDIT 30/03: I’ve found out that VMware has put the vmtools on open source, so this this is one less concern. The package is bundled in some distros (like openSUSE), and it is available at SourceForge.

Posted in technology | Tagged: , , , , , , , , , , | Leave a Comment »

The Quest for Scholarly Tech: Ubuntu

Posted by eduardovalle on Thursday, March 19, 2009

Since the last year of the thesis, I have been in such a hurry, that I haven’t been able to keep up with technology. But now, I have a few spare days and I’m using them to evaluate some new (?) services and software, in my eternal quest for better tools for academic work.

Linux is by no means new software, and I have been using it on and off for more than ten years. During my undergrads, I had already noticed a cult following of the penguin, and nothing was deemed more uncool than proprietary OSs. But having anything Linux-related (including the OS itself) meant downloading the sources and compiling them, which was enough to keep me at bay (I made an exception when I took the subject of Operating Systems, one of the rare occasions when one should be expected to compile an OS kernel). Besides, those were the years of religious wars, the simple mention of the words “Windows” and “Linux” in the same room was enough to spark hours of heated debate, with very low signal-to-noise ratio — not the ideal environment for gathering useful information. At those troubled times, I used to ask my friends, provocatively: “what do you think will happen first: Windows getting stable or Linux getting usable?”

Ironically, I think both (sort of) happened by now. We have been graced with some good Windows crops, like 2000 and XP, which have reached a nice point of stability. And some Linux distributions are almost user-friendly. I don’t think that the old mantra of “Linux (or Unix) on the server, Windows (or MacOS) on the desktop” is completely overthrown, but we are getting there, in both ways.

Specifically, I’ve been evaluating Ubuntu, the famous “Linux for human beings” distribution, which has been around since 2004. I’ve downloaded and installed it last November, and my first impression was extremely positive: installation was a breeze, the interface is pretty, there are lots of GUI-accessible tweaks, and the package management system actually works.

Installation and hardware compatibility has always been the Achilles’ heel of Linux distributions, but it also has been one of the aspects which has most improved. Not all equipment guarantees an equally worry-free process, but the list of supported hardware has also grown dramatically. In my case, the installation, on a 3-year old Dell Latitude D620 laptop, went uneventful. My guess is that if a system is both popular and old enough, people will have their drivers figured out.

The first thing that strikes on Ubuntu is how cute it is. From startup and shutdown screens to configuration applets, everything is design to shield users from the Unix innards. Ubuntu is the first distro I’ve ever seen which has an usable “Start Menu” (instead of the usual everything-but-the-kitchen-sink approach). The system feels easy, inviting exploration and discovery.

Ubuntu's "Start Menu" and Quick launch bar

Ubuntu's "Start Menu" and Quick launch bar

In the best tradition of Linux systems, (almost) everything is customisable, but breaking with tradition, the system is (almost) comfortable to use fresh out of box. That didn’t prevent me from trying-on a bit of everything, tweaking themes, font rendering, keyboard layouts, shortcuts, and everything which was at the reach of a mouse click. At some point I had played so much with the shortcuts, that the system got practically unusable. What to do now? Well, in Ubuntu (courtesy of GNOME) customisation is done by adding files to the user folder, not by modifying existing ones, so, deleting those files (located in the ~/.gconf folder) reverts the system to its pristine virgin state.

Tweaking Ubuntu's GUI

Tweaking Ubuntu's GUI

I was also quite pleased with the package manager, Debian-based distros are the ones which got it right. Or so I’ve heard — and based on the nightmarish experiences I’ve had with Mandriva’s URPMI it is probably true.

Now, for the downsides.

Well, Ubuntu is not Windows, and I have to retrain my “muscle-memory” to new ways of doing things. So far, what I’ve found most difficult to surmount is the difference between the two system’s “US International” keyboard layouts. While Linux’s targets all Latin script languages, Windows’ layout is optimised for Western European ones (which is great for me, who write in English, French and Portuguese). This makes for unexpected results: in Windows if you want to write “do’s” (as in “the do’s and don’ts of laying out keyboards”) you just type [d] [o] ['] [s] and the system, recognising that “s” is not accented in any Western European language, interprets the ['] as an apostrophe. In Ubuntu, you have to type [d] [o] ['] [space] [s], otherwise you’ll get “doś”. Worse, if you want to write “don’t” you still have to type the space after the apostrophe, even if there is no accented “t” in Latin script, otherwise you just get an ugly beep. So far I’ve been unable to circumvent this annoying behaviour — editing the keyboard layout files seems to be useless, it has to do with how the system deals with dead keys.

I’ve got quite a few bugs also. Small ones (no keyboard tweaks involving the Caps Lock key would work properly) and big ones (trying to record sound would freeze the system, no connection to wireless networks). Ubuntu comes with periodic updates, so the big ones have already disappeared, but some of the small ones are still around.

I had to tweak quite a bit with the installed packages in order for the system to work properly. Initially it had both GNOME and KDE installed, but KDE started to conflict with GNOME configuration daemon. Since I don’t use (so far) anything KDE based, I’ve just removed the KDE packages and the problem disappeared. It was much more difficult to figure out that the problems I was experiencing with Eclipse 2.4 and RSSOwl 2.0 were due to an exotic version of the Java Virtual Machine (based on GNU’s GCJ) which came installed on the system. When I removed everything GCJ and kept only Sun’s Java, my life became much easier.

Incidentally, I was somewhat disappointed when I realised that the Eclipse version available via package manager was 2.2 (almost 2 year old by now!), and to install the version 2.4 I would have to go the “Linux way” (download a tar.gz, create a folder, install the icons myself, etc., etc.).

Ubuntu has some small but irritating limitations. One example: the system has no consistent way to tell an application to run minimised (which comes handy when you want something to run on system start up): either the application has its own non-standard option, either it is impossible. Another annoying example is an ugly, loud beep you get every time the system is unhappy with you. This beep is emitted by the legacy “PC speaker” device, not by the modern sound system, so you have no control over volume or muting. Apparently, the only reliable way to disable this is to put the PC speaker on the “black list” of kernel devices, so it won’t be loaded. Not much user friendly.

Those small nuisances are part of the Linux experience, and though surprising on the proprietary software mind-frame, they are a foreseeable result of that Cathedral and Bazaar philosophy. Obviously, a system assembled from so many articulated parts, each the fruit of a different mind, is due to have some small inconsistencies.

In summary I would say that, for a Linux desktop system, Ubuntu offers a nice experience. I don’t think it is already smooth enough for technically unsavvy users, but it is perfect for midbrow amateurs, who know their 0′s and 1′s but are not inclined to spend hours editing text-based configuration files.

Posted in technology | Tagged: , , , , , | Leave a Comment »

Back to Brazil… and to an old research subject

Posted by eduardovalle on Tuesday, March 3, 2009

The lack of recent updates has been result of the end of my Research Internship in France, and all the consequent rush in tying up loose ends there, and setting up new projects here. All this international coming back and forth (how much luggage can one reasonably accumulate in four months?!) will end up killing me.

A good piece of news, though: I’ve passed my qualification for maître de conférences (which basically means that the French government considers me apt to be a teacher/researcher).

* * *

I was in Rio de Janeiro for the Carnaval,  and I’ve had the opportunity to meet Dr. Eustáquio J. Reis from IPEA (the Brazilian Institute of Applied Economics Research), who is coordinating an interesting project to preserve and diffuse the Memory of Brazilian Statistics, using digitisation and the Web as the main tools.

Before I’ve got interested to the subject of high-dimensional indexing, the long term preservation of digital data (and its use to give access to cultural heritage assets) was my main research interest, as my M.Sc. dissertation reveals. So, it was with pleasure that I revisited the subject at an informal lunch, on the picturesque neighbourhood of Santa Tereza. We browsed important questions like file formats, standards for image acquisitions, search tools, the possibilities (and limitations) of character recognition, and the difficult balance between short term access and long term preservation every project has to achieve.

I am looking forward to see the new developments of this project, which concerns a type of cultural asset which is often overlooked, despite its enormous importance: quantitative data.

Posted in blogging, career, science | Tagged: , , , , , | Leave a Comment »