XBMC on Dell Inspiron 400 (Zino HD)

Of late, I have been trying to wean myself off Windows systems. First my Laptop, then my desktop and now my HTPC unit. Linux systems just feel snappier and they have come a really long way in terms of “just working” on common hardware.
Yesterday I did full volume install of XBMCbuntu (“Gotham”), wiping out the old Windows 7 OS installed on the unit. Once again, the results were extremely impressive, and reinforced my belief that Linux systems (esp ubuntu/debian based distros) are here to stay. Based on my experience, I can confidently say that unless you have archaic hardware, Linux should provide a much better experience than Windows.

Here is the config of my Zino HD HTPC (purchased in 2010):

1.5GHz AMD Athlon X2 3250e
256MB ATI Radeon HD 3200 (integrated ATI graphics chip)
250GB, 7,200 rpm HDD
DVD burner
Gigabit Ethernet
Dell Wireless-N WLAN 1520 Half MiniCard

Lenovo Wireless Multimedia Remote (A fully working remote when I tried the live cd was a welcome surprise:-)

Connected to a 40 Inch LCD TV (Sony Bravia KDL-40S4100) via HDMI.

The setup itself was super smooth – pop the installation media, select install, standard Ubuntu installation steps. ALL hardware was detected and fully functional right after the install and reboot. The system takes about 3.5 GB of disk space. Suspend, Hibernate, Shutdown work as expected. The UI is very intuitive and responsive, and I definitely consider it an upgrade over Windows Media Center!

To make the UI align perfectly on your display, there is a setting (they really have thought of everything !)

System->settings->system->Video Calibration

If your TV is like mine, you will not see the corner markers shown at http://wiki.xbmc.org/index.php?title=Calibration#Video_calibration… (Pay close attention to the top left and bottom right screen markers in the images – You want them to perfectly align with the corners of your TV screen). Move your mouse cursor to the top left – the caption will change to indicate that you are adjusting the top left corner, then use cursor arrows to move the markers into position. Repeat for bottom right corner, and subtitles.

I tried a bunch of themes (after installing the Fusion repository), however none were as sleek and well rounded as the “Confluence” theme installed by default. The linux open source driver (Gallium 0.4) DOES NOT support hardware decoding (yet). However the CPU seems perfectly capable of rendering videos smoothly – The max load I noticed using the video overlay option was each core at 50% while playing some videos on my NAS).
I am quite happy with 720P video playback as my internet speed is definitely a bottleneck for streaming 1080P videos.


Not Yet Ready for Ghost

There has been quite a lot spoken and written about the new blogging platform that is supposedly poised to revolutionize online writing in general. I took time to play with Ghost  this weekend, and here are my thoughts regarding why I will NOT be moving to it anytime soon.

According to Ghost’s sales pitch, their Raison d’être are the following:

1. Use of Markdown

2. Instant feedback regarding look and feel using a split screen

3. Futuristic dashboard

Here are some of my counter arguments (and reasons why I prefer to continue with my wordpress blog):

1. I use Markdown for GitHub because I am forced to.. it is not exactly a walk in the park to get things to look the way you want it to! For plain text, Yes. But if you are doing non-trivial layouts (images even), the markdown syntax can slow you down. It is a new syntax and learning (and unlearning) is involved (fortunately though, Ghost also allows for html). Still, expecting everyone to use markup (or html) to compose blogs is a tall order!

2. Windows live writer: I am a die-hard fan of WLW, and have been for the past 8-10 years. Currently, WLW cannot talk with Ghost and that is a big issue for me.

3. Offline access: You need to be online for the Ghost live preview function to work. Otherwise, you will just end up typing markdown in a notepad like environment. WLW mentioned above solves the offline problem nicely. What’s more, you can even download your blog’s wordpress theme into WLW and view a preview exactly like it would look online. In fact, almost ALL my blogs are composed offline on WLW and then published.

4. Free vs Paid: There is currently no free offering for ghost blogs. Most folks currently using ghost are either on their personal VPS or on some paid ghost hosting provider. Note that there is no SEO optimization or backup or spam block or CDN speedup or any of that good stuff when you use a personal VPS for setting up your blog (all of which come standard with say a free blog hosted on wordpress).

5. Comments: In my opinion, online blogging as a medium gained popularity because of the social aspect – so people may comment, react and question your thoughts and ideas. The advice seems to be to integrate disqus or facebook for comments. I do not agree with that line of reasoning.

6. Dashboard: Yeah the Ghost dashboard is indeed yummy. But I also happen to like how WordPress does it. The global map displaying regions of access and common search terms used to reach me are all I usually look at.

