Tuesday, December 25, 2007

Hacking the iPod Touch / iPhone - Part 3

Right! so you had plenty of time to purchase the touch or the iphone and Steve had enough time to cut me a check for the previous 2 articles. But since the later didn't happen, lets just concentrate on the former - but this time in combination with GNU/Linux.

Once the new line of ipods were released, it was soon obvious that third party media players, such as gtkpod/amarok/winamp, were no longer able to sync with them. Whether this was intentional or just a consequence of Apple improving things will depend on who you ask :) Fortunately though, (ipod Linux?) hackers managed to figure out a way to get syncing working again - in just a couple of days, might I add!

Unfortunately the ipod touch/iphone is another beast altogether! Neither support the USB mass storage modes and instead rely on a proprietary message passing method that is yet to be deciphered.So AFAIK, neither of the two devices can sync over USB as far as gtkpod is concerned. Hopefully someone will figure it out or we may not need it after all if as rumored, Apple adds USB mass storage using a firmware update. But rather than languishing on what may or may not happen, lets see how it can be done at the moment.

Before you begin, make sure you have a Jail broken iTouch/iPhone with OpenSSH server installed and running.

Mounting the iPod Touch


While we may not be able to mount the iTouch as a USB mass storage device, we can mount it over the network - provided it has been Jail broken. The easiest method, which I'll discuss involves mounting the device over SSH with the help of sshfs fuse driver, a user space kernel driver. Other methods you might want to look into are the Apple File Share (AFP) and Samba which are installable on the Touch.

Before you can mount over sshfs, you need to install fuse and the sshfs driver. On Ubuntu, this would go something like:

# apt-get install sshfs

You might also want to load the fuse driver manually if you get an error in the next step.

# modprobe fuse

Create a mount point (in your home directory) to mount the iTouch and mount it using its ip address.

$ mkdir ~/mnt_itouch
# sshfs -o allow_other root@<ip_of_itouch>:Media mnt_itouch

You should now be able to see the content of your itouch on mnt_itouch directory.

Compiling GTKPod


At the time of writing, you needed the svn version of libgtkpod and gtkpod in order to support the hack explained earlier w.r.t the new ipods. Hopefully by the time you read this, you might be able to use the stock version that come with your distro of choice. If not, there is a good howto. These are basically the steps involved.

$ mkdir gtkpod
$ svn co https://gtkpod.svn.sourceforge.net/svnroot/gtkpod/gtkpod/trunk gtkpod
$ svn co https://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk libgpod
$ mkdir ~/local
$ cd libgpod
$ ./autogen.sh --prefix=/home/<user>/local
$ make && make install
$ cd ../gtkpod
$ PKG_CONFIG_PATH=/home//local/lib/pkgconfig ./autogen.sh --prefix=/home/<user>/local
$ make && make install

Create a small launch script for gtkpod as follows

$ cd ~/local/bin
$ echo 'LD_LIBRARY_PATH=/home/<user>/local/lib /home/<user>/local/bin/gtkpod' > gtkpod.sh


New hack: Getting the Firewire GUID and setting it in libgpod


The hack for the new ipods require something called a firewire GUID to be taken (I think its used as a salt in the hash algorithm) and written so libgpod can use it. For this, you need to plug in the iTouch over USB and wait a couple of seconds for things to settle before executing:

# lsusb -v | grep -i iSerial | head -n 1 | sed -e "s/.\+3[ ]//"|cut -c1-16
a12b3c1a35c7ba56

$ echo 'FirewireGuid: 0xa12b3c1a35c7ba56' > ~/mnt_itouch/iTunesControl/Device/SysInfo

Now if you launch gtkpod via gtkpod.sh it should recognize your iTouch automatically (since its mounted on your home directory). Before you sync any files, it would be a good idea to select the ipod touch / iphone model from the list available on gtkpod.

There are still some issues with this method (at the time of writing):

  • Album art doesn't seem to work.

  • Only preliminary support for Photo management. I could only view and download photos. Not upload new ones.

  • Podcast playlist not supported. AFAIK this isn't quite supported with old ipods with gtkpod. But it does work with old ipods on amarok - not sure why.

  • Slow, very slow syncing large files. I think this is a result of mounting over ssh. The encryption must be stressing the iTouch processor. May be the Samba or AFS is faster here.


Another tip if you plan on using iTunes and gtkpod is to use the SwapTunes.app on the iTouch to keep two copies of the iTunes database - one for iTunes and the other for gtkpod. This way you risk less, corrupting the iTunes database.

Thats it for now. As always, do check out the comments for additional things I may find after writing this. In the next article, I'm hoping to write a little about the productivity apps as well as some other cool apps focusing once again on desktop integration (spelled GNU/Linux desktop integration). Till then, enjoy your technology! (sorry Cali)

Tuesday, December 18, 2007

Christmas came early for me this year...

My command center went through a major overhaul this year a couple of weeks ahead of Christmas as I upgraded my 19" LCD monitor for 32" LCD TV. This was good because I now no longer need to juggle swap A/V cables when ever I want to switch between watching Dialog TV, Playing the wii and ps2.

The BIG screen was fabulous but I was and still am a bit disappointed when viewing non HD content. Even though this Samsung TV is not that bad, its not so high end to have an upscaler needed to convert the image from 480i to 720p. Unfortunately as far as DialogTV goes, I'm going to have to be stuck with SVideo at best (actually Composite seems to have better quality where). On the Wii and the PS2 end, I'll have to try and get a component cable, which I could not find in
SL. But still those two don't support full HD.

On the otherhand, once you plug in the Mac mini via VGA, things looked great. Playing DVDs also works well because a computer can upscale video. Unfortunately my Mac mini is an old G4 based one, and chokes under HD video. I'm also running out of desktop space to my full desktop PC. Size matters, and I miss my old barebone form factor.

Anyway so I dropped a big one and bought a PS3! Yes it was heavy to carry out of the shop and heavier on the wallet but hey, now I've got HD through HDMI. Its all courtesy of "Buy now, suffer later" also known as Credit Cards :) Buy hey, atleast I'll have a ton of fun this Christmas while I keep the economy moving, right?


command_center
Upgraded my command center :D. Showing 32" Samsung, PS3, Wii. The Wii is shown in picture-in-picture while I'm playing NFS Prostreet demo. Also visible - Mac mini, Dialog TV

Saturday, November 24, 2007

Why KDE4 (might) suck!

kde4 rc-1
I've been a kde user for very long time, since from before version 3.0. I vaguely remember being excited with version 3.0 to the point I was using the beta releases on a daily basis.

Similarly I have been anticipating kde 4.0, the next major release since 3.0 I suppose. But it seems that is just its problem! Its too much of a major release to be pushing out in such a hurry. I have been following kde 4 from time to time by reading some of the discussions on the panel-devel list, trying out the alpha releases via the SUSE live cd and of course discussing with Siraj, our local kde developer, on the internals (technology and community wise).

While things have improved a bit, with each release of kde 4, its far from ready. We are now at RC1 and the announcement says its ready for prime time testing.

Building on this, the majority of applications included in KDE 4.0 are now usable for day to day use. The KDE Release Team has recently underlined this by calling on the community to participate in reporting bugs during the time remaining before the release of KDE 4.0 in December.

Meanwhile, preparations for the KDE 4.0 release event is taking place, with the main event taking place in Mountain View, California in the USA in January 2008. Make sure you don't miss it!


Well from what I saw on the Debian based LiveCD, its far from being usable on a daily basis. I sincerely hope this is because the Debian guys didn't compile or package it correctly, even though thats very highly unlikely.

And while I don't want to ruin the January release party at Google, which by the way, goes up to Jan 19, which happens to be my B' day (Whooo!), my feeling is kde 4 should have been pushed back to June/July to make give that polish.

Anyway rather than just rant on and on, let me put forward my main issues with it, coming from a kde 3.x background. My testing procedure involved booting up kde 4-rc1 debian live cd and taking notes on the iTouch. To get a bit more background to the issues I was facing, I mailed those comments off to Siraj and I have included his comments and my replies to his comments :) Even he seems a bit frustrated with some aspects of the current state of kde. I'm sorry I don't have screenshots. All this was tested in 30-40 minutes, which only goes to show that its too easy to be annoyed with kde 4.

Legend: My initial comment, Siraj's comment, My response to his comment :)

Bugs like



* I see a floating klipper with black background

> Not a bug, plasma is yet to find a way to using XEmbed windows
inside a QGV , so till that is ready clipper will float.


>>Well its a bug! I get this from time to time even on kde 3.5.x after compiling with library versions used with beryl/compiz. But that happens randomly on 3.5.x and is predictable on 4.0. This should be fixed before final release

