Wednesday, December 8, 2010

Customizing Windows 7 mp3 infotip to display album, song title

It seems like Windows 7 defaults to not showing song title when hovering over mp3 files to bring up the infotip.

Googling a little got me to Microsoft Knowledge Base 830411, and I found HKEY_CLASSES_ROOT\SystemFileAssociations\.mp3.

After a little trial-and-error, I found that modifying the "InfoTip" registry key was all it took.

Before change

After change

Viola! Now I get the song name, the album name, and the bitrate just by hovering my mouse over the mp3.

Sunday, December 5, 2010

Dropbox hangs VirtualBox and VMware Server installation on Windows 7

Just thought I'd post a short note that it appears that Dropbox amazingly hangs both VirtualBox and VMware Server installation on Windows 7.

I initially had trouble installing VirtualBox, which hung around the 80% mark (estimated based on the progress bar), after it asked me for permission to install various drivers (USB, network, etc). Coincidentally, VirtualBox released a newer version, 3.2.12 a few days later, and I gave it a try, yet it failed at the exact same point.

I gave up on VirtualBox at that point, and decided to install the discontinued (and much more system intensive) VMware Server 2.0, but to my surprise, it too hanged during installation.

After some fiddling, I gave the age old "requirement" to close all open programs I could find, and to my surprise, both installation went through without a hitch. I suppose I could have left things be at this stage, but I went on to attempt to isolate what was causing the installation issues on my system, and to my surprise, it turned out to be Dropbox.

Windows 7 (64-bit)
Dropbox (0.7.110)
VirtualBox (3.2.10 and 3.2.12)
VMware (2.0.2 build 203138)

ps. There doesn't seem to be too much information on this on the web, so if this happens you as well, drop a note in the comments on the various software version combinations in your case.

Thursday, October 28, 2010

easy windows management for XP and Vista (ala Windows 7)

At work, I'm lucky enough to have available Microsoft site licenses for most Microsoft software, including the various operating systems.

I've grown to appreciate the Windows 7 hotkeys for window management, Win + up/down/left/right, that allows hotkey access to moving a window amongst multiple monitors.

However, my home machine is still running Win XP, and I've always felt greatly handicapped (productivity wise) in having to reach for the mouse to move windows around.

No longer. I recently found Easymon (, which is a small, free application that allows almost identical functionality.

No more reaching for the mouse! :)

Friday, October 1, 2010

sending email from OpenWRT 10.03 Backfire (on boot)

My OpenWRT 10.03 Backfire isn't entirely stable when running transmission, and I would like to send simple notification emails to myself from my OpenWRT router whenever OpenWRT rebooted.

I'm accustomed to the "mail" command line program, but it is neither installed nor available in OpenWRT. Doing some digging with opkg and grep, I found a program called ssmtp that seems to do the job.

Installed ssmtp with the usual "opkg install ssmtp", and a little further digging led to finding the configuration file in /etc/ssmtp/ssmtp.conf. In my case, my ISP didn't require any security, so I simply set the "mailhub" option to my ISP's SMTP's server.

However, sending a test email to myself threw up the following error:
root@openwrt:/etc/ssmtp# echo test | ssmtp -s "test"
 ssmtp: 553 #5.5.4 Domain required for sender address

I guess my ISP's mail server insists on the sender domain being filled in, so I also set the "rewritedomain" option. (I also set the "hostname" option.)

Lastly, to accomplish my aim of sending an email to update me when  OpenWRT reboots, I added the following line to "/etc/rc.local".

echo "Subject:`hostname` booted at `date -Iminutes | sed -e 's/T/ /' | sed -e 's/+.*//'`" | ssmtp

The results are good enough for me. I now receive an empty email with a subject line in the form of "hostname booted at 2010-10-01 10:59" whenever OpenWRT reboots.