Bottom-line: This blog uses a dead simple theme (suits) – All sidebars and footers are collapsed to boost real-estate available for content. Well received blogs authored by me usually get promoted to the first or second page in a google search (which is what really matters – there is no point expending resources towards blogging if your content is not reachable). So, if simplicity is your goal choose a simple theme on a platform that allows you the flexibility to grow.

I still love blogging using my Live Writer client, and for me, wordpress is still “just a blogging platform”.

PS: There is a new plugin named Gust (still in active development) that replicates a Ghost look and feel in WordPress. Still if you concur with my observations above, this should not enthuse you too much!

ASUS Transformer TF101

Last week, in the midst of the HP Touchpad frenzy (which I could not get in on, by the way), I decided to pull the trigger on an ASUS Transformer (TF101). After having played with it sufficiently, I am really happy and excited about my purchase!

If Apple has taught us anything, it is that the hardware and software go hand in hand towards a great user experience, and Asus definitely followed this. Out of the box, people want to surf the web, listen to music, watch movies, play games, buy apps, and read books – The transformer really excels in ALL these areas as an extremely user-friendly tablet.

If you are on the fence about buying a TF101, hopefully, this blog should help you make up your mind!

Android 3.0/Honeycomb is a glorious OS, and the Transformer has the right hardware to make everything extremely fluid and fast. Asus has also paid close attention to customizing the software for the Transformer. Oh.. and the screen on the Transformer is gorgeous! 10.1 inch, 1280*800 pixels of super-responsive real estate.

Most software that you require to be productive has already been included on the Transformer(or available as a free download). The Android market is literally littered with apps. Writing “good” software that plays well with the available hardware is hard.. So, I am extremely cautious about downloading stuff off the market. I always prefer apps that have been tried and tested.

Connecting the Transformer to a computer to transfer data is also a cinch.. Just use the USB cord shipped along with the unit. The transformer shows up as a drive (Windows 7 automatically recognizes and installs the required drivers).

Here’s what my home screen looks like – with my most commonly used apps lined up at the bottom:


Here is a list of apps that I use regularly (and I strongly recommend each one of them):

1. Browser : A version of Chrome. Very snappy and full featured (You will be prompted to download Flash on first use). There is really no reason to download another browser.

2. YouTube : Great app customized for tablets. Makes flipping through videos a joy!

3. File Manager : Folder manager app created by ASUS. I actually prefer this to the highly acclaimed “Astro” file manager.

4. Polaris Office: Included by Asus. Lets users easily read and edit various office document formats (.docx, .xlsx, .pdf etc). I prefer this to “Documents to go”. (Although this reads pdf files, the Adobe reader does a much better job of rendering pages)

5. Amazon Kindle: Enough said!

6. 2X Client : This is a free remote desktop client. 2X actually designs and develops load balancing servers (which we use for our terminal services at work).. So, I have absolutely no qualms in recommending their RDP client. Works flawlessly with minimal resources.

7. Repligo PDF Reader: The most feature rich PDF reader available for android (The feature that I absolutely love about Repligo is that it remembers the last page read. The Day/Night mode is also very helpful). The official PDF reader by Adobe is not yet there in terms of required features.. but is a close 2nd choice.

8. MX Video Player : An awesome media player for Android.. It uses custom codecs to take advantage of processor specific features(H/W acceleration). It allows me to play a wide variety of video files on my android (The full-featured free version displays ads only when you pause.. not at all obtrusive).

9. Due Today : A full featured task management/reminder system with a very good UI. It also syncs with ToodleDo when online.. so you have your tasks securely backed up. There is another highly acclaimed app named “Beautiful Notes” that competes in the same category. I personally chose “Due Today” because 1. it is more structured and captures data in numerous fields 2. It is much more light weight (500KB) vs Beautiful Notes (8.5 MB)

10. Windows 8 Notepad: A very functional notepad replacement. I love its clean and minimalistic design. Available for free from the Android market.

Configuring the Keyboard (Setting->Language & input)

The ASUS keyboard is vastly superior to the stock android keyboard.. But it can be further enhanced using the configuration options available:



I checked ALL available options on mine.. Note that the Swype style functionality is built into the ASUS keyboard app. This is really handy and works great (not to mention the ‘cool’ factor!).


Setting up VPN (Settings->Wireless & networks)

Honeycomb also has built in support for VPN –  Click on the “VPN Settings” option:


Next, select the type of VPN (L2TP is the easiest to set up)