* I can't adjust time using clock applet. How do I change time format from 12/24

> you can't ;) it's a known issue :P

* I can't remove some applets like Lancelot. Why not have a remove applet functionality inside add applets dialog

> I don't think the IPC (dbus call) to remove an applet is not ready yet

* I can't resize plasma applets!

> hehe, the clock you can! others u can't ;)

>>Thanks for adding that feature. But its still crude (you need to type in a value under configure menu). Resizing should part of (inherited in )all applet


* Its not clear how I add stuff to kde menu's quick access tab.Would've been easy if I could drag and drop from app tab


* Plugging in my iPod, USB disk didint fireup the what should I do pop up. Neither did it show anything on my desktop.

> I don't thing solid supports all that, but do u have the solid applet loaded ?

>>No didn't have this loaded. I think such applets, if there are any needs to be loaded by default.

* I can drag a file from file browser to desktop but it only shows icon not file name and I can't move its position

> I think the applet lock is on, unclicking unlock should let you move it
around.


>>I'd really like to believe that, except there is nothing that shows its the case. There was no indication in the icon (via an emblem of a padlock for example) and I don't recall an unlock option in the context menu or even a context menu :) Its also bad you don't see the file name. Imagine having 10 files on the desktop all having just the same icon!

* How do I get multiple desktops. Used to be more intuitive

> there is an applet for virtual desktops.

>>If there is, this should be on by default.

* Launching the pager applet crashed the desktop and upon reload all the applets I had added were gone.

> Kwin and plasma is having lot of problems, this is just one of those. Yeap, no history support implemented yet ;)

>>A critical must fix bug, since kde4 seems to depend so much on these applets to provide core functionality previously supported natively (via kicker, konqueror)


Usability issues (and sometimes bug like)



* On the top right seetings widget has zoom in/out. Zoom out shrinks the desktop to a point of no return. Why not have a zoom default. Also this should be implemeted better esthetically.

> this is a pre plan for ZUI, which mean the default should be keep to zoom out. ZUI is not ready so it's a feature not a bug ;)

>>:) its a bug, because its a missing feature ;)

* Lots of missing icons so defaults to ugly icon.

> Oxygen is doing some major rework, when done should be ok!


* Default clock in systray looks ugly

> Agreed, argued no use, users are stuck with that! Aaron likes it

* In add applet dialog its not clear what the star does. If to rate then why 1 star.

> hehehe, maybe for the looks!

* Kde menu based on kicker looks unpolished and ugly

> :( life!

* Would be nice if I can clear recently used histry on that tab itself

> you will just have to wait :)

>>I can wait. Just wish kde can too instead of being released in Jan without all these


* Left and right click has the same effect on k menu button. How do I
add a custom item to menu?


> you can't for now :)

* I can't right click on taskbar. What happened those functionality.

> not implemented yet !

* Right click on desktop and I can't create new file, folder, launcher icon. WTF. Bettr to offer this along with option to hide icons from desktop. Dont cripple it

> not ready :)

* Where is trash icon? Should be in desktop or dock. Its not even an applet. It should be there by default.

> trash widget should be there but not ready yet :)

These are just some of the issues I found after playing with it for 45 min or so using the debian live cd. Definitely not RC1 quality. More like beta 1 or alpha 3!

kde4 rc-1 kde4 rc-1

So in conclusion, kde 4, IMHO doesn't offer much that isn't already available via other add-ons but as a result as compromised on usability and most of all flexibility which differentiates it from say GNOME. Worse yet, it seems to be missing a lot of the things we currently have with kde 3.5.x and earlier.

As a result, I think kde 4 has diverted from what its current users love and expect of kde. Its as if it has tried to be something its not. So my main complaint is that it needs a lot of work to get the same polish which we currently enjoy with kde 3.5.x series and should take the time needed before releasing prematurely. There is a saying in FOSS - It will be released when its ready!

In the mine time lets continue making kde 3.y.x incrementally better :)

Tuesday, November 20, 2007

Hacking the iPod Touch / iPhone - Part 2

Previously on Part 1 ...

Just kidding! Scroll down and read it your self.

Its been a while, and I think I'm falling into the "Oh twittering is so much more easier than blogging" trap. So if you've been following my twitter, then you'd know that I've been discovering quite a few uses for the iTouch.Unfortunately its late and I think you'll have to wait for another post before I get into all that :( So instead, lets first cover some of the basics.

Freeing up some space for 3rd party Apps


I'm assuming you have already setup the openssh package as well as the BSD Subsystem, there by enabling you to remotely login or copy files (scp). If not, use the Installer app to install those two packages.

One of the problems you'll quickly realize as you begin to install more and more apps, is a pop up message notifying you that your running out of disk space! This is due to the root partition (/) which also happens to hold /Applications, being only 300MB. Most of this 300MB was already taken up by the Darwin (OS) itself as can be seen by doing a df -h, while sshed into the iTouch.

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/disk0s1 300M 268M 30M 91% /
devfs 15K 15K 0 100% /dev
/dev/disk0s2 15G 6.0G 8.9G 41% /private/var


Therefor what you want to do is to move /Applications directory over to the /private/var directory, as it has the rest of the free space and create a symbolic link (aka shortcut), to the root (/). The following command should do it:

cp -a /Applications /private/var
rm -fr /Applications
ln -s /private/var/Applications /Applications


Once your done, just logout and restart the iTouch, just to be on the safe side. You should now be able to install all the apps to your hearts content. Similarly, I also moved the /opt to /private/var to free up a bit more space.

Turning an iPod into an iPhone


The ipod touch is a crippled version of the iphone, in terms of missing applications (notes, google maps, mail) and missing hardware (bluetooth,speaker, mic) . While the missing hardware can't be compensated, you can install most of the iphone apps to the touch and get the PDA experience of the iPhone on the iTouch.

In order to do this, you do need to get a hold of the iphone apps. If you know someone with an unlocked iphone, then you can copy it from that person or else you might be able to download it off the net. Try here. Once you grab the files, its mostly a matter of copying the app_name.app directory to the /Applications directory (using scp for example).

Most other 3rd party Free & Open Source or otherwise free-ware apps can be installed using the Installer application itself.

Finally here is an ipod touch compatibility list of iphone apps that also work on the touch. Stay tuned for part 3.

itouch_Installer

Sunday, November 04, 2007

Hacking the iPod Touch - Part 1

my new (hacked) ipod touch
So now that I had a little time to play around with this cool gadget, I think its time that I shared some of fun in hacking the iPod Touch. But first a friendly government warning :

<disclaimer>
WARNING: Hacking gadgets is known to cause bricking and in some instances may even void your warranty. As a general rule assume you won't be able to upgrade your firmware in the future. If your doing this, do it AT YOUR OWN RISK!
</disclaimer>

Don't worry in reality its almost impossible to brick the device since you can restore it using iTunes. So if you're still with me then "welcome to a brave new world of hacking!". First let me explain how the iphone/ipod touch hack works in layman's terms.

TIFF Exploit


The key ingredient for performing the hack is around a bug discovered in libtiff, a library used widely to provide tiff image handling capabilities. This bug can be used to cause a buffer overflow, allowing arbitrary code to be executed. Such exploits can aid (in a good sense) to unlock a device which has been locked, limiting its functionality to what ever the device manufacturer wants it to do.

Before the iPhone, the PSP firmware 2.0 was also hacked using a similar TIFF exploit allowing third party home brew apps to be executed.

In the case of the iTouch, you would visit a site containing a specially crafted TIFF image vis the Safari mobile browser. This would crash the browser and execute the payload. What that code does is simply to remount the root file system with full read/write permission, enabling the browser to break out of the chrooted jail its running under - jailbreak. This is possible thanks to Apple running the browser as root (admin), something any one with a little sense of security would not do.

You can read more about the TIFF exploit here.

Jail breaking the Touch


Jail breaking the touch has been made so easy that even a 5 year old could do it. The easiest method which was released less than a week ago, requires you to just visit www.jailbreakme.com and click on a link. It will display a TIFF which will jailbreak the device, making it suitable for running third party apps, install a user friendly App installer app and finally patch the TIFF exploit so you won't be compromised in the future! If your a GNU/Linux user, this also means you no longer need to goto a Mac or Windows to Jail break.

There are also a GUI tools which can be run inside MacOSX (iJailbreak) and Windows (Touchfree).

But I used the almost manual method since I thought it would be more fun going through the steps. I used my Mac Mini (PPC) but there is also a how to for Windows (sorry not for GNU/Linux).