Now to the much more complicated task of figuring out if transmission/screen/top or some other background process is causing the spontaneous reboots. :(

Sunday, September 26, 2010

USB flash drive on OpenWRT 10.03 Backfire HOWTO

There's been a number of guides for using USB flash drives on OpenWRT, but they all seemed to be overly complicated, or for previous versions of OpenWRT before 10.03 Backfire, for which it's now pretty simple.

This guide is written with the assumption that your USB flash drive is already formatted in ext2 or ext3, but ends with pointers on what to do if not.

Starting with a clean install of OpenWRT, the following packages are already installed.

root@OpenWrt:/mnt# opkg list-installed | grep usb
kmod-usb-core -
kmod-usb-ohci -
kmod-usb2 -

1. Install USB mass storage support. 

root@OpenWrt:~# opkg install kmod-usb-storage
Installing kmod-usb-storage ( to root...
Installing kmod-scsi-core ( to root...
Configuring kmod-scsi-core.
Configuring kmod-usb-storage.

2. Install the necessary file system support, in this minimalist case, ext2. (Other common file systems include ext3, reiserfs, hfs, msdos, vfat and ntfs.)

root@OpenWrt:~# opkg install kmod-fs-ext2Installing kmod-fs-ext2 ( to root...
Installing kmod-fs-mbcache ( to root...
Configuring kmod-fs-mbcache.
Configuring kmod-fs-ext2.

3. Create a mount point. I chose to use /mnt/usb for my USB flash drive.

root@OpenWrt:/mnt# mkdir /mnt/usb

4. Mount the USB flash drive. The "-o noatime" is used to reduce the number of disk writes (as USB flash drives have a limited number of write accesses) and to slightly improve performance.

root@OpenWrt:/sbin# mount -o noatime /dev/sda1 /mnt/usb

5. That's it, done.

root@OpenWrt:/mnt/usb# ls -l /mnt/usb
drwx------    2 root     root        12288 Sep 26 10:52 lost+found
root@OpenWrt:/mnt/usb# df -h | egrep "system|usb"
Filesystem                Size      Used Available Use% Mounted on
/dev/sda1               232.9M      6.0M    214.8M   3% /mnt/usb

What if the above steps doesn't work out?

A possible reason is that the USB flash drive isn't formatted in ext3. You can then either install other file system support (by replacing step 2 with kmod-fs-vfat, kmod-fs-ntfs, kmod-fs-msdos, kmod-fs-ext2, etc. as necessary) or format the USB flash drive to ext3 using fdisk followed by mkfs.ext3.

Another possibility may be that you need to install the appropriate character encoding (also known as code-pages) to suit your language/locality. Such modules are typically named kmod-nls-xxxx, eg. kmod-nls-cp437, kmod-nls-iso8859-1 or kmod-nls-utf8.

Saturday, September 11, 2010

Gargoyle Router Management Utility on the TP-Link WR-1043ND

Since my Googling hasn't really turned out any meaningful results, just to add a short "web-note" that Gargoyle seems to run well on the TP-Link WR-1043ND.

Will update as I have more meaningful information to add.

Friday, September 10, 2010

OpenWRT 10.03 on TP-Link WR-1043ND wifi not accessible

Recently bought a TP-Link WR-1043ND, and after trying out the current latest firmware from TP-Link, immediately tried to install OpenWRT on it.

Following the instructions on the OpenWRT wiki, and installed version 10.03, which is the latest stable release. The installation went without a hitch, and I was immediately trying out the web-interface, but the installation didn't detect the wifi interface. After a period of Googling, rebooting and general fiddling, I gave up, and installed the latest beta release, 10.03.1-rc3.

This time, it immediately detected the wifi interface, and I'm now happily using and exploring OpenWRT.

Tuesday, August 10, 2010

Wednesday, July 28, 2010

my search for a password manager

I've finally gotten to a point where I needed a secure password manager.

There are tons of password managers on the web, and my only requirement was that there was some way to make it available on my iPhone.

KeePass: open-source, but lacks quality iPhone apps
Roboform: free iPhone/Android apps, free limited to 10 passwords
Lastpass: very polished, iphone/android apps for premium
SplashID: very polished, desktop and iphone apps are costly
Dropbox text notes: not protectable

For now, my decision is to go with Roboform, as my requirements were only to have a password list available. Should I require automatic web form filling, I may opt for the Paid Roboform.

Also, Lastpass and SplashID looks very polished, professional setups. Should I outgrow Roboform, then these two would be where I may turn to.

Wednesday, July 14, 2010

dd performance: block size matters

I was happily planning on using dd to wipe a drive empty, until this depressing statistic stared at me.

85231 byte/sec

A few (ok, many) furious secs of mental maths leaves me depressed at my having to wait 200+ hours to wipe a 72gb enterprise SCSI-3 drive. This can't be right!

Luckily, a light bulb at the back of my head reminded me that the dd command did have options that allowed specifying the block size: the bs=512 for example.

Anyway, I experimented with various block sizes from the presumably default 512 (bytes) all the way to 64mb, found the optimum value somewhere within the range, and stuck to it. The resultant best speed was approximately 9mb/sec.

Here I'm intentionally trying to leave out the optimum block size I discovered, as it is very likely to be system and disk dependent.

But what is clear, and in hindsight, pretty much common sense, is that too small a value, and the disk wastes too much time seeking to read/write small blocks. Too large a value, and other system inefficiencies come into play, such as buffers/caching/paging.

In short, if you're performing a long operation, it definitely pays to experiment first to find a more optimal value than the default.

monitoring dd performance in FreeBSD

dd is a massively useful command found in various flavours of Linux and UNIX'es.

I was using dd to wipe a hard disk, and whilst the basic command itself was easy to find "dd if=/dev/random of=/dev/xxxx", where xxxx is your disk device, keeping tabs on the progress of what is likely a reasonably long wait was not.

There were quite a few sites/forums that listed using "kill -SIGUSR1 nnnnn", where nnnnn is the process id of the dd you're trying to monitor, but it didn't work on my FreeSBIE liveCD. The command is supposed to make dd return some output, and continue running, but in my case, it simply killed the process.

A little RTFM (yes, by that, I mean "man dd") later, I discovered that the equivalent signal in FreeBSD is -SIGINFO, meaning the equivalent command is "kill -SIGINFO nnnnn".

Wednesday, July 7, 2010

Cloning a VirtualBox hard disk (.vdi)

I was trying to clone a virtual hard disk, and didn't realize that making a backup of a VirtualBox Machine (.vdi) is more complex than just copying the file.

The UUID of the duplicated (clone) vdi file was identical to the original, and VirtualBox will not allow the adding of the duplicate.

In doing that, I found a link hidden deep in the bottom of a forum page that allowed me to modify the UUID without having to redo the entire process.

VBoxManage internalcommands setvdiuuid vid_filename.vdi
(You may have to add the full path for the VBoxManage command if it's not in your path.)

Btw, the proper way to backup your VirtualBox Machine is by using the clonehd subcommand.

VBoxManage clonehd original_file.vdi clone_file.vdi.

Sunday, April 18, 2010

I've been running Windows Task Manager at startup ever since Windows 98 (I think). What I've always done was to create a shortcut, set the shortcut to run minimized, and throw the shortcut in the Startup folder. Another thing I do is to set the option in Task Manager to "Hide When Minimized".

Having recently upgrading to Windows 7, an annoyance was that creating a shortcut from taskmgr.exe resulted in a Task Manager that didn't show processes from all users by default, which I guess is a result of the new UAC model.

My "hack" was to simply configure the shortcut to run as Administrator in the Advanced Options. Now Task Manager defaults to running at startup with the "Show processes from all users" already activated.

Tuesday, March 9, 2010

converting (transposing) alphabets to numbers in Microsoft Excel

To convert alphabets to numbers, Microsoft Excel contains the "code" function that converts an alphabet to it's ASCII value.

The "char" function converts it back.

To transpose it, convert the alphabet, add/subtract the transpose formula, and convert it back to a number.

A1 (basic alphabet): A
A2 (drop 2 grades): 2
A2: = char(code(A1)-2)

ps. To credit the source, I actually found the information from Yahoo! Answers, but my preferred method isn't the preferred. After having register, fill in a few pages of information, only to find out I'm not qualified to give a "Thumbs Up" to what I felt was the better solution, I gave up and decided to post it here instead.

Monday, March 8, 2010

Eliminating audio background hissing on Fujitsu Lifebook S6410 on Windows 7 64-bit audio passthrough

I routinely plug my TV/radio into the mic-in jack of my notebook, and listen to it through the headphone jack, so that I can watch TV and listen to the audio-alerts or youtube from my PC concurrently.

Having recently updated my OS to Windows 7 64-bit, and using the default audio drivers that came with it, I was pleasantly surprised that (other than enabling the volume from the mic) no particular configuration was necessary to enable audio pass-through.

However, I soon realized that there was a consistent hissing sound. Initially reluctant to install 3rd-party drivers into what has been a vanilla and generally very stable Windows 7, the hissing eventually irritated me enough to take the plunge and install the generic Realtek High Definition Audio drivers (in this case the R243 version).

The 50+ Mb Realtek executable file installed perfectly, silently removing the Microsoft drivers and prompted a reboot. Upon reboot, I opened Control Panel -> Hardware and Sound -> Realtek HD Audio Manager, and enabled "Playback Volume" for the microphone.

Viola! The hissing was totally gone, audio passthough works without a hitch.

Monday, February 22, 2010

Wikipedia https Google Chrome Omnibar Keyword Search

I am a small-time Wikipedia contributor, who tries to make edits whenever possible, in areas I'm capable of contributing, to do my small part in "giving back" to community.

I use browser-based address-bar searches often, bypassing web-site front pages, saving 30-90 secs in the process. I am also somewhat security conscious, therefore I prefer searching from the secure Wikipedia site by default, so that should I spot an edit that I can make, I am already logged in (using https) and can make my edits immediately.

Google Chrome and Opera are my default browsers, but one thing that has irked me was that while it is very easy to configure Opera to search Wikipedia using the secure site, Chrome has steadfastly refused to automatically add Wikipedia search from it's https site to the Chrome Omnibar (address bar) Search. In contrast, Chrome has no such problems adding the non-https search to Omnibar Search

Today, I finally decided to figure out the search string and configure it manually to the search in Google Chrome. Hope this helps someone else!

Sunday, February 21, 2010

set Critical Battery Level in Windows 7

Having recently installed Windows 7 (64-bit), I faced the irritation of Windows 7 not allowing me to drop the Critical Battery Level below 11%. The dialog box allowed me to change the value, but whether I click OK or Apply, my changes did not take effect. The next time I opened power options, the value went back to the default (in my case) of 11%.

Having Google'd extensively, I found quite a few guides on how to use powercfg, as well as others facing the problem, but no exact configuration command line.

I list the command here, with a "quick-and-dirty" explanation of the various portions of this command. You will have to use a Administrator Command Prompt for this command to work.

"powercfg -setdcvalueindex scheme_current sub_battery batlevelcrit 3"


  • "-setdcvalueindex": running on DC power (ie. "On battery")
  • "scheme_current": applies to currently selected power scheme
  • "sub_battery": the battery related sub-group within the power options
  • "batlevelcrit": the critical battery level property
  • "3": 3 %, which is my desired setting. Pls use whatever battery level you prefer to activate your Critical Battery Alarms at.

The following are the other guides I cobbled together the above information from.

  1. Setting Critical Battery Action To “Do Nothing” In Windows 7
  2. Powercfg on Battery Power

Sunday, February 14, 2010

How many times have you updated Firefox to see this. Whoops, your favorite extension hasn't caught up yet, and if it's an essential one like "Tab Mix Plus" or "DownThemAll", your online life is going to royally suck for a while at least.

Anyway, a friend recommended this small innoculous addon called "Is It Compatible". Before you update, you can always do a cursory check that your Add-ons are compatible with the version you're updating to. (Note that now, your Add-ons show the Firefox version numbers they're compatible with.)

Wednesday, January 13, 2010

Quick and dirty review of Sanyo KBC-E1S Mobile Booster (as a portable iPhone charger)

(See end of post for a 6 months later update, on my final thoughts 6 months on.)

I bought an iPhone in Dec 2009, and while I've heard and thus somewhat expected of it's high battery drain, I was quite unprepared for having the phone run out of juice before the day is over.

During Christmas shopping, I came across a Sanyo "mobile booster" pack, which I bought for myself as a small X'mas gift. In essence, the pack consisted of
- 2 x Sanyo AA eneloop batteries (HR-3UTG)
- 1 x plastic housing (for charging/discharging the batteries)
- 1 x USB cable (Type-A to mini-B)
- instruction quicksheet

Since this is only intended to be a "quick-and-dirty" first look, I will only reflect on the it's effectiveness in providing emergency power for my iPhone.

Out-of-the-box, the supplied 2 x Sanyo AA eneloop batteries took around 1 hr 20 mins to charge my iPhone 3GS 32Gb from 16% to 42%, giving me a measly 26% of juice. Repeat plug-unplug managed to coax another 3% out of the batteries.

Later, immediately after a proper full-charge (using a GP ReCyko GPAR05BS battery charger), the same 2 eneloops managed to raise the iPhone battery level by 50% from 46% - 96%.

This simple test covers the two corner cases of having charged battery having been left in my bag for some time, providing approximately 25% charge to the iPhone 3GS 32GB, and freshly charged batteries used immediately, giving approximate 50% charge.

Given the results, the unit has has proved it's usefulness to me, and I am more than content to carry the small package in my bag wherever I go. The following factors/features are key to me:
- affordability: the street price is SGD30++
- (although normal NiMh rechargable batteries are cheaper and nowadays come in high capacities of > 2500 mAh compared to the 1900 mAh rated eneloops) the eneloops provide far better shelf life, which is important for batteries that I may not use soon after charging
- the small plastic housing can also also serve as a battery charger using USB from any PC or standalone USB power or car adapters (altho I strongly believe in using better chargers)
- in a crunch, I can buy off-the-shelf AA or eneloop/ReCyko, or even non-rechargeable batteries from anywhere


Is it for anyone? No. My key criteria is to make use of easily available AA batteries. Those after maximum portable charging capacity should opt for high capacity lithium-ion based rechargeable battery packs available from Sanyo, GP, etc or a variety of OEM manufacturers.

Final Thoughts 6 months later (added 8 Aug 2010)

It's 6 months later, and I thought it'll be useful to add how well the unit has been holding up.

On a proper full-charge (using the same GP ReCyko GPAR05BS battery charger), the same 2x eneloops managed to charge the iPhone by 40% from 17% - 57%. Further repeated plug-unplug coaxed another 3% out of the batteries.

The simplistic conclusion is that the batteries has degraded around 20% from "new", over 6 months of sporadic usage of once or twice per month.

Pros: I'm reasonably happy with the performance of the unit. For the primary purposes I bought this for, which is to give an emergency charge where a power socket may not be available, the device has met my requirements. (If you anticipate running out of juice near a power outlet, then the default Apple charger is definitely lighter and smaller, and more efficient.)

The unit gives me a 25-40% battery life boost, which is enough for about half a day's activity on the move (more if I do the usual optimizations like turning off wifi, dimming the unit and turning off 3G). If I need more, I can always bring 2 more AA batteries, or buy them off the shelf, which is a big plus over non-AA type chargers.

The batteries have proven to be reasonably durable, giving me a better than expected level of usefulness after 6 months of use (compared to "normal" NiMh rechargeable batteries).

Lastly, since the unit can both charge and discharge, paired with the iPhone and iPhone charger, I've survived short overseas vacations without having to bring a laptop or a separate battery charger, which is in itself quite amazing.

Cons: Of course performance can and will always improve with new technology. These is my wish list for the next product refresh.

Size: The unit seems to have quite abit of wasted space, which as a portable device, seems to be rather bad design. The whole unit seems to be rather empty and "airy", and gives me the impression that the physical siz e can be shrunk by at least 33%.

Heat: During discharge, the batteries and the unit both heat up significantly. I suspect this may be why the unit design is so "airy" and open.

Power Efficiency: The iPhone battery is 1200 mAH, and yet, 2 units of the 1900 rated eneloop's can only charge 40-50%. The only explanation is the energy loss in converting from the 1.2V of each AA to the 5V-out of the USB specifications.

<-- This paragraph was rewritten. My appreciation to Anonymous for pointing out that I oversimplified and neglected to mention the how the different output voltages of the different batteries affected the comparison. -->

Power Efficiency: The iPhone battery is unofficially rated at 1219 mAh 3.7 V, and yet, 2 units of fully charged 2000 mAh 1.2V rated eneloop's can only charge 40-50%, while in theory they can deliver 106.4% charge. Two factors apply here:
- energy loss in converting twice from the 1.2V of each AA to the USB 5V followed by USB 5V charging the 3.7V iPhone battery
- the usage of the iPhone during the time the charging takes place, which is in itself a significant 1+ hour

Configuration: I've seen 4-AA battery dischargers, but I would love for Samsung (or anyone) to release a 4-AA unit that both charges and discharges. This would indirectly address the power efficiency and heat issues since presumably 4 * 1.2V means minimal step-up conversion to USB 5V, and in solving the heat problem, reduce the amount of wasted space necessary for air cooling.

Charging time: The time needed to charge 2 batteries are quite long, taking 6-10 hours (ie effectively overnight). This may be related to the USB specifications only allowing for 500mA max output current.