Archive for June, 2009

29th June
2009
written by feicipet

Kubuntu is my preferred Linux distro. I’ve pretty much stuck with KDE since my varsity days in 1997 and I’m still a happy KDE camper right now. There’s been ups and downs, not least during the “transition period” when KDE 4.0 first came out, but I’m still firmly in the KDE camp. In contrast, I’ve used several different distros over the years. RedHat, Fedora, OpenSuSE, Mepis, Gentoo… and for the past 3 years I’ve settled on Kubuntu. Not that the rest suck, but at this point of time, I find that Kubuntu saves me the most time in terms of setup, configuration and maintenance. Not that it doesn’t come with its own set of trials and tribulations, but on the whole it still sucks less than any of the other distros I’ve used.

I get plenty of practice doing Linux installation work when I set up machines for my staff. I’ve pretty much got my routine down to a science by now. What follows here is some documentation of how I setup a standard developer’s machine running Kubuntu Jaunty. It’s not a stock install; I pull in several PPAs to get to a reasonably stable and performant desktop configuration. And it’s still far from ideal; even if I’m a daily user of Linux, I’d be the first to bitch about its current state and how I wish things could be better.

To begin, we’ll obviously need the installation CD (duh). By default, I’ll use the 64-bit version ‘cos most of the developer machines in my office are 64-bit capable already. Note that I do have a couple of 32-bit machines still being used and for most part, the instructions here still apply. I pretty much stick to the default install, with the exception of the partition layout, which looks like this:

  • /boot – 150MB
  • / – 15GB
  • swap – 4GB
  • /home – whatever’s left

Yeah, I know what most people are thinking: “you don’t need that much swap on a modern Linux install”. Disk space isn’t really a luxury for me anymore, fortunately. And the automatic partitioning provides a measly 1GB for swap space and I run into errors installing Oracle XE which needs more than 1GB. So, 4GB just to be safe.

After the initial install, reboot the machine and view your shiny new Kubuntu install. ‘cept that it ain’t shiny enough. Let’s spruce it up by giving it an update:

sudo aptitude update
sudo aptitude safe-upgrade

Now, your Kubuntu installation is pretty much usable, but not terribly interesting or entertaining. You can’t play a whole lot of media stuff on it, for one thing. Let’s give the installation a whole lot more bling by adding the Medibuntu repo to it. Just run this simple one liner:

sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list; sudo apt-get -q update; sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring; sudo apt-get -q update

Credit to Medibuntu for this.

With this, it’s time to add more applications to our default install:

sudo aptitude install firefox subversion cvs vim ssh umbrello kdesvn msttcorefonts libmp3lame0 libtunepimp5-mp3 libdvdread4 libavcodec-unstripped-52 flashplugin-installer libxine1-ffmpeg soprano-backend-sesame digikam semantik skrooge basket gimp dia libdvdcss2 w64codecs skype kgpg sun-java6-jdk zsh

That one-liner basically helped us install a host of useful applications such as Skype, most proprietary media support, Firefox, Subversion, Java and then some. Do scrutinize the list to see what applies to you and what doesn’t.

Currently, the stock Kubuntu 9.04 desktop suffers from a serious performance issue. Unusable, basically. To get it up to acceptable levels, you’ll need to following the instructions in the Jaunty Intel Graphics Performance Guide.

The default installation of KDE 4.2 works just fine, I guess, but I like trying out the latest from Seigo and company, so I add on a PPA repo to update to the latest beta release of KDE 4.3 (currently at beta 2 release candidate 2). I’ve also been using the daily builds of Chromium, the opensource project on which Google Chrome is based on. And on top of that, one more browser won’t hurt (I am a web developer, after all).

Edit /etc/apt/source.list and add the following lines:


# KDE backports PPA - for KDE 4.3 beta 2release candidate 2
deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu jaunty main

# Chromum daily builds
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main

# Opera
deb http://deb.opera.com/opera/ stable non-free

After that, do another update and additional install:


sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude install opera chromium-browser

Note that you’d probably get a warning about unsigned repo keys. It’s safe to answer yes and proceed. You might also want to google around for how to get rid of the warnings (I forgot to record that down so can’t recall it for this particular article).

Note that above, I’d already install a package called msttcorefonts, which basically gives me most of the stock Microsoft fonts that comes with pre-Vista versions of Windows. There’s one more Microsoft font that I like to use: Tahoma. The following instructions were copied from Howto Forge. First, I copy the TTF files (tahomabd.ttf and tahoma.ttf) out from any existing Windows installation and place it in the /tmp folder. Then, to install the fonts, I do the following:


