Friday, 15 October 2010

Configuring Portable Ubuntu

I have installed Portable Ubuntu under Windows XP and have been configuring it to run some experiments.

Portable Ubuntu is conceptually like running Ubuntu in a virtual machine, except that the Windows all feel like native Windows windows.

Actually getting it working properly involves a bit of tweaking. Here is a summary of what I have done.

First of all, the default install button on SourceForge doesn't actually point to the full install. You can get it from the folder labeled TRES.

To run, just invoke pubuntu.exe. Start up takes a while -- actually as long as a normal boot sequence. To see the boot messages, single click on the Portable Ubuntu icon in the system tray.

The very first thing I would recommend is to disable the Ubuntu screen saver, otherwise your windows will lock up after a period of inactivity and there's no way to unlock them. You can disable the screen saver in System/Preferences/Screen Saver in the GUI.

Portable Ubuntu comes with Open Office. I am running experiments and have no interest in word processing applications. I saved 366MB disk space by removing Open Office:

sudo apt-get remove openoffice*

The default root password is 123456.

To give Ubuntu access to your drive c:, you need to edit a file in your Windows file system. Go the directory where pubuntu.exe lives, and edit the file config\portable_ubuntu.conf. Add the following line:

shared_folder0=c:\

While you're in that file, you might want to increase the amount of RAM allocated to Linux too. You have to restart your Portable Ubuntu session for these changes to take effect.

On start-up your drive C: should be mounted and available as /media/cofs2.

To enable DNS resolution, inside your Portable Ubuntu session, edit the file /etc/dhcp3/dhclient.conf to specify the DNS servers to use. To use the Open DNS servers, add the following line before the request line.

prepend domain-name-servers 208.67.222.222,208.67.220.220;

On start up I often get an error about not being able to mount the Linux partition. There's extensive discussion and some good solutions on this Ubuntu forum. People offer various partial solutions like dropping into an emergency console during boot up and typing:

mount -o remount /
Then Ctrl-D to exit the emergency console

But these mask the underlying issue: one of the start up scripts has inserted a line containing -e into the /etc/fstab file, which causes mounting of volumes to fail.

I finally resolved this. Portable Ubuntu copies aside your /etc/fstab file and makes its own during startup. Inside Portable Ubuntu you can edit the version it copied aside. It's called /etc/fstab.pubuntu.bak. Remove the line that says -e. Shut down Portable Ubuntu. This will copy back fstab.pubuntu.bak to fstab. Restart pubuntu.exe. Problem solved.

Thursday, 30 September 2010

Emoticons: no noses please

I work on text input for mobile devices, e.g. making it easier to type text messages.

Recently we have been reviewing our support for entering emoticons. In one meeting, I observed that it seems to be more common to type emoticons without noses than with them these days. Since we take an empirical approach to these questions, we thought we'd look at our English web corpus. Sure enough, in the period 2007 to early 2010, the nose-less forms are about four times more common than the nose forms i.e. :) beats :-) and ;) beats ;-).

This is of course a perfectly natural linguistic development: words undergo reduction in form over time. It'd be fascinating to take a finer-grained look at the frequencies.

Wednesday, 16 June 2010

ActiveState Komodo IDE 5.2

I have been using ActiveState Komodo on Windows for almost a year now, mostly for Python development, with some legacy Perl maintenance and Bash scripting.

Komodo is a solid but unexciting IDE. It makes a fair stab at providing contextual information in dynamic languages and does a very good job at flagging syntax errors.

One thing it is really not very good at is multi-monitor support. The various panels and sub-windows are all solidly docked in the parent window and cannot be dragged to a second monitor, which severely impacts how much code you can see at once.

The other not-so-great thing is start up time, which can take the better part of a minute if it's reopening a few dozen very small source files. This is a small complaint since I really only start it after a machine restart and that doesn't happen very often.