If everything went ok, you will now be able to install apps by launching the Installer.app ifrom the SpringBoard interface. All you need is to be connected to the net.

What ever you install, you'll definitely want to install OpenSSH server (and even client), BSD Subsystem, DNS tools, SummerBoard.

In part 2 I will talk about some of the productivity apps and some other interesting apps that you can run. I'll also try to touch up on getting the Touch to work on GNU/Linux so that you can transfer music, videos and may be even photos (still trying to figure this out) without using iTunes.

If you can't wait... subscribe to my twitter blog for a near real-time update of what I'm upto.

Wednesday, October 31, 2007

Its been 3 years...

And I'm still here! That's right, its been exactly 3 years as of today (31st) since I got into the world of blogging. For the curious here is my first blog post which I made out of UCSC's MSc computer lab, under not so good circumstances :)

Anyway thats history. Now lets talk about the future. From today onwards, I'm hoping to start micro-blogging on twitter in addition to current blog. Sometimes I find little things or interesting bits that I never get around to blog about because its either too little information or I just don't get the time.

Well hopefully (no promises), I'll try to do that in the form of a micro-blog using of my mobile devices.

So I hope to see you at twitter!. I'm off to configuring my mobile clients.

Monday, October 29, 2007

iPod Touch turned out to be the one!

my new (hacked) ipod touch so I had my reservations about the iphone mainly due to the lack of 3G but also other reasons. Instead what wanted was really a good PDA device thats flexible and not too limiting - some thing like the upcoming N810.

But all that changed when I walked in to BTOptions hoping to checkout an FM Transmitter for my ipod. That's when I saw they had the latest iPod touch 16GB. What happened next was unbelievable in that I remember handing my credit card before blacking out. Ok so may be I'm being a bit too dramatic. The touch was a device which had already been under my radar but I did't think I'd actually buy this first-gen device.

But I did and here is why:
* it was staring me in the face
* price was close to getting from the US
* runs on UNIX aka BSD though would have prefered Gnu/Linux
* Ultra portable, scratch proof surface
* Nice UI and input method
* BUT ABOVE MOST - It can be hacked!

So here I am after having installed two dozens of nice home brew apps lying in bed writing this blog on my new shiney iPod Touch.

my new (hacked) ipod touch
P.S: Photos uploaded and included later using a notebook.

Friday, October 19, 2007

This could be the one...

So I've been thinking of getting Nokia's Linux tablet PC ever since the 770 was released a couple of years ago. When the N800 came that was a major improvement over the 770 and I was hoping to buy that.

Well now, Nokia has released a further updated version, the N810 and this just might be the one. Due to release in Novement, the N810 has a nice touch sensitive screen of 800x480, Wi-Fi, Bluetooth, GPS (YES!), FM-Radio, FM-Transmitter!(Awesome), QWERTY slide keyboard (and virtual keyboard), VGA camera, up to 8GB SD, 14 days standby and 5 days being always online.

The only thing missing is Wi-Max which is to be released sometime later next year.

Check it out.

http://www.linuxdevices.com/news/NS3669465936.html

Thursday, October 11, 2007

Tired of Vista? well then downgrade to XP

Microsoft's biggest enemy is probably itself. Getting users to upgrade to Vista hasn't received the kind of welcome many thought. Microsoft has tried hard to get users to switch using the "Wow starts Now!" campaign and even taking desperate measures such as launching a "Get the facts campaign against itself", similar to the discontinued "Gets the fact on Linux" but stating that XP's flaws.With all that failing, recently they started providing Vista Business and Ultimate users (aka users who paid BIG $$$) an option to downgrade to XP.

Many vendors including IBM, Dell, Fujitsu and HP are offering this downgrade option or providing XP as an option.

Given all this, who can blame users that have been stuck with XP for so long. Asking them to upgrade is like asking them to move from the home they grew up in, even if its supposedly a better and more secure home. At the end of the day M$ is to blame for dumbing down the majority of users to a point where they get nervous the second the desktop wallpaper isn't a blue sky with green hills!

This is probably where the Free/Open Source desktop users are better off. We have a desktop that gradually, but rapidly improves. Software packages update pretty much on a daily basis and most GNU/Linux distros have at least a bi annual (6 month) release cycle. Our users are always upgrading and looking forward to the next version. And why shouldn't they be?

We have a lot of things to be excited about such as the best 3D desktop, exciting kernel improvements with each release (check out the latest 2.6.23), best 64 bit computing support (make better use of Core2 Duo/AMD64), hottest Virtualization Technologies and support for an insane amount of hardware devices. To top it off, we have a bunch of "kick ass" FOSS licenses to tie it all together and provide the user with total control! What more can users ask for?

At the end of it all, I feel that though M$'s gamble to treat users as a bunch of noobs has paid off in getting them to buy into computers by the masses it is now faced with how to go about lifting off those XP couch potatoes and moving them to another couch. Till they figure out a way...long live EXPee!

Monday, September 24, 2007

Hotplugging a Secondary Display on Linux

GNU/Linux has been ready for the desktop for quite some time. And yet, when trying to tell the world about how ready Desktop Linux is, using a well prepared Open Office presentation, I am often faced with having to smile and say, oops looks like I need to restart X windows before my computer [Linux] can detect the LCD projector.

Lets face it, there are still some glitches here and there but the FOSS community is working hard at solving those problems, one by one. One such problem has been the inability to plug in an external display such as an external monitor or LCD projector and get it to "just work" without having to restart X Windows. That was until Xorg 7.3 came along!

Ever since I heard of Xorg 7.3 a couple of months earlier, I waited eagerly. Xorg 7.3 was finally released earlier this month. Unfortunately I was too busy to install it (i wanted to update other gentoo packages before I did this). Finally this weekend, I managed to upgrade my system (emerge -avuDN world) and get xorg 7.3 working!

Before I get to the monitor plugging, I'd like to make few comments on my experience doing this on Gentoo. First off, after emerging X org 7.3, X didn't start at all! Turned out that the upgrade process didn't recompile some dependency packages because their version hadn't changed. These are pretty much Gentoo specific issues and your not going to have to worry about it on binary based distros.

The other problem I had was with my synaptic touch pad not working. While trying to figure that out, I remembered that xorg 7.3 is supposed to have INPUT hotplugging and work even without an xorg.conf configuration file. So I renamed /etc/X11/xorg.conf and restarted zapped X (Ctrl+Alt+BS), and everything worked beautifully -- sort of. The synaptic touchpad worked and everything seemed fine, except I was having problems with compiz-fusion, the 3D stuff. I could get the 3D cube to rotate and see the wobbly effect but was unable to see what I was typing in the terminal. I could also not see any icons on certain windows such as of ccsm. It took me about an hour to figure out this was actually a problem with using an auto detected xorg.conf. So in the end, I reverted back to the old xorg.conf and found how to get synaptic working on it (thanks to google of course). Here is how my synaptic configuration on xorg.conf now looks like:


Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0

#InputDevice "TouchPad" "AlwaysCore" # Old setting
#InputDevice "Mouse0" "CorePointer" # Old setting
InputDevice "TouchPad" "CorePointer" # New for xorg 7.3
InputDevice "Mouse0" "SendCoreEvents"

InputDevice "Keyboard0" "CoreKeyboard"
Option "AIGLX" "true"
EndSection

Section "InputDevice"
Driver "synaptics"
Identifier "TouchPad"
Option "SendCoreEvents"
Option "Protocol" "auto-dev"
Option "SHMConfig" "on"
EndSection



Anyway, so now for the good stuff! I plugged in my 17" monitor to the VGA out of the notebook and waited. The signal not detected sign went away and the screen was pitch black. It was on indefinitely on standby. I zapped X again to restart it and this time got a display on the monitor. Hmmm not the hotplug I had in mind. A bit disappointed I wanted to get to the bottom of this - I mean hotplugging was supposed to be the main feature.

Turns out you can turn on a secondary display without restarting (zapping) X and here is how:

Meet the updated version of xrandr. You should have xrandr 1.2 for this to work.


# xrandr -v
Server reports RandR version 1.2


To get a list of displays available along with its status issue:

# xrandr -q
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 2432 x 864
VGA connected (normal left inverted right x axis y axis)
1152x864 74.8
1024x768 84.9 75.1 70.1 60.0
832x624 74.6
800x600 99.7 84.9 72.2 75.0 60.3
640x480 99.8 84.6 75.0 72.8 60.0
720x400 70.1
640x350 70.1
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
1280x800 60.0*+
1024x768 60.0
800x600 60.3
640x480 59.9
TV disconnected (normal left inverted right x axis y axis)


