<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Thoughts of a coder &#187; Linux</title>
	<atom:link href="http://www.sandaru1.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sandaru1.com</link>
	<description>It's how I think! It's how I code!</description>
	<lastBuildDate>Sun, 07 Mar 2010 16:07:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ubuntu 9.04(Jaunty Jackalope)</title>
		<link>http://www.sandaru1.com/2009/05/17/ubuntu-904jaunty-jackalope/</link>
		<comments>http://www.sandaru1.com/2009/05/17/ubuntu-904jaunty-jackalope/#comments</comments>
		<pubDate>Sun, 17 May 2009 11:36:41 +0000</pubDate>
		<dc:creator>Sandaruwan Gunathilake</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sandaru1.com/?p=198</guid>
		<description><![CDATA[As you all aware, ubuntu 9.04 has been release on last April. I&#8217;ve been delaying the upgrade for several weeks because of the exams, project, etc. Today, I decided to replaced my ubuntu 8.10 with the new version. There is also an upgrade option which will allow you to upgrade directly from 8.10, however I [...]]]></description>
			<content:encoded><![CDATA[<p>As you all aware, <a href="http://www.ubuntu.com/getubuntu/download">ubuntu 9.04</a> has been release on last April. I&#8217;ve been delaying the upgrade for several weeks because of the exams, project, etc. Today, I decided to replaced my ubuntu 8.10 with the new version. There is also an upgrade option which will allow you to upgrade directly from 8.10, however I have some bad experience with upgrading. So, I decided to go for a fresh installation.</p>
<p>The installation was straight forward. The only major difference was that <a href="http://en.wikipedia.org/wiki/Ext4">ext4</a> file system was available. I created a separate partition for my home directory, and used ext4 for that. So far, I can&#8217;t tell a real difference. The ext3 was working fine, I just installed ext4 to test it out. Ext4 didn&#8217;t give any problems yet, but not any advantages so far either. Installation process finished very quickly and the booting time has been improved (They have finally changed the usplash theme and the GDM theme).</p>
<p>Besides the booting time, the next major feature 9.04 adds is the <a href="http://www.markshuttleworth.com/archives/265">new notification system</a>. This replaces the gtk notification daemon. The new notifications looks really nice, however the spec doesn&#8217;t allow any actions for the notifications. This seems to be a problem because lot of applications are using notifications with actions. It wouldn&#8217;t be a big deal if notifications are just shown without the actions, but instead it shows a dialog box with buttons as actions.</p>
<p>I&#8217;m using two applications which use notifications with actions, <a href="http://www.emesene.org/">emesene</a> and <a href="http://www.nongnu.org/mailnotify/">mail-notification</a>. Mail-notifications doesn&#8217;t have any option to remove actions in the configure box, however there is an option in the gconf settings. You can fire up the gnome configuration editor using &#8220;gconf-editor&#8221; and remove the actions from &#8220;/apps/mail-notification/popups/actions&#8221; key. Emesene uses a plugin called &#8220;LibNotify&#8221; for it&#8217;s notifications. The code for actions can be easily disabled by commentting relevant the code. Comment following lines(lines 231 &#8211; 240) in &#8220;plugins_base/LibNotify.py&#8221; using &#8216;#&#8217; chars.</p>
<pre class="python" name="code">	#if execute == 'conversation':
	#    def on_notify_action(notification, action):
	#        self.controller.newConversation(None, data[0], data[1], True)
	#    notification.add_action('default', 'default', on_notify_action)

	#elif execute == 'mail':
	#    def openMail(notification, action):
	#        desktop.open(self.controller.hotmail.getLoginPage\
	#            (data[0], data[1], data[2]))
	#    notification.add_action('default', 'Open Mail', openMail)</pre>
<p>Other than that, the dropbox daemon was not working initially. I manaully downloaded the propertiary daemon and extracted it to &#8220;~/.dropbox-dist&#8221;. However, even with that dropbox was not starting up properly at boot. It should start automatically with the nautilus &#8211; the extension was loaded properly but it wasn&#8217;t not spawning the deamon. I simply added the &#8220;~/.dropbox-dist/dropbox&#8221; to startup and that sloved the problem (Yes, I know that it&#8217;s not a good hack). I also installed &#8220;<a href="https://ubuntuone.com/">ubuntuone</a>&#8221; which is very similiar to dropbox, but I haven&#8217;t played around it yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandaru1.com/2009/05/17/ubuntu-904jaunty-jackalope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Web Start in 64-bit Linux</title>
		<link>http://www.sandaru1.com/2008/12/24/java-web-start-in-64-bit-linux/</link>
		<comments>http://www.sandaru1.com/2008/12/24/java-web-start-in-64-bit-linux/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 08:01:40 +0000</pubDate>
		<dc:creator>Sandaruwan Gunathilake</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[64-bit]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.sandaru1.com/?p=191</guid>
		<description><![CDATA[If you are using 64-bit linux, you might have found out that jvm 64-bit version doesn&#8217;t have a java web start. (Update: Java Web Start is added to 64-bit package since the version 6u12) I don&#8217;t know any particular reasons for this, however jnlp files seem to be very simple. The jnlp file contains an [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using 64-bit linux, you might have found out that jvm 64-bit version doesn&#8217;t have a java web start. (<strong>Update</strong>: <em>Java Web Start is added to 64-bit package since the version 6u12</em>) I don&#8217;t know any particular reasons for this, however jnlp files seem to be very simple. The jnlp file contains an url to a jar file, which we can download and run separately. I only tried this with <a href="http://www.topcoder.com/tc">topcoder</a> arena &#8211; it works without any problems. Here is a python script for handling simple java web start files.</p>
<pre class="python" name="code">#!/usr/bin/env python

import xml.dom.minidom
from xml.dom.minidom import Node
import os,sys

if len(sys.argv) != 2 :
	print "Usage " + sys.argv[0] + " [jnlp file]"
	sys.exit()

doc = xml.dom.minidom.parse(sys.argv[1])

jnlp = doc.getElementsByTagName("jnlp")[0]
codebase = jnlp.getAttribute("codebase")

resources = jnlp.getElementsByTagName("resources")[0]
jar = resources.getElementsByTagName("jar")[0].getAttribute("href")

application = jnlp.getElementsByTagName("application-desc")[0]
main = application.getAttribute("main-class")
arguments = application.getElementsByTagName("argument")

cmd = ""

for a in arguments :
	cmd += " " + a.firstChild.data

filename = jar.split("/")[-1]

if not jar.startswith("http:") :
	jar = codebase + jar

os.system("wget -N "+jar)

os.system("java -jar " + filename + cmd)</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sandaru1.com/2008/12/24/java-web-start-in-64-bit-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Nautilus Tabs</title>
		<link>http://www.sandaru1.com/2008/07/19/nautilus-tabs/</link>
		<comments>http://www.sandaru1.com/2008/07/19/nautilus-tabs/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 13:53:58 +0000</pubDate>
		<dc:creator>Sandaruwan Gunathilake</dc:creator>
				<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sandaru1.com/?p=149</guid>
		<description><![CDATA[If you are a gnome user, you might have seen the TABs meme in gnome planet during GUADEC. Most of them are crazy mockups and if implemented totally useless(some are really funny). However, nautilus tabs is really useful and have been a long awaited feature. So today, I compiled the nautilus trunk and now I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a gnome user, you might have seen the <a href="http://blogs.gnome.org/cosimoc/2008/07/12/gnome-30-tabs/">TABs meme</a> in gnome planet during <a href="http://www.guadec.org/">GUADEC</a>. Most of them are <a href="http://uwstopia.nl/blog/2008/07/dont-worry-about-all-the-tabs">crazy mockups</a> and if implemented totally <a href="http://uwstopia.nl/blog/2008/07/totem-tab-support">useless</a>(some are <a href="http://www.j5live.com/2008/07/12/d-bus-now-supports-tabs/">really funny</a>). However, <a href="http://www.gnome.org/projects/nautilus/">nautilus</a> tabs is really useful and have been a <a href="http://bugzilla.gnome.org/show_bug.cgi?id=48034">long awaited feature</a>. So today, I compiled the nautilus trunk and now I&#8217;m a happy user of nautilus tabs.</p>
<p style="text-align:center"><a href="http://www.sandaru1.com/wp-content/uploads/2008/07/nautilus.png"><img src="http://www.sandaru1.com/wp-content/uploads/2008/07/nautilus-300x240.png" alt="" title="Nautilus Tabs" width="300" height="240" class="size-medium wp-image-150" /></a></p>
<p>For ubuntu 8.04, I had to compile, <a href="http://ftp.gnome.org/pub/gnome/sources/libgnome/2.23/libgnome-2.23.4.tar.gz">libgnome-2.23.4</a>, <a href="http://ftp.gnome.org/pub/gnome/sources/intltool/0.40/intltool-0.40.0.tar.gz">intltool-0.40</a>, <a href="http://ftp.gnome.org/pub/gnome/sources/gnome-desktop/2.23/gnome-desktop-2.23.4.tar.gz">gnome-desktop-2.23.4</a> and <a href="http://ftp.gnome.org/pub/gnome/sources/eel/2.23/eel-2.23.4.tar.bz2">eel-2.23.4</a> before compiling nautilus svn trunk(svn://svn.gnome.org/svn/nautilus/trunk). </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandaru1.com/2008/07/19/nautilus-tabs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Live iso(distro) without burning &amp; partitioning</title>
		<link>http://www.sandaru1.com/2008/06/23/live-isodistro-without-burning-partitioning/</link>
		<comments>http://www.sandaru1.com/2008/06/23/live-isodistro-without-burning-partitioning/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 19:28:17 +0000</pubDate>
		<dc:creator>Sandaruwan Gunathilake</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[gOS]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[puppylinux]]></category>

		<guid isPermaLink="false">http://www.sandaru1.com/?p=145</guid>
		<description><![CDATA[&#8220;A picture is worth a thousand words&#8221; &#8211; how about a live experience? If you digg around the internet a little bit, you&#8217;ll find hundred of distros lying around. Just like the distro&#8217;s site, explains why they are unique, and provides screenshots, most of those comes with a live CD. You&#8217;ll get a nice iso [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;A picture is worth a thousand words&#8221; &#8211; how about a live experience? If you digg around the internet a little bit, you&#8217;ll find hundred of distros lying around. Just like the distro&#8217;s site, explains why they are unique, and provides screenshots, most of those comes with a live CD. You&#8217;ll get a nice iso image, burn it, run it, and install it if you like. </p>
<p>But it&#8217;s annoying to burn a CD for each distro you are going to try. One option is to use a USB drive. Unfortunately, my USB flash drive is USB1.0 but my motherboard only allows me to boot from USB2.0 devices. Another options is to copy the files into a new partition, and install grub/syslinux on that partition &#8211; but It&#8217;s not a good idea to mess around with partitions.</p>
<p>After experimenting a little bit with the ISOs and grub configuration, I manage to boot the distro, from the file resides in a sub directory of root.</p>
<p><em>Note : I used following commands in Ubuntu 8.10 &#8211; the file locations might be different based on your distribution. </em></p>
<p><a href="http://www.puppylinux.org/">Puppy Linux</a></p>
<p><a href='http://www.sandaru1.com/wp-content/uploads/2008/06/puppy.png'><img src="http://www.sandaru1.com/wp-content/uploads/2008/06/puppy-300x225.png" alt="Puppy Linux" title="Puppy Linux" width="300" height="225" class="aligncenter size-medium wp-image-146" /></a></p>
<p>Puppy linux is a light weighted, very small distro, yet contains most of the important applications for the daily use. In my opinion, this is a nicely designed great distro. My network card and video card worked without giving any trouble, but the sound card failed.</p>
<p>This distro is specially designed aiming towards portable users, who will run the distro in either a USB or a CD. Puppy linux uses squashfs compressed files to keep it&#8217;s root file system, and the init scripts are searching for these files in all hard drives, cdroms, and usb drives. So the installation is really easy. </p>
<p>1. Download the image, and mount it to a directory.</p>
<pre class="code">sudo mount -o loop puppy-linux.iso /media/cdrom</pre>
<p>2. Create a directory in your root partition and copy the files from iso.</p>
<pre class="code">sudo mkdir /puppy
sudo cp -r /media/cdrom/* /puppy/</pre>
<p>3. Modify your grub config file(/boot/grub/menu.lst) pointing to the puppy kernel and initrd file. Here is the menu entry I added, you&#8217;ll have to change the root according to your disk configuration.</p>
<pre class="code">title		Puppy Linux
root		(hd0,0)
kernel		/puppy/vmlinuz
initrd		/puppy/initrd.gz
quiet</pre>
<p>That&#8217;s it &#8211; you can reboot the computer, select Puppy Linux from grub and boot. </p>
<p><a href="http://www.thinkgos.com/">Good OS &#8211; gOS</a></p>
<p><a href='http://www.sandaru1.com/wp-content/uploads/2008/06/gos1.png'><img src="http://www.sandaru1.com/wp-content/uploads/2008/06/gos1-300x225.png" alt="gOS" title="gOS" width="270" height="212" class="alignnone size-medium wp-image-147" /></a> <a href='http://www.sandaru1.com/wp-content/uploads/2008/06/gos2.png'><img src="http://www.sandaru1.com/wp-content/uploads/2008/06/gos2-300x225.png" alt="gOS" title="gOS" width="270" height="212" class="alignnone size-medium wp-image-148" /></a></p>
<p>gOS is a distribution based on ubuntu designed for web 2.0 internet users (Latest version specially aims toward myspace users). I can&#8217;t really see a practicle advantage of using gOS, despite the fact that theming and dock is superb. Other than that, it&#8217;s just firefox bookmarks on desktop(dock).</p>
<p>The gOS root file system is also packed in a squashfs file, but the init scripts are different. So, the installation is bit tricky.</p>
<p>1. Mount the gOS image.</p>
<pre class="code">sudo mount -o loop gos-space.iso /media/cdrom</pre>
<p>2. Then you&#8217;ll need the squashfs file, kernel and the initrd file.</p>
<pre class="code">sudo mkdir /gos
sudo cp /media/cdrom/casper/filesystem.squashfs /gos
sudo cp /media/cdrom/casper/vmlinuz /gos
sudo cp /media/cdrom/casper/initrd.gz /gos</pre>
<p>(Note : You can also extract the squashfs file and make the process simpler, but that&#8217;ll require much more free space.)</p>
<p>3. When we do changes in the OS, we need those to be persistence. So, I choose to save changes on a file. Following commands will create a 500MB file, and format it as a ext3 drive.</p>
<pre class="code">sudo dd if=/dev/zero bs=1048576 count=500 of=/gos/filesystem.ext3
sudo mkfs.ext3 /gos/filesystem.ext3</pre>
<p>4. Now we need to configure the init scripts to use our files for root file system. So, first extract the initrd file.</p>
<pre class="code">cd /tmp
cp /gos/initrd.gz ./
gunzip initrd.gz
mkdir content; cd content
cpio -i < ../initrd</pre>
<p>Now you have the initramfs on /tmp/content</p>
<p>5. We need loop, squashfs, and unionfs drivers. Edit the "conf/modules" file and append following.</p>
<pre class="code">squashfs
loop
unionfs</pre>
<p>6. The default init script will get the "root" kernel parameter and mount it as "/root" in initramfs. We need a script to remount our files. Create a file called gos in scripts/init-bottom and paste the following content. (gedit scripts/init-bottom/gos)</p>
<pre class="code">#!/bin/sh -e
# initramfs premount script for gos

PREREQ=""

# Output pre-requisites
prereqs()
{
	echo "$PREREQ"
}

case "$1" in
    prereqs)
	prereqs
	exit 0
	;;
esac

mkdir /realroot
mount --move ${rootmnt} /realroot
mkdir /sqroot
mount -o loop /realroot/gos/filesystem.squashfs /sqroot
mkdir /extroot
mount -o loop /realroot/gos/filesystem.ext3 /extroot
mount -t unionfs -o dirs=/extroot:/sqroot none ${rootmnt}</pre>
<p>Make the file executable.</p>
<pre class="code">chmod a+x scripts/init-bottom/gos</pre>
<p>7. Create a new initrd file, and replace the old file.</p>
<pre class="code">cd /tmp/content
find . | cpio --quiet --dereference -o -H newc | gzip > ../initrd.gz
cp /tmp/initrd.gz /gos/initrd.gz</pre>
<p>8. Edit your grub config file(/boot/grub/menu.lst) to boot from it. You'll need to change the devices according to your disk configuration.</p>
<pre class="code">title		gOS
root		(hd0,0)
kernel		/gos/vmlinuz root=/dev/sda1 rw quiet single
initrd		/gos/initrd.gz
quiet</pre>
<p>First time we have to boot in the single user mode and configure the system.</p>
<p>9. Before rebooting, we need to create a fstab. To do that, we have to mount our ext3 filesystem.</p>
<pre class="code">mkdir /tmp/gos
sudo mount -o loop /gos/filesystem.ext3 /tmp/gos
sudo mkdir /tmp/gos/etc</pre>
<p>10. Copy the following content into /tmp/etc/fstab. (/dev/sda5 should be your swap partition - check your /etc/fstab)</p>
<pre class="code">unionfs	/	unionfs rw 0 0
tmpfs	/tmp tmpfs nosuid,nodev 0 0
/dev/sda5	none            swap    sw              0       0</pre>
<p>11. Now reboot your computer and select "gOS" from grub. It'll boot into single user mode(called maintenance mode in ubuntu). Once you get into shell, create a user, and configure your X. There are two nice wizards, you can just follow those.</p>
<pre class="code">user-setup
dpkg-reconfigure xserver-xorg</pre>
<p>12. Reboot back to your main OS and edit the grub - simply remove the "single" parameter. (You can also mount the root partition within the gOS single user mode, and change grub)</p>
<pre class="code">title		gOS
root		(hd0,0)
kernel		/gos/vmlinuz root=/dev/sda1 rw quiet
initrd		/gos/initrd.gz
quiet</pre>
<p>Now, reboot and enjoy. This process is obviously bit long, and not perfect. So, if you are going to keep using that distro, I recommend you install it on a separate partition. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandaru1.com/2008/06/23/live-isodistro-without-burning-partitioning/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Freedom of choice&#8230;</title>
		<link>http://www.sandaru1.com/2008/05/09/freedom-of-choice/</link>
		<comments>http://www.sandaru1.com/2008/05/09/freedom-of-choice/#comments</comments>
		<pubDate>Fri, 09 May 2008 01:14:54 +0000</pubDate>
		<dc:creator>Sandaruwan Gunathilake</dc:creator>
				<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sandaru1.com/?p=139</guid>
		<description><![CDATA[&#8220;Every human has four endowments &#8211; self awareness, conscience, independent will and creative imagination. These give us the ultimate human freedom&#8230; The power to choose, to respond, to change.&#8221; &#8211; Stephen R. Covey
Here is a list of choices I made :
Operating System : Linux
There are lot of reasons why you should use linux : easy [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;<em>Every human has four endowments &#8211; self awareness, conscience, independent will and creative imagination. These give us the ultimate human freedom&#8230; The power to choose, to respond, to change.</em>&#8221; &#8211; <strong>Stephen R. Covey</strong></p>
<p>Here is a list of choices I made :</p>
<p><strong>Operating System</strong> : <a href="http://en.wikipedia.org/wiki/Linux">Linux</a></p>
<p>There are lot of reasons why you should use linux : easy access to software, no viruses/adware, fast, possibility of configuring every bit. There is also a long list reasons why you shouldn&#8217;t run linux, which I don&#8217;t agree with most of them, except some great Windows only(may be Mac supported) software like Photoshop; and few drivers.</p>
<p><strong>Desktop</strong> : <a href="http://www.gnome.org/">GNOME</a><br />
Simple elegant interface. Pretty stable.</p>
<p><a href='http://www.sandaru1.com/wp-content/uploads/2008/05/gnome.png'><img src="http://www.sandaru1.com/wp-content/uploads/2008/05/gnome-300x240.png" alt="Gnome Desktop" title="gnome" width="300" height="240" class="alignright size-medium wp-image-142" /></a></p>
<p><strong>Window Manager</strong> : <a href="http://www.compiz.org/">compiz</a> (<a href="http://www.compiz-fusion.org/">compiz-fusion</a>)<br />
Rather than the cool 3D effects, there are some really useful plugins in compiz. For example : Expo, Scale.</p>
<p><a href='http://www.sandaru1.com/wp-content/uploads/2008/05/expo.png'><img src="http://www.sandaru1.com/wp-content/uploads/2008/05/expo-150x150.png" alt="Expo Plugin" title="expo" width="150" height="150" class="alignnone size-thumbnail wp-image-140" /></a> <a href='http://www.sandaru1.com/wp-content/uploads/2008/05/scale.png'><img src="http://www.sandaru1.com/wp-content/uploads/2008/05/scale-150x150.png" alt="Scale Plugin" title="scale" width="150" height="150" class="alignnone size-thumbnail wp-image-143" /></a></p>
<p><strong>Web Browser</strong> : <a href="http://www.mozilla.com/firefox/">Firefox 2</a><br />
Firefox 3 has some great fixes on critical bugs like memory leaks, but there is one flaw. Some of the plugins I&#8217;m using are not available/stable for Firefox 3. So, I&#8217;ll stick to Firefox 2 for few more months.</p>
<p><strong>Mail Client</strong> : <a href="http://www.mozilla.com/thunderbird/">Thunderbird</a><br />
I&#8217;m not a heavy user of the desktop mail clients. I only use thunderbird for one of my mail accounts. There is no specific reason I&#8217;m choosing thunderbird over <a href="http://www.gnome.org/projects/evolution/">evolution</a>, just like the interface.</p>
<p><strong>IM</strong> : <a href="http://www.pidgin.im/">piding</a> / <a href="http://emesene.org/">emesene</a><br />
Pidgin is one of the best multi protocol IM clients available in linux(<a href="http://kopete.kde.org">kopete</a> is also nice). Depicts the fact it supports many protocols, that&#8217;s only basic features. Most of my friends are using MSN network, and emesene is capable of handling those, and thousand times better than the crappy <a href="http://www.amsn-project.net">aMSN</a> interface.</p>
<p><strong>VOIP</strong> : <a href="http://www.skype.com/">Skype</a><br />
Just one word : clear</p>
<p><strong>IRC</strong> : <a href="http://www.xchat.org/">xchat</a><br />
Nice interface. </p>
<p><strong>File Transfer (ftp/sftp)</strong> :  <a href="http://filezilla-project.org">Filezilla</a>/<a href="http://en.wikipedia.org/wiki/GVFS">GVFS</a><br />
If I&#8217;m using a separate client for file transfer, that would definitely filezilla, but it&#8217;s much easier to mount the shares directly using GVFS and use it like a local directory.</p>
<p><strong>Word Processing</strong> : <a href="http://www.abisource.com/">abiword</a><br />
It&#8217;s a light weighted, really fast word processor. Even though it&#8217;s light weighted, all necessary features are there.</p>
<p><strong>Graphics</strong> : <a href="http://www.adobe.com/products/photoshop/">Adobe Photoshop</a><br />
Yes, Adobe Photoshop, that&#8217;s the best I&#8217;ve ever seen. I never got along with gimp. Anyhow, I rarely mess with graphical stuff, yet I still miss Photoshop.</p>
<p><strong>Text Editor/IDE</strong> : <a href="http://www.gnome.org/projects/gedit/">gedit</a><br />
Simple, clean interface and have syntax highlighting. I can survive without an integrated debugger. </p>
<p><a href='http://www.sandaru1.com/wp-content/uploads/2008/05/gedit.png'><img src="http://www.sandaru1.com/wp-content/uploads/2008/05/gedit-300x240.png" alt="GEdit" title="gedit" width="300" height="240" class="alignnone size-medium wp-image-141" /></a></p>
<p><strong>Video Player</strong> : <a href="http://www.mplayerhq.hu/">mplayer</a>/<a href="http://www.videolan.org/vlc/">vlc</a><br />
Those will play almost anything.</p>
<p><strong>Audio player</strong> : <a href="http://banshee-project.org">banshee</a><br />
Banshee has a nice audio library management features. Similar artists + cover info rocks.<br />
Worth mentioning : one of the best media library management softwares I&#8217;ve seen is <a href="http://www.microsoft.com/windows/windowsmedia/players.aspx">Windows Media player</a>.</p>
<p><strong>Twitter Client</strong> : <a href="http://live.gnome.org/DanielMorales/Twitux">twitux</a><br />
Very stable, with many features. <a href="http://www.twhirl.org">twhirl</a> is stunning, but adobe AIR still doesn&#8217;t support tray icons on linux.</p>
<p><strong>File Sharing</strong> : <a href="http://en.wikipedia.org/wiki/BitTorrent_%28protocol%29">bittorrent</a><br />
The content is reliable &#8211; well you have to read the comments.</p>
<p><strong>Torrent client</strong> : <a href="http://azureus.sourceforge.net">azureus</a><br />
Many features + plugins. I&#8217;m using the webui plugin, with auto start init script. (If you are curious, there is a azureus command line option : &#8211;ui=console)</p>
<p><strong>Email Service</strong> : <a href="http://www.gmail.com/">gmail</a> / <a href="https://www.google.com/a/">Google apps</a><br />
It&#8217;s the cool ajax interface. The usage of conversations instead of individual mails is also remarkable. I&#8217;m using google apps to handle my gunathilake.com domain.</p>
<p><strong>RSS Reader</strong> : <a href="http://reader.google.com/">Google Reader</a><br />
Easy to use. Rather than a desktop RSS client, I can access it from anywhere. When I&#8217;m at somewhere with an internet connection killing time, I always have something to do. The sharing feature is handy too.</p>
<p><strong>Photo sharing</strong> : <a href="http://picasa.google.com/">Picasa</a><br />
It&#8217;s the desktop application &#8211; It&#8217;s easier to upload.</p>
<p><strong>Blogging platform</strong> : <a href="http://www.wordpress.org/">wordpress</a><br />
Wordpress is a solid, easy to use platform. From a developers point of view, it&#8217;s internal structure is amazing. </p>
<p><strong>Bookmarking</strong> : <a href="http://www.foxmarks.com/">foxmarks</a><br />
I tried to use social bookmarking sites like <a href="http://del.icio.us/">del.icio.us</a>. But I don&#8217;t bookmark much, so I just use the firefox builtin bookmarking. I don&#8217;t want to experience losing my bookmarks again, that&#8217;s why I&#8217;m using foxmarks.</p>
<p><strong>Web Developer plugins</strong> : <a href="http://www.getfirebug.com">firebug</a> / <a href="http://addons.mozilla.org/firefox/addon/60">web developer toolbar</a><br />
Just check the plugins &#8211; you&#8217;ll see.</p>
<p><strong>Virtualization</strong> : <a href="http://www.virtualbox.org/">VirtualBox</a><br />
I&#8217;m using VirtualBox to access IE to test sites. VirtualBox has nice integration features like free mouse.</p>
<p><a href='http://www.sandaru1.com/wp-content/uploads/2008/05/virtualbox.png'><img src="http://www.sandaru1.com/wp-content/uploads/2008/05/virtualbox-300x240.png" alt="VirtualBox" title="virtualbox" width="300" height="240" class="alignnone size-medium wp-image-144" /></a></p>
<p><strong>What I read</strong><br />
Except reading my friends blogs, here are few feeds from my RSS reader.</p>
<ul>
<li><a href="http://www.techcrunch.com">Techcrunch</a> &#8211; I believe they have spies all over the world. Anything related to startups, it&#8217;s over there. Easy to keep track of what&#8217;s happening on the internet.</li>
<li><a href="http://www.linuxtoday.com/">Linux today</a> &#8211; Everything related to linux/open source</li>
<li><a href="http://planet.gnome.org">Gnome planet</a> &#8211; Some nice content over there, related to gnome.</li>
<li><a href="http://www.readwriteweb.com">ReadWriteWeb</a> &#8211; This is like techcrunch. Techcrunch gives you more news, this will give you analysis/comparisons.</li>
<li><a href="http://www.smashingmagazine.com">Smashing Magazine</a> &#8211; A source to get inspired &#8211; collections of creative work all over the internet.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sandaru1.com/2008/05/09/freedom-of-choice/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gnome Online Desktop</title>
		<link>http://www.sandaru1.com/2008/04/13/gnome-online-desktop/</link>
		<comments>http://www.sandaru1.com/2008/04/13/gnome-online-desktop/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 11:49:12 +0000</pubDate>
		<dc:creator>Sandaruwan Gunathilake</dc:creator>
				<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.sandaru1.com/?p=135</guid>
		<description><![CDATA[Few years ago, the internet is mostly used for information and emails. Over the fast few years, it has changed a lot. Recently(around last two years), the desktop applications started to consume the power of web. Since then, some platforms yet not much popular emerged, like Mozilla Prims, Adobe AIR.
But as for today, generally, the [...]]]></description>
			<content:encoded><![CDATA[<p>Few years ago, the internet is mostly used for information and emails. Over the fast few years, it has changed a lot. Recently(around last two years), the desktop applications started to consume the power of web. Since then, some platforms yet not much popular emerged, like <a href="http://wiki.mozilla.org/Prism">Mozilla Prims</a>, <a href="http://www.adobe.com/products/air/">Adobe AIR</a>.</p>
<p>But as for today, generally, the online applications and desktop are separated. <a href="http://live.gnome.org/OnlineDesktop">Gnome Online Desktop</a> tries to bridge the gap between those two.</p>
<p>This weekend, I gave it a trail run. Here it goes :</p>
<p><strong>Installation</strong></p>
<p>I installed the system on Ubuntu Gusty, which doesn&#8217;t have online desktop is repositories (I think only fedora have them). So, I had to build from the sources. I followed <a href="http://live.gnome.org/OnlineDesktop/Jhbuild">the building guide</a> they have given on using jhbuild. </p>
<p>Then, I installed <a href="http://live.gnome.org/JhbuildDependencies/Ubuntu">gnome dependencies for ubuntu</a>. There were problems with the installation. &#8220;<strong>gtk-doc</strong>&#8221; was not there. So, I just ignored it and installed other packages. Then, there was a conflict between &#8220;<strong>libxul-dev</strong>&#8221; and &#8220;<strong>xulrunner-1.9-dev</strong>&#8220;. &#8220;<strong>apt-cache show libxul-dev</strong>&#8221; indicated that version is &#8220;1.8.x.x&#8221;, so I only installed &#8220;<strong>xulrunner-1.9-dev</strong>&#8220;.</p>
<p>First, I installed jhbuild from repositories(<strong>sudo apt-get install jhbuild</strong>). Then, created the .jhbuildrc file as it says, and tried the command. But it started to complain about a &#8220;<strong>lib_packages</strong>&#8221; variable. I googled for it, and the first hit was from the same page. Apparently, the wiki page have been updated very recently, and the script has been changed(to non-working version). So, I edited &#8220;.jhbuildrc&#8221; file, and removed &#8220;<strong>addpath(&#8216;PYTHONPATH&#8217;, os.path.join(lib_packages, &#8216;gtk-2.0&#8242;))</strong>&#8221; line. Now, jhbuld is working fine, but for the obvious reasons, apt-getting from ubuntu, doesn&#8217;t install the &#8220;online-desktop&#8221; module. So, I removed it, and got the jhbuild from gnome SVN.</p>
<p>Now, it started to build 101 packages. Normally, if I was emerging in gentoo, I would go for a tea, have a nap and come back later. But since I ignored &#8220;<strong>gtk-doc</strong>&#8221; and &#8220;<strong>libxul-dev</strong>&#8220;, I knew those two would fire back later. After going through many packages, it complained about the gtk doc. By analyzing the error message, I managed to install &#8220;<strong>gtk-doc-tool</strong>&#8220;, and it continued. Then again, some xul errors popped up. It was complaining that some &#8220;idl&#8221; files are missing. Going through &#8220;<strong>/usr/share/idl</strong>&#8221; revealed that both &#8220;unstable&#8221; and &#8220;stable&#8221; are installed, thus those are in sub directories. Once I moved to &#8220;<strong>/usr/share/idl/xulrunner/unstable</strong>&#8221; to &#8220;<strong>/usr/share/idl/xulrunner/</strong>&#8220;, and done same with the &#8220;<strong>/usr/includes/xulrunner/unstalbe</strong>&#8220;, it worked fine and compiled all packages. Then, I followed the rest of the guide, and logged out(I created the session &#8220;.desktop&#8221; on &#8220;<strong>/usr/share/xsessions/</strong>&#8221; instead of &#8220;<strong>/etc/X11sessions</strong>&#8220;). </p>
<p><strong>Login In</strong></p>
<p>I crossed my fingers, and logged into the gnome online desktop session. Gnome startup splash was followed by the bug-buddy saying mugshot crashed. I just ignored it, and continued. The sidebar said I&#8217;m &#8220;nobody&#8221; and firefox started with the session. Then, I clicked &#8220;enable online desktop&#8221;, and it took me to &#8220;<a href="http://online.gnome.org/">online.gnome.org</a>&#8221; which I successfully logged in. But the desktop still says, I&#8217;m &#8220;nobody&#8221;.</p>
<p>I suspected this might be related to mugshot, so I ran mugshot from terminal again. This time, it ran without any problems. Then, I close firefox, and went through the login process again, but it&#8217;s the same results. After going through some files, I found there is a firefox extension, and that was not installed. There was a shell script called &#8220;firefox-update.sh&#8221;, but running it didn&#8217;t help, instead it created some broken symlinks. Then, I created a symlink manually to &#8220;<strong>od/lib/mozilla/extensions/ {longstring}/firefox@mugshot.org</strong>&#8221; in &#8220;<strong>/usr/lib/firefox/plugins</strong>&#8220;. Then, the extension loaded, but still it&#8217;s the same results.</p>
<p>Then, I killed few hours with mugshot-client and bigboard source code, but didn&#8217;t come up with anything. The last chance was thinking that something is wrong with gconf settings. So, I logged out, created a new user, and logged back in. </p>
<p><strong>Playing Around</strong></p>
<p><a href='http://www.sandaru1.com/wp-content/uploads/2008/04/desktop.jpg'><img src="http://www.sandaru1.com/wp-content/uploads/2008/04/desktop-150x150.jpg" alt="" title="desktop" width="150" height="150" align="left" style="margin-right:10px" /></a> Mugshot crashed as usual at the startup, but then I ran it again it gave a black and white tray icon. It was a long shot, but I was lucky! Online authentication worked. The problem with my used account must be either mozilla settings or dbus settings.</p>
<p>However, mugshot icon turned into purple and suddenly it crashed(Just after I logged in from web interface). So, I saved the bug report, and started to play around a little bit. The sidebar downloaded my information(name,photo,online services) from the gnome online account and displayed those, but I already know those <img src='http://www.sandaru1.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Of course those are useful as much as bookmarks. Then, the &#8220;recent documents&#8221; from places menu is moved to sidebar. That&#8217;s a good choice, quick access. </p>
<p><a href='http://www.sandaru1.com/wp-content/uploads/2008/04/allapps.jpg'><img src="http://www.sandaru1.com/wp-content/uploads/2008/04/allapps-150x150.jpg" alt="" title="allapps" width="150" height="150" align="right" style="margin-left:10px" /></a><br />
The next stock in sidebar is &#8220;<strong>Applications</strong>&#8220;. It showed some applications like &#8220;Firefox&#8221;, &#8220;Terminal&#8221;. It also showed &#8220;Thunderbird&#8221; as not installed, which is actually installed and used exclusively :-/ So, I wanted to change the list of applications showed there. The Application Main panel is quite attractive and nicely build. It&#8217;s very easy to find applications. However, only very limited set of applications can be added to the sidebar. I can understand everything else, but this? I&#8217;ve no clue.</p>
<p>Then the &#8220;<strong>people</strong>&#8221; stock was there, but unfortunately I don&#8217;t have any friends on my mugshot account. It only showed some generic user called &#8220;Gnome Online&#8221;(or something similar). I accidentally added another email address to &#8220;Gnome Online&#8221;, then I found out there is no way to remove that. The only option was to just remove that user(There is no point of keeping a bot with wrong addresses associated with it). Once I logged into gtalk via  pidgin, the people stock got filled with my gtalk contacts list. But it&#8217;s just some photos+names, nothing else. </p>
<p>I added the &#8220;<strong>Google Mail</strong>&#8221; account, and it worked without giving out any problems. After a complete swap of the sidebar, It felt like nothing is new in online desktop. So, my next guess was there must be something amazing in mugshot client. </p>
<p><strong>Mugshot Adventure</strong></p>
<p>I googled for a little bit about what mugshot client do, but didn&#8217;t find any useful information. Then, I checked mugshot bugzilla to see whether anyone else has got these problems. But I was alone. So, I fired up Xchat, joined #gnome-hackers on GimpNet. However, I didn&#8217;t get any replies(that&#8217;s my bad timing, the channel was very quite when I was dropping there &#8211; probably most of the people are sleeping). </p>
<p>The Online Desktop getting started said something about mugshot-client should be bootstraped. I had no idea what that means, so I logged back into my normal *perfect* gnome desktop(By the way, I&#8217;m a big gnome fan <img src='http://www.sandaru1.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ), and ran &#8220;<strong>jhbuild bootstrap</strong>&#8220;. Then, it installed 14 more packages. So, I cleared the built file from mugshot-client checkout directory using &#8220;make clean&#8221; and executed the mugshot-client build command(&#8220;<strong>jhbuild build meta-online-desktop -t mugshot-client</strong>&#8220;). </p>
<p>Here comes the trouble again &#8211; it gave me weird error saying &#8220;<strong>hippo canvas python module not found</strong>&#8221; &#8211; which the files/headers are there. Then, I rebuild several other modules like &#8220;<strong>hippo-canvas, desktop-data-model, gnome-settings-daemon, online-desktop</strong>&#8221; and tried building &#8220;<strong>mugshot-client</strong>&#8221; but nothing worked. Then, it must be something I did with the bootstrap command &#8211; I&#8217;m not even a little bit familiar with jhbuild, so I decided the best thing to do is rebuild everything from scratch.</p>
<p>First, I removed the install directory. Then, cleared the build files in the checkout directory. The &#8220;bash&#8221; saved me from lot of trouble. I didn&#8217;t have to worry too much about going into each directory and running &#8220;<strong>make clear</strong>&#8220;. If you are interested, following are the two commands,</p>
<pre class="code">
for x in `ls *.tar.gz *.tar.bz2`; do
	rm -rf `echo $x | sed 's/.tar.gz$//;s/.tar.bz2$//'`;
done
for x in `find | grep Makefile$`; do
	make -C `echo $x | sed 's/\/[^\/]*$//'` clean;
	rm $x;
done
</pre>
<p>After clearing everything, I ran the full build command along with the &#8220;<strong>time</strong>&#8221; command. After 1 hour, 59 minutes and 49 seconds, it finished(2.4Ghz dual-core 2GB RAM). </p>
<p>Then, I re login to online desktop and now it&#8217;s worst; both bigboard(sidebar) and mugshot-client crashed. They must have just committed a non-working version on bigboard around that time <img src='http://www.sandaru1.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  However, bigboard bug was simple, they were trying to integrate google docs(good news!!) &#8211; and gdata.gdocs package was not there. I simply removed &#8220;<strong>import gdata.docs as gdocs</strong>&#8221; line from &#8220;<strong>bigboard/google.py</strong>&#8220;, and sidebar is back in business.</p>
<p>The bug-buddy was a real rescue buddy on musgshot-client. I <a href="http://www.sandaru1.com/wp-content/uploads/2008/04/hippo.diff">changed few lines of code</a>, and it&#8217;s started working again. <em>(I didn&#8217;t exactly fix it &#8211; Just changed some lines that it wouldn&#8217;t crash, just work barely</em>). However, the result was not what I expected, it&#8217;s just getting the updates from mugshot site, and displays the notifications. </p>
<p>Speaking of mugshot site, it let users integrate many services into one feed, which seems to be a great idea, but since I don&#8217;t have any friends on mugshot, I couldn&#8217;t really experience it. My idea is it would be a much easier to keep track with friends this way.</p>
<p><strong>Programmers point of view aka &#8220;Thoughts of a coder&#8221;</strong></p>
<p>From the users point of view, online desktop doesn&#8217;t have any killer features *yet*. Anyhow, reading of some of design documentation enlightened me <img src='http://www.sandaru1.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The technology used is online desktop is XMPP, which means, it&#8217;s using push technology instead of pull; less bandwidth usage, less server load, quick response time. </p>
<p>Just like most of other opensource products, they also have core libs which helps other developers to tap into the system, and make use of that. This means a real integration between all desktop-online bridging applications.</p>
<p><strong>Conclusion</strong></p>
<p>Simple conclusion, it&#8217;s not ready yet. Of course, it should be &#8211; I built it from the trunk. Anyhow, considering the large number of gnome developers, and super cool gnome desktop, I feel like online desktop is not upto it&#8217;s full potential. A lot of simple yet effective improvements can be done, like improving the &#8220;Applcation&#8221; stock, or &#8220;Workspace Switcher&#8221;. I&#8217;m not sure why they are only adding people from &#8220;Gtalk/XMPP/..&#8221; connections to people stock(probably something with the design). Most of my friends are using MSN(may be I&#8217;ll check whether I can create a plugin for <a href="http://emesene.org/">emesene</a> to throw out some dbus signals).</p>
<p>The good news is, once the basic core framework of online desktop is much stable, developers will create some stunning integration apps. </p>
<p>Precisely, this is something you should checkout, but I&#8217;m not exactly sure how soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandaru1.com/2008/04/13/gnome-online-desktop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Improve jhbuild downloading</title>
		<link>http://www.sandaru1.com/2008/04/11/improve-jhbuild-downloading/</link>
		<comments>http://www.sandaru1.com/2008/04/11/improve-jhbuild-downloading/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 00:51:47 +0000</pubDate>
		<dc:creator>Sandaruwan Gunathilake</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Gnome]]></category>

		<guid isPermaLink="false">http://www.sandaru1.com/?p=134</guid>
		<description><![CDATA[Yesterday, I tried to install Gnome Online Desktop. Since, this is fairly new, it has to be build from the source. Gnome Online Desktop is a complete branch of gnome desktop, which will of course have many dependencies.  It&#8217;ll take years to download each and compile manually. That&#8217;s why they have jhbuild (it works [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I tried to install <a href="http://live.gnome.org/OnlineDesktop/">Gnome Online Desktop</a>. Since, this is fairly new, it has to be build from the source. Gnome Online Desktop is a complete branch of gnome desktop, which will of course have many dependencies.  It&#8217;ll take years to download each and compile manually. That&#8217;s why they have <a href="http://www.freedesktop.org/wiki/Software/jhbuild">jhbuild</a> (it works like gentoo emerge). </p>
<p>This is April, which is supposed to be the best month of Sri Lanka with festivals/celebration. But there is a price to pay, thundering (Last year, lighting took my laptop <img src='http://www.sandaru1.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  ). My connection goes down for each 10 minutes.</p>
<p>So, while jhbuild downloading a module, the connection goes down, and when I restart jhbuild, download doesn&#8217;t continue from where I left off. It downloads the whole file again. So, here is a very simple one line hack to prevent that from happening to you.</p>
<p>In jhbuild/versioncontrol/tarball.py, line 171, add a command line option &#8220;-c&#8221; to wget command. If you are not happy with &#8220;wget&#8221;, you can change it to whatever you want(prozilla,aget,d4x).</p>
<p>I&#8217;m still building online desktop (101 packages :-/ ), can&#8217;t wait to see what it can do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandaru1.com/2008/04/11/improve-jhbuild-downloading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Be Linux</title>
		<link>http://www.sandaru1.com/2008/04/04/be-linux/</link>
		<comments>http://www.sandaru1.com/2008/04/04/be-linux/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 15:15:24 +0000</pubDate>
		<dc:creator>Sandaruwan Gunathilake</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.sandaru1.com/?p=132</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/PLHjT5-XM9o&#038;hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/PLHjT5-XM9o&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandaru1.com/2008/04/04/be-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VirtualBox</title>
		<link>http://www.sandaru1.com/2008/01/11/virtualbox/</link>
		<comments>http://www.sandaru1.com/2008/01/11/virtualbox/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 23:16:49 +0000</pubDate>
		<dc:creator>Sandaruwan Gunathilake</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[ie4linux]]></category>
		<category><![CDATA[virualbox]]></category>

		<guid isPermaLink="false">http://www.sandaru1.com/2008/01/11/virtualbox/</guid>
		<description><![CDATA[One headache of web development is that there are tons of browsers which behave differently from each other. So, for a better quality we should always test sites in different browsers as much as possible. There is a well known fact : among all the browsers, most annoying browser is IE 6.0. But no matter [...]]]></description>
			<content:encoded><![CDATA[<p>One headache of web development is that there are tons of browsers which behave differently from each other. So, for a better quality we should always test sites in different browsers as much as possible. There is a well known fact : among all the browsers, most annoying browser is IE 6.0. But no matter how annoying there are still people who are using it. So, we should always test it in IE. There is a <a href="http://www.tatanka.com.br/ies4linux/page/Main_Page">project to get IE running under wine</a>, but I couldn&#8217;t get it working for some reason.</p>
<p>So, I tried <a href="http://www.virtualbox.org/">VirtualBox</a> which is obviously not as fast as wine, but more accurate. VirtualBox seems to show more performance than VMWare(No guarantees &#8211; I have only used VMWare once). It&#8217;s worth checking that out.</p>
<p><a href='http://www.sandaru1.com/wp-content/uploads/2008/01/virtualbox.png' title='VirtualBox'><img src='http://www.sandaru1.com/wp-content/uploads/2008/01/virtualbox.png' alt='VirtualBox' width="50%" height="50%" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandaru1.com/2008/01/11/virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Say Cheese</title>
		<link>http://www.sandaru1.com/2008/01/01/say-cheese/</link>
		<comments>http://www.sandaru1.com/2008/01/01/say-cheese/#comments</comments>
		<pubDate>Mon, 31 Dec 2007 21:07:06 +0000</pubDate>
		<dc:creator>Sandaruwan Gunathilake</dc:creator>
				<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cheese]]></category>
		<category><![CDATA[v4l]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://www.sandaru1.com/2008/01/01/say-cheese/</guid>
		<description><![CDATA[It&#8217;s new year, 2008. Time to smile  
Few days ago, I&#8217;ve been playing around with a pretty old USB webcam. I just plugged in it, and v4l(Video for Linux) drivers detected that fine (&#8220;dmesg &#124; tail&#8221; would do the trick for checking what has been going in the system).
Since I don&#8217;t any specific webcam [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s new year, 2008. Time to smile <img src='http://www.sandaru1.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Few days ago, I&#8217;ve been playing around with a pretty old USB webcam. I just plugged in it, and v4l(Video for Linux) drivers detected that fine (&#8220;dmesg | tail&#8221; would do the trick for checking what has been going in the system).</p>
<p>Since I don&#8217;t any specific webcam capture apps, I just used VLC to do some little testing. By running &#8220;vlc v4l:/dev/video0&#8243;, the green light on the top of the webcam turned on (turning on a small smile on my face <img src='http://www.sandaru1.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) and the video showed up. But it was about 60&#215;60 size (and the smile faded away). So, I experimented with several sizes, and the best worked so seemed to be &#8220;320&#215;240&#8243;. </p>
<p>Now, assuming that it&#8217;s enough for my needs (I don&#8217;t really need this anyway), I decided to install a webcam app. The &#8220;<a href="http://live.gnome.org/Cheese">Cheese</a>&#8221; from gnome foundation looked promising, So, I downloaded the code, compiled and installed it. bham, there is nothing, just the gtk widget background with a gnome hand imprinted.</p>
<p>I guessed that the both problem and solution should lie in the <a href="http://en.wikipedia.org/wiki/GStreamer">gstreamer</a> settings. So, I downloaded and installed the newest stable version of gstreamer(0.10.15), plugins-base(0.10.15), plugins-good(0.10.6) and plugins-ugly(0.10.6). But as a matter of fact, it didn&#8217;t have any effect on &#8220;Cheese&#8221;, but to break my mp3 playing capabilities of totem. Later on I found out it&#8217;s due to some plugins aren&#8217;t not compiled to properly, so compiling them fixed the mp3, but not the webcam app.</p>
<p>However, after going through the <a href="http://live.gnome.org/Cheese/FAQ">Cheese FAQ</a>, I found out that I have to set some properties from the gstreamer-properties dialog and just blaming myself for not thinking of checking FAQ before going to all the hassle of compiling gstreamer, I changed the settings as it said (ximagesink something &#8211; I can&#8217;t remember now), then fired up Cheese. </p>
<p>Whoa, the webcam is blinking and suddenly the video appeared. But their seems to be small problem with the video, 3/4 of the image is blank. Only top 1/4 is displayed properly. First, I though it&#8217;s a temporarily problem, so I did a &#8220;rmmod and modprobe&#8221; to reset the device, but it didn&#8217;t help. So, I fired up cheese from the command line to see what&#8217;s going on. First it was detecting the webcam, then the sizes it can support (in other words the available &#8220;modes&#8221;). Then, it&#8217;s selecting so called the best mode, which is the largest.</p>
<p>For my webcam that was a weird size something with 288 x XXX (Sorry I can&#8217;t remember that either now). So, I tried that size with the VLC, and it&#8217;s the same results. As you can guess it&#8217;s not a problem with gstreamer but the V4L drivers. I looked for any cheese configuration file to set the preferred &#8220;mode&#8221; of the webcam, but unfortunately the product is still very young.</p>
<p>I didn&#8217;t want to mess with the V4L drivers, so I had a look at the Cheese source code. There is an universal truth about everything, it&#8217;s always easier to break things rather than fix them. So, I just break the webcam mode detection code which leads into my hardcoded preferred webcam settings. Changes are done in cheese-webcam.c, and <a href="/files/cheese-webcam.diff">here is the diff file</a> &#8211; just in case. </p>
<p><a href="/files/cheese.png"><img src="/files/cheese.png" alt="Cheese Screenshot" width="50%" height="50%" /></a></p>
<p>Now, It&#8217;s time to say Cheese, and <strong>Happy New Year</strong>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandaru1.com/2008/01/01/say-cheese/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