sudo mkdir /usr/share/fonts/truetype/custom
sudo cp /tmp/tahoma*ttf /usr/share/fonts/truetype/custom
sudo touch /etc/defoma/hints/custom.hints

Now, edit /etc/defoma/hints/custom.hints and add in the following lines:


category truetype
begin /usr/share/fonts/truetype/custom/tahoma.ttf
Family = Tahoma
FontName = Tahoma-Regular
Encoding = Unicode
Location = Magyar Dutch Spanish Czech Russian English Catalan Slovak Italian Turkish Danish Slovenian Basque Portuguese German Polish Swedish Norwegian French Finnish Greek
Charset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712 ISO10646-1
UniCharset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712
GeneralFamily = SansSerif
Weight = Medium
Width = Variable
Shape = NoSerif Upright
Foundry = Microsoft
Priority = 20
end
begin /usr/share/fonts/truetype/custom/tahomabd.ttf
Family = Tahoma
FontName = Tahoma-Bold
Encoding = Unicode
Location = Magyar Dutch Spanish Czech Russian English Catalan Slovak Italian Turkish Danish Slovenian Basque Portuguese German Polish Swedish Norwegian French Finnish Greek
Charset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712 ISO10646-1
UniCharset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712
GeneralFamily = SansSerif
Weight = Bold
Width = Variable
Shape = NoSerif Upright
Foundry = Microsoft
Priority = 20
end

Finally, run the following commands to register the fonts:


sudo /usr/bin/defoma-font -v register-all /etc/defoma/hints/custom.hints
sudo dpkg-reconfigure fontconfig

16th June
2009
written by feicipet

I choked a bit reading Matt Asay’s Tim O’Reilly: Open-source purists trying to answer the wrong question this morning. And I quote:

Of the formative figures in open source, Richard Stallman, Linus Torvalds, and Eric Raymond loom large. Arguably, however, few have had as much of a disruptive force as Tim O’Reilly, who has helped to create the open-source market and has spent the last six years reshaping it with his seminal “Open Source Paradigm Shift” and other articles.

Now, I know Tim O’Reilly has some pretty strong contributions to OpenSource. And I also know that RMS isn’t exactly the most popular kid on the block in terms of commercial OpenSource. But to say Tim O’Reilly’s contributions are more disruptive than Stallman’s? Torvalds? Seriously, in what context?

After thinking a while, I spotted a pattern in Asay’s claim with others made in the past. Gottlieb Daimler was the dude who invented the automobile. Yet, Henry Ford is far more well-known than Daimler for bringing cars to the masses via the production assembly line. Electricity, while never being “invented”, was studied since the 17th century, yet Edison gets most of the glory for his efforts harnessing the electricity for the masses.

Not to take away anything from O’Reilly, Edison and Ford, but this really stinks of the “what have you done for me lately?” syndrome. Cars are still being used now, so yeah, we appreciate Mr Ford for all he’s done for us. But come 2 decades later and we’re all zipping around on Segways sans wheels, would we still remember him?

Back to OpenSource: O’Reilly cannot be compared to RMS. Or Torvalds. Fine, he’s about on par with ESR in my book. What O’Reilly wrote about reflected what was happening in the real world and where it was headed to. He did not write a roadmap for the evolution of OpenSource in general. To attribute the progress of OpenSource in general to the written journals of an observer like he was the Oracle is simply belittling the entire process. It’s like (dare I say it?) some religious nut claiming that the world and its magical complexity came about just from the “design” of an individual deity.

We all ride on the shoulders of others. Even RMS, Torvalds and other OpenSource luminaries. Before drafting the GPL, RMS was already happily coding the same way he always liked in the academic software community, until the hardware vendors decided that software was more valuable than the pieces of plastic and lead it was driving. I hesitate to compare the contributions of RMS and his predecessors as one could not have happened without the other. The same applies to O’Reilly.

Tags: ,
15th June
2009
written by feicipet

So it seems that Google, the startup that nimbly side-stepped all challenges from entrenched search providers, is a lumbering giant now, unable to update its results as fast as tweets are coming. Rather appropriate that this was published in a newspaper where the term “New York minute” was coined.

One wonders though, what advantages would it bring for Google to be able to index every single online event in real time. Personally, I’d rather that Google spends its R&D dollars continuously improving contextual searches over being able to cover more stuff by the second. It’s good that Bing is getting increased market share (even if it seem to be at Yahoo’s expense); increased competition only brings about more innovation.

And as for expectations that Google (and all other search engines for that matter) should in fact be able to index by the second to be “good enough” for users, the ideal response would be this little rant by Louis CK:

My favorite comment: “How long does it take for the world to owe him something he didn’t know exist 30 seconds ago?”. Touche.

13th June
2009
written by feicipet