Enter your values for VPN Name, Server, and pre-shared key.. Yes.. its that easy!


And for those of you curious about how I did these awesome screen captures – No.. it is not an app! The feature is built right into the Honeycomb OS (Settings->Screen->Screenshot). This takes a screenshot if you keep the “Recent apps” key pressed for about 3 seconds (this is the icon next to the “Home” icon at the bottom of the screen. The pictures are saved in the “Screenshot” folder of your main SD card  (you can get there using the File Manager app)


memcached on 64 bit Windows

Download memcached 1.4.4-14 from here (note that later versions of memcached have been modifed and DO NOT work as windows services).

Unzip to a folder on your computer (say d:\memcached)

Open an ADMINISTRATOR command window, and navigate to the memcached folder:


Typing “memcached –h” will display all the available options

1. Install memcached service on your system by typing

memcached.exe –d install

2. Tell memcached to start

memcached.exe –d start

You are done.. When you view your taskmanager, you will notice memcached service running:


This service is setup to autostart with windows so you will not need to repeat the above.

Now, if you want to access/use memcached via php (or Zend Framework), you need to install  php_memcache extension.

php_memcache.dll comes bundled in a zip file available here (Many thanks to Anindya for making this available). Extract and save the dll file in your php ext directory.

Edit your php.ini and add this line:


Restart Apache.. Navigate to your phpinfo and you should see a section for memcache.

Installing APC (3.1.6) on WAMP (64 bit)

My dev machine has 64bit wampserver installed on windows 7 (MSVC9 (Visual C++ 2008) , Thread Safe, x64). I wanted a caching solution that works well with this setup – As of this writing, APC is the only 64 bit option available.

Get the precompiled TS dll from here (In the comments posted on this page, you will find a link to php_apc.dll without memprotect). Save it in your php “ext” directory.

Add the following line to your php.ini file :


Restart apache web server..browse your phpinfo page, and it should have a section for APC – The defaults work fine for a test server setup.

Next, setup the admin page – this will help you view/clear your variable cache(s):

  • Download apc.php from here
  • Save it in your webfolder as apc.php
  • Edit apc.php. Change the admin password (from the default ‘password’ to any string of your liking):

defaults(‘ADMIN_USERNAME’,’apc’);             // Admin Username
defaults(‘ADMIN_PASSWORD’,’pAssW0rd’);      // Admin Password – CHANGE THIS TO ENABLE!!!

Sync files with your NAS

I have my main workstation (Windows 7 64 bit) connected to a USB hub having connecting cables for my scanner, camera, webcam, handycam etc. All these external devices deliver content into my “Users” folder. The goal then is to have content in the “Pictures”, “Videos” and “Documents” folder in my main workstation transferred automatically to my DNS-323 NAS so that

  1. Files are backed up
  2. Files are easily accessible from any computer in my network

“Sync” and “Backup” are two commonly used (or misused) terms to describe the above. Here are the important differences between the two:

  • A “Backup” file is not usually human readable.. it needs to be “Restored” using the software that created the backup
  • Sync is 2-Way while Backup is 1-Way (although, depending on the software employed, you could set “master-slave” rules that mimic a backup plan)
  • While both Sync and Backup are incremental in nature, Backup additionally employs some compression on your files in order to reduce storage space. Sync utilizes exactly the same space on the source and destination.

Having decided that “Sync” was the better option for me, I found that a tool named “SyncToy” from Microsoft satisfied my requirements exactly. I just love the simplicity of its user interface!  Whats more, it is FREE, works exactly as advertised,  has a small footprint (~1 MB), and works natively on 64 bit windows (As an aside, I really think Microsoft should have incorporated this into “Live Mesh” – another sync tool offered by MS that syncs with its cloud based storage).

One shortcoming (if you want to call it that), is that SyncToy does not offer “automatic or scheduled syncing”. It is however pretty trivial to set this up using the built in Task Scheduler in Windows 7 (described below).

Here’s how I setup SyncToy on my main desktop:


Note that I use the static IP address assigned to my NAS in the “Right Folder”. Please refer to my blog on how I setup my NAS for additional information.

Pay particular attention to the options presented on the next screen.. This forms the core of your sync strategy. “Echo” works nicely for my setup.. but you might want to select “Contribute” if you do not want to propagate deletes.



Repeat the process for all folders on your workstation that you want to sync to your NAS. You are done setting up the sync rules at this point. You can click on the “Preview button” to view all the files/actions.

Using Task Scheduler to schedule the sync:

Although SyncToy can be run on demand anytime, Automating the process gives you the confidence that your invaluble docs, pics etc are safely synced on a regular basis (I strongly recommend you check the logs the first couple of times just to ensure that all went well).

Click on the Start menu, then select All Programs –> Accessories > System Tools –>Task Scheduler

(Alternatively, you can simply search for “Scheduler” in the win 7 search box).

Click on “Create Basic Task”:


Enter a name for your job.. and a brief description:


Next up, the trigger event. I setup mine to sync every week. You may want to tweak this depending on your circumstance… You can get REALLY granular ..Feel free to explore the available options.


(Note that you SHOULD NOT select “When the computer starts” because it fires prior to login.. so neither your security credentials nor your LAN connection is ready at the time)



Under “Program/Script”, click on Browse button and locate the SyncToyCmd.exe – Note: Select SyncToyCmd (command line version) and NOT SyncToy(GUI). In the “Arguments” field, enter “-R” (for running all the sync folders setup).


Finish up.. and you are done with the scheduling process.

Hiding the command window:

When the scheduled process runs, it brings up a DOS command window (“taskeng.exe”) displaying the progress of the sync operation. This may not be acceptable to some. Here’s how you can suppress it:

1. Create a file named “Auto.vbs” (Ofcourse you can call it anything, I chose “Auto”) in your SyncToy folder with the following contents:

Set WshShell = CreateObject(“WScript.Shell”)
WshShell.Run Chr(34) & “C:\Program Files\SyncToy 2.1\SyncToyCmd” & Chr(34) & ” -R”, 0
Set WshShell = Nothing

2. Edit the scheduler script that was setup earlier to execute “Auto.vbs” instead of “SyncToyCmd.exe” (Remember to remove the –R switch from the arguments field as it is already included in the script)

Editing an existing scheduled operation using the task scheduler is actually a little convoluted.. You have to double click on the task.. then, select “Properties” from the right side action pane. This opens up the task for edits.

Note that once you have the basic scheduling in place, you can add any number of folders to SyncToy and it will be handled automatically during the next Sync!

Setting up PHPUnit (on Wamp)

Feb 26, 2011 Update: I finally managed to get PEAR and PHPUnit installed on WAMP. Click here for details

For the life of me, I could not get PHPUnit to install properly using the regular PEAR install process (and, most online installation instructions are either geared towards MAMP or LAMP). So, I thought I would document the easiest way to get it working for a WAMPServer setup.

Step1: Download the following files onto a location of your harddrive from http://pear.phpunit.de/

a. PHPUnit
b. File_Iterator
c. PHP_CodeIterator

d. Text_Template
e. PHP_TokenStream
f. PHP_Timer

Step2: Unzip all and copy them into the PEAR install directory (not a requirement, just a convenient location to store them. The path will need to be added to the include_path in php and the “path” environment variable of windows).

Pay attention to the placing of PHP_TokenStream components.. The phptok.bat and phptok.php should be placed in the mean pear directory.. and the token.php and token subfolder go into the PHP directory.

Also, Timer.php extracted from PHP_Timer goes into the “PHP” folder.

After the unzip, your directory should look like this:


Step3: Add a “UserVariable” named PHPBIN pointing to the location of php.exe on your system.


Add the path into the OS path “System variable” as well:


Finally, add it to the include_path setting in php.ini.. This is what mine looks like:

include_path = “.;D:\wamp\bin\php\php5.3.0\Zend\ZendFramework-1.9.4\library;D:\wamp\bin\php\php5.3.0\PEAR”

Step4: Prepare the files:

a. Edit “PHPUnit.bat” and change the last line to include the actual full PEAR path. And, change phpunit to phpunit.php like so:

“%PHPBIN%” “@bin_dir@\phpunit” %*

“%PHPBIN%” ” D:\wamp\bin\php\php5.3.0\PEAR\phpunit.php” %*

b. Edit “PHPCov.bat” and change the last line to include the full PEAR path, and change phpcov to phpcov.php:

“@php_bin@” “@bin_dir@\phpcov” %*

“@php_bin@” “D:\wamp\bin\php\php5.3.0\PEAR\phpcov.php” %*

c. Edit “PHPTok.bat : repeat the same edits as in step b.

The last line should look like:

“@php_bin@” “D:\wamp\bin\php\php5.3.0\PEAR\phptok.php” %*

Now, you should be all set to run your phptest cases. To verify that your install is successful, open up a command window and type phpunit. You should receive correct usage directions.

Also, note that Netbeans offers excellent integration with phpunit. Read more about this here: http://netbeans.org/kb/docs/php/phpunit.html