The output of xrandr -q shows two devices, VGA which represents my VGA out and is also shown to be connected to the monitor and LVDS, my LCD display. A third TV out is shown but is unfortunately not physically available on my notebook model :(

To enable my VGA out display and show an exact copy of whats on my LCD:

xrandr --output VGA --auto


This should automatically pick out the preferred resolution for the monitor and enable it. Alternatively if you want to specify the resolution from one of the modes supported (as given by xrandr -q):

xrandr --output VGA --mode 1024x768


You can turn off the external display by issuing

xrandr --output VGA --off


If you want you can create a VGA out toggle script and assign it to a keyboard short cut.

# vi ~/toggle-vga.sh
#!/bin/bash
XRANDR_OUT=`xrandr -q`
if echo "$XRANDR_OUT"|grep -q 'VGA connected'; then
echo 'Detected VGA connected';
if [ `echo "$XRANDR_OUT"|grep '*'|wc -l` -gt 1 ];then
echo 'Turning off VGA';
xrandr --output VGA --off
else
echo 'Turning on VGA';
xrandr --output VGA --auto
fi
else
echo 'No VGA connected!';
fi


Ok now for some fun stuff with xrandr! RandR was built to rotate the screen so lets try a rotation on the second screen:

# xrandr --output VGA --rotate left
# xrandr --output VGA --rotate right
# xrandr --output VGA --rotate normal


That last line will restore all rotations. Feeling dizzy? If not try these cool tricks:

# xrandr --output VGA --reflect x
# xrandr --output VGA --reflect y
# xrandr --output VGA --reflect xy
# xrandr --output VGA --reflect normal


Finally, wouldn't it be nice to extend your desktop to two displays. Well its now possible without having special dual head monitor settings in xorg.conf and even on an intel card! (with two vga outs of course).

There is a catch - you need to predefine the maximum combined resolution so that X server will pre-allocate that memory. Currently on intel cards, this means not enough memory for AIGLX/Compiz /3D. So I recommend creating a separate xorg.conf file for this purpose.

# vi /etc/xorg.conf
Section "Screen"
Identifier "Screen0"
Monitor "Monitor0"
Device "Card0"
DefaultDepth 24

SubSection "Display"
Viewport 0 0
Depth 24
Virtual 2432 864
EndSubSection
EndSection


# xrandr --output VGA --left-of LVDS

xrandr dual head
Depending on your monitor being to the left, right, above or below of your LCD screen you should use the proper option (see man xrandr).

Thats it for now.

Wednesday, September 19, 2007

SFD 2007 was HUGE & Hot!

SFD 2007
Software Freedom Day concluded on the 15th with several events happening around Sri Lanka and the world ofcourse.

The Excel World event, which I helped organize, turned out pretty well. It could ofcourse, have been a lot better if not for the matches that kept people @ home. But hey, who's complaining? Not me!

We had a lot of fun setting up the place. No one was in any particular hurry and we took our time. I got up about 8:30am or so and took another hour to get ready. Then grabbed a bunch of stuff like power strips, wireless dongles, power cords, mice, keyboard -- basically what ever I could lay my eyes on, and stuffed it in a luggage bag. I also picked up my desktop, my x-monitor (now dad's), and the mac mini (which I forgot to take) and headed off to TLC to pick up the APITT guys.

By the time we got to Excel it was close to 11AM. We then went to APITT to pick up rest of the stuff and it was probably around 12PM we actually started to set the place up. But help was on the way, as more friends showed up. The rest as they say it was history. The event went well in to the night and finished just minutes away from midnight.

Ofcourse, I am leaving out some of the drama we had to face @ Excel World, except to say it all worked out for the better in the end and that freedom shouldn't be taken for granted - "Even on SFD, you still have to fight for your Freedom, to have an event the way you want to have it". If some of you might remember we had a really bad experience last year.

me putting on the organizer hat:
All in all I felt that this year's SFD was bigger and a lot better as a whole. This couldn't have been possible if not for the FOSS community that came in at the right time and (magically) made things happen!

Special thanks to all the sponsors, Hardware Partner Digital House (Pvt) for giving out good looking machines that traveled around the country, Suntel for sponsoring the WiFi (with upgraded bandwidth mind you!) and doing too many radio spots in soo many channels :). Other thanks go out to ICTA for encouraging and supporting us, Excel World for a gr8 venue and support, APITT for giving us storage to store all the items and anyone else I might have forgotten because I drank too much coffee. Yes I'm sure it was coffee!

Enjoy the pics


Anyone other pics I'm missing? Leave a comment with link and I'll add it.

Friday, September 14, 2007

Come celebrate Software Freedom Day tomorrow @ Excel World

sfd07-logo-sml
Just came home after dropping off some items at APITT, which is a convenient storage location due to proximity, for tomorrow's SFD event at Excel World. As usual, the venue got finalized at the last minute (last minute being this evening)!

Tomorrow should be a busy day as nothing has been setup as yet. I am planning to head towards Excel in the morning along with the APITT LUGers to set the place up.I'm planning to bring a couple of my machines at home, like my recently dissected Mac Mini, or even perhaps my first notebook, the Sony Vaio which can only be used as disk less think client, which I showed off yesterday, at the SLIIT SFD event.

This is the 4th SFD event being held since its inception and this year seems to have the most events being organized around the country. Here are some of the local SFD events that are, or have been organized.

Anyway I'll blog more about the event tomorrow, live from the Excel World.

Not sure if you should attend? May be this will help...

Software Freedom Day is an international day dedicated to educating, advocating and celerating Free & Open Source Software (aka FOSS). Several countries are including Sri Lanka are having public events to celebrate the occation.

If you wanted to participate in a FOSS Community event then this is your chance. Couple of us geeks will be hanging out at Excel World through out Saturday from 10AM onwards.

We hope to show off some cool Free & Open Source applications, play video games on GNU/Linux and show you how you can too! and have an Install Fest where we will help you install GNU/Linux on your computer. Thats right!, bring your PC (no need monitor) or Notebook and get Linux installed for free! There will also be free Wi-Fi access thanks to Suntel so you constantly be connected!

We'll also have some cool geek merchandise like Tuxes, T shirts and
Linux distros.

See you all tomorrow!

Monday, August 06, 2007

Using a download accelerator with apt-get

If dist-upgrading your Ubuntu or Debian GNU/Linux distro is taking a considerable amount of time (or says it will), then this might be a useful tip to speed things up a bit.

This is nothing new really; something I used to frequently back in the day when Debian was my primary desktop disto. You see I got sick of waiting for debs to complete downloading, not to mention the apt database being locked, so I wrote a small perl script which used prozilla to quickly download the debs into /var/cache/apt/archives.

Recently, my g/f told me to dist-upgrade her Ubuntu box, since she didn't have broadband @ home and thats when I remembered that I have forgotten where I'd put that script. So I wrote new one that was an even smaller script.

But before that, I wrote a tiny bash "one liner" which can also be used download debs but it may not work with some debs that have to be renamed by escaping some characters. But nevertheless it too can be useful for downloading one or two packages with dependencies.

I'm assuming your running this as root

# cd /var/cache/apt/archives
# apt-get -y --print-uris install package_name > debs.list
# egrep -o -e "(ht|f)tp://[^\']+" debs.list | xargs -l1 axel -a

Instead of using prozilla, I now use axel which is also another download accelerator. You should be able to easily apt-get install axel. Replace package_name with either a package name you are installing or dist-upgrade if you want to upgrade the system altogether. Be warned that you may have to rename some files before apt sees the file as being downloaded completely.

Now on to the "slightly longer, works better", perl script:
# cd /var/cache/apt/archives
# apt-get -y --print-uris install package_name > debs.list
# vi download-debs.pl


#!/usr/bin/perl

while(<>){

if(/([^ ]+)[ ]+([^ ]+)[ ]+/){
($url,$rendeb)=($1,$2);
$url=~s/[' ]//g;
$deb=$url; $deb=~s/.*\///;
$rendeb=~s/[ ]//g;
print "Downloading $deb \n";
system("axel -a $url");
if($deb ne $rendeb){
print "Renaming $deb to $rendeb \n";
system("mv $deb $rendeb");
}
}
}



# ./download-debs.pl debs.list

While your waiting for the download you might even be able to squeeze in a few new smaller packages, as the apt database isn't locked. Once the download is complete, just run the same command without the -print-uris option and your good to go.

Be warned that using a download accelerator might bring your sys admin running to your desk screaming before you can say "apt-get are we done yet!".

Friday, July 27, 2007

Be an Open Source Guitar Hero!

Undoubtedly one of the best games that came on the PS2 and more recently on the 360 is Guitar Heros II. Ever since I got my hands on this came, I haven't as yet swapped the DVD to play another game on my PS2.

For those who haven't heard of this game, it basically lets you "rock on" to some popular and not so popular rock tunes as if playing a guitar. You could use the standard D Pad game controller or for the ultimate experience purchase a Guitar controller.

Unfortunately I don't have the guitar controller though, and would probably buy it if I can find it in a local store. I wanted this so bad, I almost picked it up from a shop that was situated in Dream Land. Unfortunately the alarm woke me up before I could pay using my credit card.

So whats better than Guitar Heros 2? No its not Guitar Heros 3, but rather a Free & Open Source clone called Frets on Fire!. Sure it doesn't look as good as GH2 but its got some feature that makes it better. But before I get to that, have a look at this dude "rock on" in Frets on Fire using the GH2 Guitar Controller



So what make Frets on Fire an awesome alternative:

  • You can use a full size keyboard and hold it similar to a guitar

  • You can import all GH2 sound tracks, if you've got the GH2

  • Its got the ability to import new songs unlike GH2 where your stuck with the tracks that came with it

  • There is an inline music editor within the game

  • Runs on GNU/Linux, Mac OSX and Windows

  • Free in every way


So check out Frets on Fire! Chances are you'll either burn the keyboard if not your fingers.

Wednesday, July 25, 2007

Will the real "Geek with an Attitude" please stand up, please stand up!

Ah just came across another Geek-with-an Attitude . Seems like an interesting Blog with "Technological advice you can actually use".

Now excuse me while I run off to perform a DoS.

Just kidding

PEacE out

Saturday, July 07, 2007

My Mac Mini taken apart and put back together

mac_mini_dsc01310.jpg My Mac mini had been pretty much dead for the last couple of months. It just wouldn't boot and would give a gray screen (without the Apple logo), after the Apple chime. Following advice on Apples's Support site, I tried the weird key combinations that were supposed to clear the CMOS and other settings, but that didn't fix the problem.

I was thinking about taking this for repairs to either BTOptions or DMS but both will take a fair amount just to open it (and it may well be fair, because opening and servicing this thing is a pain) and possibly more to fix (warranty had lapsed). I felt adventurous and as if there was nothing to loose.

The fact it was a Friday night and after the end of a long week, I felt the need for a change from thinking about software to may be thinking of hardware. But before I could give much thought to the idea, I found myself tearing the Mac Mini apart.

I've seen a couple of videos on Youtube on opening up the mac and it looked easy enough :) One problem was that I didn't have a putty knife. What I did have was something that looked like a putty knife, if only slightly bent and was primarily built to flip eggs.

To make a long story short, I managed to open the mac mini, remove its memory and test that separately using my desktop, remove battery to manually clear the CMOS. I also got access to the hard drive and made a few mistakes along the way which came back to haunt me during the re-assembly.

For some weird reason all the partitions on the hard driver were gone, not even recoverable from testdisk. Finally I ended up repartitioning it from within the MacOSX beta (intel) boot CD I had. Then it occurred to me that this might actually explain the gray screen because on Macs, part of the firmware is on a special partition (EFI partition). But then again, I think the CMOS clearing also had something to do with it.

Finally, the Mac mini started to work after I had put everything back together. I was quite pleased that it was now booting to the boot loader and more astound to find that my data partition (which had all my downloads) still in tact. Hmmm, one of those X files things, I can't quite explain. Anyway, I re-installed MacOSX on the first partition and it works great now!

I'll install GNU/Linux on it later, but before I closed the casing I decided to upgrade the memory, since it risky reopening it and old memory types will run out. So I went to Unity Plaza and "got me self" a 1GB stick and put that sucker in. My mac mini seems a lot more happier now.

One good thing about using the Mac Mini (G4, in my case), is that it consumes a lot less energy than, say my AMD64 desktop. It essentially has notebook like hardware, and I've even seen a few hacks that convert it to a battery driven device.

Well the Mac mini is all setup and updating itself, and I'm just in time to watch the Earth Day Concert.

You can see photos and comments of the dissemble process on my photo blog.

Monday, July 02, 2007

myPhone - Waiting for my kinda iPhone


Photograph by: Eliya Selhub

The iPhone is a pretty good looking phone and functional phone by the looks of it and it might actually end up being a hit in the US, if it wasn't for the high price tag. While $500 - $600 seems like a good deal for us Asians and some of us are used to spending that much on a phone it seems to be uncommon in the US. They're still using crappy old cheap models over there :), which generally come for a real cheap price or for free as part of the plan. So I really don't think the iPhone as it is, is going to be anything like an iPod.

But it can be like an iPod, only if Apple did a few things more. Here are a list of things I want on myPhone:


  • 3G - Its great this thing has EDGE but I wouldn't dish out so much and not get anything that hasn't got 3G

  • User pluggable SIM card - What were they thinking! Oh wait physical security to please AT&T. Do we have to dissect just to change the SIM card? Give us a slot to insert/remove the SIM

  • Expandable Memory - 4GB and 8GB are plenty but having a removable, expandable SD slot is a must in any modern phone

  • Custom Apps - Steve Jobs sold the fact that developers can't develop native apps as a good thing at the recent WWDC. While its awesome its got a full fledged browser, Steve said him self, "But it’s happening fairly slowly and there’s still a lot you can do with a rich client environment.", that desktop apps are richer and can take back what was lost to the web. If Apple decided on every thing that was to run on the iPhone, its going to be a boring, under utilized device.

  • Voice recognition menus/Dialing - The touch pad is great but with such a powerful phone you would have expected some more natural ways of input. I hear the touch pad doesn't work well with gloves which can be a problem under freezing weather.

  • Skype - A great use with WiFi around. Oh wait AT&T wont like it.

  • IM - SMS chat is ok, if you want to burn money but how on earth can you ignore an IM client. True with Safari, you could use a service like Meebo, but then again you could just use google maps too

  • Flash, Java - Are these technologies so yesterday? Can we do it all with Ajax

  • TV out - Does this thing have Video out? I hope they didn't drop that. (iPod video has it)

  • Record Video - I can't believe this can't record video with the built in 2MB camera.

  • A Flash please - A Flash makes a BIG difference when taking photos. At least a fake Flash like some of the older SE phones

  • Video conferencing - Now I am getting a bit more demanding here. I'm thinking, with a 2 year plan your looking at being stuck with this till end of 2009 - 2010. I would think most people would find video conferencing a common thing by then.

  • Project it - Ok I may be asking for too much here :) But it would be cool and very Business like if I could some how just run a Presentation and project it to a big screen without taking out my notebook