Note: As with all opensource projects, Chromium is in a continuous state of change. This article was published on the 13th June 2009. If you are reading this more than 3 months after it was written, you should take everything with a generous pinch of salt and check for updates. Who knows, in 3 months, maybe even my grouses about Firefox do not apply anymore ;)

Edit 2009-07-12: Chromium now supports Flash plugins.


We all owe a debt of gratitude to Mozilla and Firefox. Firefox effectively paved the way for competition in the browser monopoly scenario we had a few years back. Without it, I doubt web applications development would have advanced the way it did.

But I seriously abhor using Firefox right now. On my Kubuntu Jaunty laptop, my CPU utilization bottom-lines at 5-10% on average before firing up Firefox and shoots up to 30-40% after. Its memory issues are well-documented. Typing a URL in the address bar the first time after starting up causes the entire browser to freeze while it pulls up the address history. There have been experiments that show the Windows version of Firefox running faster on Wine than the native Linux versions.

Sad to say, what I have to put up with while using Firefox detracts way too much from the positives that it represents. I want out. I want a browser I can use without having to keep a timer on so that I know when to restart it 2-3 times a day. I want a browser I can middle-click 20 RSS entries in Google Reader in rapid-fire fashion without having it lock up on me.

There are many alternatives. Not many of them work too well. Konqueror has issues rendering sites, especially Google Apps which I use 50% of my online time. Arora slows down when I have more than 5 tabs open, for some reason. Rekonq doesn’t really show the speed that WebKit advertises. I have difficulty setting proxy settings in Midori, which I assume must be set in the global Gnome settings panel, which I don’t have due to me using KDE.

I’ve been hearing many good things about Google Chrome from my partner in work. It’s supposed to be blazing fast running Google Apps (duh, being developed by Google). I’ve been waiting eagerly waiting for the Linux version but no dice so far. Until the announcement on the Chromium blog came out. Alpha warnings be damned, I want it. And right now, I’m typing this blog entry on it.

Responses on the ‘net have been mixed. Practical usability is limited, according to some. For example, a blog commenter said “Honestly…. what can you do with a browser that supports no Flash?“. Well, I guess I don’t spend 90% of my time on YouTube and Yahoo flash games, so I don’t really share his views. I’ve got 15 tabs of various contents open in Chromium running right now and I’m happy with each and one of them. I use it on a daily basis to check mail, edit Google documents, read blogs and basically perform about 90% of the things I’d use a browser for.

Here’s a list of what Chromium in its current state is suited for:

  1. Practically everything related to Google web applications. GMail, Reader, Calendar, Docs etc all work very well. Video chats on GTalk doesn’t work yet.
  2. General surfing as long as you don’t need to view Flash videos. I read a ton of Linux and politics related blogs every day. It’s definitely good enough.
  3. In general, it’s fine for Facebook and all the social networking sites I visit. Just not the Flash bits (which I don’t use anyway).

I wouldn’t use Chromium for:

  1. Obviously, anything that relies on external plugins, as there’s no support for a plugin architecture yet.
  2. Any site that requires HTTP authentication. Auth dialog boxes don’t work yet. The issue has been documented here, help vote for it to be solved, please!
  3. Complicated bookmark management, it’s rather kludgy right now. Importing bookmarks from Firefox works though.
  4. Going through proxies that are authentiated using HTTP auth dialog boxes. I get by this by using Firefox to authenticate against the proxy and then continuing to browser using Chromium. Ugly hack.
  5. Sites authenticated using SSL certificates are defnitely out.

Update: As of 22 June 2009, the daily builds has been supporting HTTP authentication. W00t!

Don’t expect it to be too stable. However, a particular tab crashing due to any issue would just manifest itself in a “Oh Snap!” error message in that particular tab and not bring down your entire browser due to its 1 process per tab architecture, which mitigates the impact of any bugs an awful lot.

So do I still use Firefox now? Well, I still need it for various tasks. Firebug is still essential for web development work. My Trac installations are authenticated using SSL certificates so I have to fallback to Firefox. Yes, I do unwind after work by watching some documentaries on YouTube so I’d need it for that as well. But in general, Firefox has been relegated to serving only 10% of my web browsing needs. I completely understand the fact that Firefox has a superset of features compared to Chrome/Chromium and that contributes significantly to the difference in experience. However, Firefox just doesn’t have a configuration that suits me right now and that’s why I need to shop around for alternatives.

Firefox will continue to be relevant to most of the web browsing world for a long time yet. I don’t expect Chrome to attain larger market share than Firefox in the near term. But it’s seriously looking more and more like its predecessor the Mozilla suite, which was evolved out of existence due to its bloat.