Well thats my rant on the iPhone's missing features. I am sure there are more and the best way around this is to just make it easy for third party apps, even if Apple has to first examine and digitally sign them. If it can do half as much as what I mentioned then there is a good chance the iPhone will be a hit in Asia if & when it is released.

In the mine time, I am holding my breath for a truly Open Phone, the Open Moko and the great apps the FOSS community will build to run on it.

Monday, June 25, 2007

"FOSS-ed on Windows" is on tomorrow

They didn't think we'd do it. We didn't think we'd do it! But we're gonna do it ... tomorrow. For a change, we are gonna temporally hold off on telling you to switch away from the Windows platform and instead tell you how you can make your Windows experience so much better.

Guess who's sponsoring? Its those guys from Redmond - Microsoft.

FOSS-Ed for windows will show you how you can save time, money and be in control of the software. There will also be plenty on interoperability with other Operating Systems & other applications.

Why flush hundreds of thousands of Rupees down a proprietary
product when there are many free alternatives to choose from?

For more info
http://www.foss.lk/events/2007/fossedforwindows

Ok now that the "advertisement disguised as a blog post" is out of the way :), I'd like to invite your guys interested in using FOSS on Windows to drop in for the event. The pricing is a pretty good deal considering its a 3 day event with food, and Brian Behlendorf, the Co-Founder of Apache Foundation will be there too. Best of all, I will be there, doing a talk on Securing your IT Infrastructure using FOSS :P. You can also get a look at what we've been doing at THINKCube and the soon to be launched Collaboration Server 2.0, since we are sponsoring the event.

So see you all there

Btw someone else beat me to this announcement and even dugg it: Microsoft sponsors FOSS event (what the hell's going on!!!)

Thursday, June 14, 2007

Goodbye Prof.

prof_sam_dsc01237.jpgprof_sam_dsc01246.jpg


Yesterday I attended Prof. VK Samaranayake's funeral proceedings which took place on a gloomy onset, as if the sky was about to break down and cry but was holding off so to not cause any discomfort to the event.

prof_sam_dsc01245.jpg Many from the Academia, IT industry, Media, Government Bodies, Students, Family and friends had come to bid farewell to the "Father of IT in Sri Lanka", whom to many will remain a hero and a role model.

A quick look at the online condolence guest book is all thats needed to see the variety of people's lives he has touched.

Monday, June 11, 2007

Hey Micro$oft.... Sue me!

Desperately seeking Micro$oft makes some dubious claims when it accuses that GNU/Linux and FOSS violates some 235 of M$'s patents. With each passing day it is evident that this latest of a series of unsuccessful maneuvers on M$'s part is done just so they can create enough FUD to possibly kill off the threat or make some money off of Fortune 500 companies through licensing.

As I posted earlier, you could only do so as long as you don't disclose the supposed patent violations that GNU/Linux and other FOSS apps are said to be violating. So this is turning out to be a new business model for M$, where they can sit back and Steve Balmer can play Tony Soprano and make extra cash.

Well its about time Micro$oft put up or Shut up! Either disclose the so called patents that we are supposedly violating, sue us or just shut up! Since the former doesn't seem to be happening a couple of people started signing a petition called "Sue me first". It only takes one person to be sued for us to know and the world to show that its all a bunch of BS.

So what the heck, I signed it too...

See #1427

Also read what Linus the creator of the Linux kernel had to say..

Finally got a Flickr Pro Account

I was wondering how many photos I had on flickr. Because with the free account, 200 was all I could see. The first time I tried to fulfill my curiosity, a couple of months back, to find myself utterly disappointed and annoyed that I couldn't just pay the $24.95 and unlock my photos, because Paypal didn't recognize Sri Lanka as a country worth doing business with. So I gave up, even though I was aware that you could get it done through someone who had an AMEX CC.

Anyway long story-short is I finally upgraded and was amazed to find I had a little over 500 photos! (more than twice the limit).

So if you know me and want to go down memory lane or just want to see how crappy I was at taking pictures then (not that I'm a lot better now), check out my Flickr Photo Blog.

Don't forget to click the last page :)

Thursday, May 17, 2007

Spider-Man 3 - Not a complete waste of time

I've just returned home from watching the block buster hit, Spider Man 3 and thought I'd blog my thoughts while its still fresh on my mind. A word of caution for anyone who hasn't as yet watched the movie - don't read this if your like me in that you don't like to have any pretenses about the movie before you watch it. While I promise not to outline the plot, if there was any, chances are your going to have a pretense. This is also why I generally don't like to watch movie trailers, read reviews before watching the actual movie, though I won't necessarily shy away from them should I accidentally bump into one. On the other hand if your the type that researches before you spend time and money on a movie, then read on.

I had high hopes for Spider Man 3, so much that the second I learned of its existence in town, I immediately wanted to book tickets. So for the first time I tried booking an e-ticket using Dialog's much advertised, 444 service that was exclusive for postpaid customers. In the end that service turned out to be a complete waste of time and possibly money (I won't know till I get my next bill), but luckily I was able to manually get two tickets, after learning my e-ticket was never made. More on that later, in another post perhaps.

Anyway after watching it and coming out of the theater, all I could think about was why this was the worst Spider Man movie out of the three. I say this with disappointment, only because I really think they tried too hard to make a good movie, but ended up over doing it and really deviating too much from the previously established (as far as the movies go) Spider-Man spirit.

Essentially I felt like this was an attempt to combine characters and ideas from too many successful movies to create the ultimate movie. Unfortunately, as a result I felt it turned out to be a salad or cocktail that was just too crowded for the taste buds.

To begin with, I thought there were far too many super characters (the word hero isn't totally un-appropriate here either, as I will explain later), somewhat similar to what you'd expect from X-men. Then the sand man reminded me of the sand man from "The Mummy". The sand man also resembled "King Kong", when ever he grew to be a giant and especially when he was under attack. Similar to King Kong, it turns out, the sand man was also misunderstood. There was also a Terminator like, "I'll be back" thing going on where you think the villain is dead but he comes back. A bit of "Superman" is encompassed in the black alien substance that falls from space, similar to how Superman came to earth, and which has lots of power but also a lame weakness similar to Kryptonite. Coincidence? I think not! There were also some musical moments similar to "Mula Roughe" or "Chicago".

Despite all these rip offs, the movie was nevertheless quite enjoyable to watch, with hardly ever a yawning moment. Still one thing I could not stand to watch was the Titanic/Hindi movie like scenes of Spider man crying like a girl. Not once by twice! By the audience's giggle reaction, especially when the circumstances were emotionally depressing, hints to a fundamental flaw with the Spider-Man, if not any man's character we are stereo typically led to accept. Those scenes were just so lame and thankfully short. There was also a bit of soap and fantasy as you learn that none of the villains were true villains (some what hero like at times) and the hero, Spider man, acts like a villain at times. They all had a personal story to share, which didn't feel right.

Some of the - "Oh how convenient" or "Wow what a coincidence" moments just make this story feel really lame and unrealistic. I can't go into details here without ruining it so I won't. You'll see what I mean when you watch. Anyway its certainly not the Spider-Man we were led to accept - the ordinary, nerdy guy that made mistakes but understood that with great power comes great responsibility.

So while the movie is an enjoyment to watch due to the cool effects, a roller coaster like ever changing theme, my conclusion is that Spider-Man 3 killed Spider-Man as we knew him.

Saturday, May 05, 2007

Honey, I sunk the ipod

It was the worse day of my (ipod's) life. It drowned a feet under water for god knows how long. What probably was 5 - 10 minutes must have felt like an eternity. As of now, my ipod is in a coma, waiting for me to wake her up.

It all began a little under 36 hrs ago, when it was raining hard. I came home yesterday a little earlier following a wedding and thus managed to avoid traffic and more importantly the heavy rain. After a little bit of relaxation listening to the rest of a podcast from my drive back home, I began to settle into reading a book, when my sister said she was about to go off to work.

She being a doctor, has to generally deal with a crazy time table. By this time it was raining hard and fast. So I offered to drop her off, which she accepted gladly and as usual took my ipod along to keep me company.

We didn't get too far before land was nowhere and water was everywhere! This was not my first time crossing a pool of water by car, so I wasn't as scared as I should have been.

All was fine until my feet started getting cold - I mean literally cold from the water that was now seeking in from beneath the car. I must say there was a little panic, especially after seeing a couple of dead vehicles stranded on our path. There was no turning back. We were surrounded by a queue of vehicles, in both directions.

The water level continued to rise until it was about a foot or more. Finally we made land but the water that had entered into the car, didn't seem to retreat back. Luckily there was an empty 1.5L bottle of 7up, which my sister started filling up with the flooded water and throwing out. Thats when she felt something under the water -- something which felt like, my ipod!

As she handed it over to me, my fingers touched the wheel and it came alive. I panicked and suddenly shut it off by pressing on the play button. I vaguely recall the locked icon coming on even though I hadn't locked the ipod at the time, as if she was going into cardiac arrest. Anyway I immediately locked it to prevent from accidentally being turned on. Once I got home, I dried it using tissues and kept it next to my lava lamp before falling asleep, myself. The ipod is still asleep.

After a bit of research online, to my surprise (shock), I've discovered that ipods are known to fall into toilets and still survive. So there is a ray of hope that my ipod will recover, despite it being under water for a longer period.

To be continued...

Tuesday, May 01, 2007

Screenshot of my new (shiny) desktop

I'll let the screenshot speak for itself.

my_desktop

But just in case your wondering this is Gentoo GNU/Linux running the beryl Window Manager (WM), on top of KDE desktop environment, with screenlets as widgets/gadgets, kiba-dock for an OSX like dock and kbfx with a dark theme as the next-gen kde menu.

That's it really!

Friday, April 20, 2007

M$ & GNU/Linux: A way out of the patent mess or the best weapon to take over the world!

Ooops it happened again! The second cross patent licensing deal between M$ and another company - Samsung this time around. While this deal may not be as controversial as the first deal between M$ and Novell, its nevertheless going to have a bad taste with the community.

But I just realized GNU/Linux might actually be a ticket out of this whole patent mess we are in. It goes something like this:

  • A claims to B that by using GNU/Linux B is violating patents of A.

  • B in return reminds A that it too might be violating some of B's patents because A also happens to use GNU/Linux.

  • A and B come to an agreement not to sue each other over patents.

  • C comes along and does the same with A & B


In other words A, B and C can cross license their patents without actually having to disclose the patents they are cross licensing in the first place. This is because if any company (A, B or C) discloses a patent which Linux is supposedly violating, that piece of code will be instantly removed, leaving nothing to FUD over about.

Eventually, all the major players end up promising not to sue each other; the patent system goes into hibernation and dies out. Everyone lives happily ever after!

Ok so the above scenario plays out if you'd taken the Blue pill.

Now if you had instead taken the Red pill this is likely what happens:

  • A doesn't use GNU/Linux, while B does.

  • A threatens B saying by using GNU/Linux B is violating A's patents (obviously without mentioning which patents)

  • A offers to enter into a cross patent licensing promising not to sue B and vice versa

  • A enters into B's business without a fear of being sued over obvious patents A is violating of B's.

  • Eventually B goes out of business or moves to a different business in desperation.

  • A continues this practice on to C


I suppose its still too early to say which pill we might end up taking. Hopefully GPLv3 will fix everything and Linux will adopt it just in time take a sleeping pill instead.

Saturday, April 14, 2007

Watching the Worldcup over WiFi

Sure it doesn't beat watching the match on the big screen. But wouldn't it still be cool if you could didn't have to always sit in front of the tv all time as the match went on. Well today I decided to play around with the idea since Sri Lanka wasn't playing anyway.

Now my home isn't physically networked in anyway so I have to rely on the slower WiFi to do the job. Worse still is the fact that my WiFi Router is upstairs where our phone line happens to terminate, (it doubles as an ADSL Router) and so the signal reception is pretty bad (about 40%).

Its been a while since I played around with VLC and I knew it has improved somewhat since I last had a go at it. Mainly the addition of H.264 for better quality at lower bit rates. So after playing around with several codecs, I settled with h.264 (AVC) after discovering a combination that worked (you can't just mix arbitrary video encapsulation containers with a given codec and expect it to just work). Following are the settings, I ended up being satisfied with: (Also see screenshot)

Stream Type: HTTP
Stream Port: 8080 (you can use any port here)
Video codec: h264 @ 192 kb/s
Audio codec: mp4a @ 64 kb/s (mono)
Video container: ASF


vlc_streaming

As far as getting the TV in, I plugged in the S-Video out from my cable box to the S-video in of my bttv878 compatible Prolink Pixelview Play TV Pro2.

watch_match For playing the stream, I used mplayer (you could also use VLC itself for this) with the following URL at the command line.




mplayer http://192.168.1.3:8080

That's it! Back to watching the match ... NZ just came to bat second innings :D

Wednesday, March 28, 2007

FOSS project: Sahana wins an FSF award!

The Sahana project, a large scale disaster/relief management software developed soon after the Asian Tsunami and subsequently used during several other disasters, has won an award titled "2006 social benefit award", from the Free Software Foundation (FSF).

I myself feel proud and fortunate to have been involved with this project during its inception, and wish it will continue to be useful during unfortunate times. At the same time, I wish, there would be a less need for the deployment of Sahana, as a result of lesser number of devastation disasters. I think those now directly involved with the project wish for the same thing.

More info (with pics at):

Tuesday, March 27, 2007

My iPod now runs Linux...

Inspired by my favorite Linux podcast, "The Linux Action Shooooooooow" (thats how its pronounced), where each week Chris would talk about some new cool gadget that supposedly runs Linux. On the same spirit, I'd like to announce, the above.

I managed to install Linux on my somewhat recent 30GB video ipod. While ipodlinux has been around for quite some time now, the newer 5.5G (Generation) ipods weren't supported. Well all that has changed as of late February 2007.

Installation was quite easy, and I didn't even have to backup my data and repartition anything. Installation was actually quite easy due to the fact I had a Macpod (an ipod formatted using iTunes on running on my Mac Mini's OSX) which had put an hfsplus file system. Since hfsplus was a UNIX file system (POSIX compliant), I could just install Linux over it.

In contrast, for the majority of people that are running their ipod on FAT32, the process is slightly more complicated, required a separate ext3 FS to be created.

Anyway here is a video of my ipod booting off ipodlinux



On a similar note, I recently saw a digg post which claimed that someone has figured out how to run PowePC (ppc) Linux on Microsoft's latest Xbox 360. Running Linux on the Xbox 360 was considered quite difficult due to the system being heavily locked down via DRM, but apparently using a game exploit this is now possible.

Just makes you wonder if Microsoft will try to fix this exploit and prevent Linux from being installed or turn a blind eye, just so that they can take away the title from Sony's PS3 as being the only 2nd Gen console that can run Linux, something that Sony's PR engine emphasized.

Oh well, Yet-another-Gadget now runs Linux.

Wednesday, March 07, 2007

Previously on FOSSEd Kandy ...

Last weekend, we had our first FOSSEd on wheels event in Kandy. It was organized by the faculty of science, University of Peradeniya and was held on the 3rd and 4th (Sat & Sun) of March.

Since I had other commitments, I was only able to attend the event on the 3rd. I did a small presentation on deciding to choose a GNU/Linux distribution, a task that can be quite overwhelming, considering the hundreds of distributions out there. Nevertheless, I think I pulled it off by recommending they initially just try the Ubuntu distro, that was distributed to them at the event.

Just to make things a little bit easier, I demoed a live Ubuntu installation (using VMPlayer), which took only a little more than 15 minutes.

There was good balance in the number of attendees from universities, schools and a few from the industry who participated by asking questions as the event progressed. All in all, I thought it was one of the best FOSSEd events we had in a while.

Check out the following links for more on FOSSEd Kandy:

Wednesday, February 28, 2007

Dell should be punished!

When I read the, once "Highly Confidential" - but now public (as a result of the Iowa anti-trust case), email thread from Redmond, it just cracked me up.

Sounding much like a bunch of kids fighting over who's daddy is better, this is further proof that M$ is so damn uncertain of its self.

Here are some funny moments from the memo:


"This is just life. I am not giving up. I don't have a penguin in my basement. I LOVE windows which is why I want us to face this so we can figure it out."


"Did Russ Holt know you were there, I can't imagine he would be this blatant against us if he knew you were there. "


"I was sitting right across the panel from him. We waved at each other briefly before the panel started."


"I want them to think very, very carefully about when and which forums they decide to push Linux very, very hard. Today, they do not. When they do, you can bet, behaviour will evolve."


"He said Windows three times during the whole discussion (it was a Linux panel tho) and then proceeded to push Linux very hard, never mentioning Windows."


You can read the memo here.

Interestingly this comes at a time, where Dell is currently conducting a brainstorming survey from their customers whom which the majority is asking for GNU/Linux pre installed on Dell desktops and notebooks. This is followed by other requests including having OpenOffice pre installed.

Check out the results of the survey.

It is yet to be seen if Dell can stand up to the bully and deliver what consumers want.

Monday, February 19, 2007

The Darker side of Vista...

There is a darker side to Vista, one that far exceeds, beyond the dark theme that greets you after login in!

Vista has taken, "Restricting the user's rights to do what they can", to an unparallel level, never seen under any previous OS to date.

Most of these restrictions, were designed to set the stage for the inevitable, widespread adoption of technologies such as HD content that are currently at a bleeding edge state, thus expensive and not widely used.

As a result, for many of the early users of Vista, these defective restrictions are likely to go ununnoticed and then it will be too late... for all of us.

What am I talking about? you ask? Is it about activation thats got a number of tries attached to it? Or the fact that you can't change your motherboard without Vista considering the license invalid? Or perhaps the fact that you no longer can install Vista inside a virtualized platform such VMware or Xen?

While all of the above restrictions can be thought of as being somewhat annoying, especially when you've paid a considerable amount to acquire the OS, what I am talking about is an even darker monster - called DRM.

DRM = Digital Rights Management

Such a beautiful name for such a Cruel Intention! While it sounds like a party line from a Digital Rights activist group, DRM actually is trying to do the exact opposite - take away your right to the media you purchased. In the olden days, you could play a cassette you bought on any cassette player, such as your Hi-Fi or walkman and also make a personal backup just in case it got damaged. Well those days are going to be in the history books if RIAA/MPAA has it their way.

In a nutshell, the Vista DRM issue is that Microsoft has gone in to great lengths to architect Vista in such a way that it mandates a certain commitment from hardware vendors, just so that it fulfills the fantasies of the Record and Movie companies, thus undermining the users, hardware vendors, and ofcourse the single most important thing that made Microsoft the biggest OS vendor - the Open Personal Computer (PC) platform.

It is unacceptable to argue (see Microsoft's response url below), that because protected HD specifications require these stringent regulations inorder to play protected HD content Vista had no choice but to implement them. In other words, loosing your flexibility and freedom to tinker with an open PC platform by locking it down both in terms of hardware and software is worth it because otherwise we can't watch HD movies!

"The Vista Content Protection specification could very well constitute the longest suicide note in history"

"...in order to work, Vista's content protection must be able to violate the laws of physics, something that's unlikely to happen no matter how much the content industry wishes that it were possible"

- Peter Gutman


A recent paper by security expert Peter Gutman, titled "A Cost Analysis of Windows Vista Content Protection", examines the technical issues behind Microsoft's DRM fantasies and why its not even technically feasible in the long run.

Microsoft's (unofficial) blog post response to this article didn't seem to go down so well (read through the comments). After reading it what I felt it boiled down to was - "Well thats the cost of doing business with RIAA/MPA. XP and ME had some of this already so don't sweat, its no big deal!".

As primarily a non Windows user, my initial reaction was, "I could careless, about Windows issues!". But this DRM issue has the potential to impact the PC itself as a result of Microsoft's dominance of the desktop market. The result is a tight grip on all the major hardware vendors where its easy to dictate terms and conditions and they are forced to follow through or face consequences (e.g: Dell almost got punished for distributing GNU/Linux).

Since most of the DRM technologies are based on keeping secrets (keys,obsfucating code), the result is that user's of Free Operating Systems such as GNU/Linux and BSD will not be able to play HD quality content that they have legitimately purchased. Worse yet is the possibility that as a result of these restriction, the device may not function at all or quite poorly with limited features because the hardware vendor will be forced to do their utmost to protect the DRM secrets making it extremely difficult to reverse engineer an Open Source driver. When taken in to account the insane DCMA, there is no way to legally use such hardware, because the mere act of even attempting to reverse engineer (even using a clean room method) will be considered illegal!

It's bad enough we have a screwed up software patent system. Now thanks to Vista selling out to DRM, it will only get crazier and crazier. If we're lucky, we will see that suicide note realize, or Vista somehow undoing this mess with a service pack before its too late.

Saturday, February 10, 2007

Sleeping on the net

Well, I can finally fall asleep, (in bed) while browsing the net on my PSP over wireless. Thats right ADSL has finally come home. I was waiting for it to come to our neighborhood for the past two years or so. For those can recall would know that I had to go through several painful temporary solutions with nothing much to settle on. At last now, I can finally disconnect that CDMA piece of crap!

Getting the ADSL connection wasn't painless either. Since it was my dad who owned the phone line, I had to get him to sign the forms and even submit a photo copy of his ID since he couldn't be there in person.

The real problem was that I only got to know about it, only after trying to handover the filled form. So I had to make two trips over two days just for them to accept the application. But that wasn't the end of it.

I initially handed over the form to the WTC Teleshop, and waited for about a week before calling to check on progress. Thats when I realized what seemed to have been a lost application in transit - from WTC to the Kotte exchange.

I wasn't in the mood for a miracle, so instead decided to fill in another form and to take my dad along to the Kotte exchange, this time around. We hit another snag when they said that according to their computer system, we hadn't paid the last phone bill, despite my dad remembering it was paid a little over 3 weeks earlier. It turns out that when you pay bills through the bank it can take some time. Since the system didn't allow our application to be entered with an outstanding balance, and since we hadn't brought our receipt, we decided to repay the last bill with the understanding it will be adjusted in the next bill. Fortunately they did let me add the ADSL connection fees on credit to the next bill as opposed to paying it then and there.

If all this wasn't enough, I later came to learn that our home address was somewhat outdated on the SLT database. Basically we used to use a different house number (Don't ask me why) to the one we use now. This resulted in another request to fax a letter signed by my dad explaining it.

But finally when all of that was sorted out, I did get the connection in just two days. So if I hadn't gone to the WTC teleshop and instead gone direct to the Kotte exchange and didn't have the address issue - so in an ideal world, I would have got it in just two days, which in itself is pretty amazing (considering what they tell you its gonna be). I am yet to officially be notified of my connection though.

For anyone is wondering about ADSL, head on over to http://www.slt.lk/data/forhome/106adsl_areas.asp and wonder no more.

Friday, January 19, 2007

My first post for 2007!

Been really really busy the last couple of weeks at work that I really wasn't in the mood for blogging. But what better way to break the ice, and kick off blogging in 2007 than to do it on your Birthday. Yes! you heard me right folks, its that day of the year, when your not sure whether you should be happy and excited or anxious and lost.

I've just hit 30, a couple of hours ago and at this point, I'm still contemplating how I should feel about it. Should I declare myself as an old person or as a (not so old) person. Oh!, how the passing of a few hours can try to change your (outlook on) life :)

And thats' sort of how I feel about this year. I'm very excited about 2007, from a technological standpoint, but not so sure with the way the world is ticking. But first, here are some things why I think things are going to be exciting this year:


  • Linux Desktop Effects: Compiz and Beryl blew away the competition, and excited anyone who saw them. Expect more exciting developments from those two projects and of course the upcoming Ubuntu and Fedore distros that will make use of them out of the box. Desktop Linux is on steroids, and several projects such as the effort of the Opensource nvidia driver, possibly better Opensourced ATI drivers are going to make things much much better. I will fall short of saying, this is the year of the Desktop Linux.


  • GPL v3: GPL v3 will be finalized this year and we can expect to see some projects migrate to using GPLv3 from GPLv2, while some may even make a stand saying they will not migrate to it. But what is certain is, the debate wont be over. There is sure gonna be some more of those interesting discussions involving the controversial DRM and software patents issues. I was listening to a podcast with Jeremy Allison, of the Samba Project think that Microsoft might actually have to rethink their deal with Novel, when it comes them distributing SuSe Linux coupons they bought from Novel, if they want to continue to rant about the so called "every Linux user owes Microsoft an undisclosed amount of debt" piece of crap. Because the GPL v3 patent clause says that you can't distribute a software if you know that it violates any patents and if you distribute a piece of software, then you cant later sue claiming patent violations. So essentially, if you are a patent owner and you distribute a software then by that very act, you've given the community a promise you won't sue.


  • Windows Vista: For the majority of people who has been running a 10 year+ old Operating System, something to look forward to. While I don't think people will flock to shops to grab Vista, people opting to buy a new machine has something to look forward to. I think we will have 1GB become the standard memory size and most people will opt for 2GB memory as a result of the high hardware demand.


  • Apple's Leopard: Like with all of Apple's products, we are going to be dazzled seeing Steve Jobs demoing Apple's next OS. Though people probably wont rush to buy an expensive Mac, it will probably set a trend with some cool features that other OSes will eventually want to copy.


  • PS3: This awesome gaming machine, is going to totally kick ass! I think we'll hear a lot about the PS3, not just about the games but also other cool things involving Linux. The PS3 might be the killer device for Linux because, unlike a PC which could run many OSes, the PS3 currently can only run Linux besides the games.


  • iPhone: The iPhone is cool. Sure it may actually have less features than some of the SE or Nokia N series phones, but the freaking touch system coupled with the interface is hard to resist. I just hope they manage to have a 3G unit (with 2.5G + EDGE) in by the end of the year.


  • Nokia N800: Ok this phone isn't really a phone. Its the successor to the 770 tablet. Similar to the 770, I don't think a lot of people are going to buy it, mainly because Nokia doesn't seem to want to push it aggressively. But nevertheless it is an awesome device that runs on Linux and already has many useful applications. Its definetely a geek must have gadget.


  • OLPC This is one cool gadget that people are going to rush to somehow get their hands on. I hope kids won't get mugged in the process :). Its got a cool new interface (which I sort of found awkward at first), runs Linux, has WiFi built in, and has an innovative way of charging the battery my using some sort of mechanical energy (rotating shaft).

  • Second Life: Its been around for sometime now, but as a result of recent high profile events by organizations such as IBM and Sun having virtual replicas inside Second Life, and holding virtual conferences attended by many, the popularity of it has picked up. Second Life is like an early manifestation of the Matrix, a virtual world that some people will spend more time in than in the real world. Recently there was a woman who successfully runs a virtual real-estate business and as a result has became a millionaire (in terms of real world money) inside Second Life. I think there will be some mobile clients of second life on some hand held devices (if it hasn't already happened) and I think I heard that they might OpenSource some of it.



We sure are living in crazy times. Especially when you hear stuff like this year being one of the most hottest ever, or the fact its damn cold in California with snow in the Malabu area after some 20 years, or the recent floods in Asia with yet another Tsunami warning. And to top it all off, the Doomsday Clock, which is maintained by some of the top physicist, was brought forward by 2 minutes, and now stand at 5 minutes to destruction of all things as we know it!

That's why, (like my age), I'm not quite sure whether to be excited about 2007 or feel a little bit lost.