Put your message here! Contact me for more information
 
 







 

Archive for November, 2007


 

AutoHotKeyI guess my relationship with the Lenovo 3000 N100 laptop is a complicated one: as much as I hated the Home/End/Page up/Page down combo madness, I truely missed that 2 extra buttons that my Dell D830 doesn’t have. Now instead of just flicking my finger to hit Home or End, I have to move my entire arm to reach for either End or Home. Even though now I won’t make any mistakes with Home/End jumping as with the Lenovo, I have to slow down the typing with the Dell…. NO! Only if Dell put the 2 extra home/end button next to their Arrow buttons… Why can’t we just live happily with each other? Is it really that hard to design a good working keyboard, or is it me that just being picky about laptop keyboard?

“Good news everyone…”, as the Professor Farnsworth would say in his quite-mischevious voice, I have the fix for my crave for the Home/End buttons. AutoHotKey allows me to map custom shortcut to the keyboard, especially the Windows key. I mostly use the Windows key as the … boss key to quickly hide my stuff on the screen (Window + D), or run command (Window + R), or start Explorer (Window + E), even though these days I prefer xplorer2. With AutoHotKey, I was able to map Window + A to the Home Button, and Window + S to the End button, saving me from wiggling my arm around.

So if you are not satisfied with your laptop keyboard, give AutoHotKey a try. Maybe it will save you some aggravation.

Here is the small script to remap your Home and End button: AutoHotKey.ahk

view comments
 

Dell Latitude D830 I had to order a new replacement for my new Dell Latitude D830. I thought that there was something wrong with my particular D830’s battery compartment since there is a gap between the memory and the rest of the laptop body. I have a 9-Cell battery and it was not fully tight-fit. The gap wasn’t that big but I could actually wiggle the battery and had it making some clicking noise. So I had Dell send me a new replacement. An exact D830 was sent to me. It’s so exact that the same issue happens, again! 2 brand new D830, same wiggling battery compartment! Anyhow, I think I just live with it since I can fix the issue by putting a small peace of folded paper between the battery and the compartment wall to nudge-fit it. I think that the issue is specific to the 9-Cell battery and the D830. Buyer beware!

SystemRescueCDEnough of my rant. I actually want to talk how I transfered the image of the first D830 to the other one using the SystemRescueCD. SystemRescueCD is a Linux-bootable image that contains all the utilities for disk imaging, partitioning, and other utilities. The ISO is about 160MB. All I had to do was burning it to a blank CD and grabbing my external USB drive to store my image files.

While waiting for my replacement D830, I installed everything I want to the “defective” laptop: Launchy, FireFox, Office, VisualStudio 2005, Rails, e-texteditor, Notepadd++, Cropper, FileZilla, Xplorer2, Xampp, Cygwin, MySQL GUI toolkit, etc.. Everything was about 10GB of data.

I booted the laptop using the SystemRescue CD with my 500GB Seagate FreeAgent external USB Drive (man, I feel like I’m doing free-advertisements now). The linux distro booted up and successfully recognized my USB drive. Next I went into the GUI with startx since I’m not too hot about the command line, plus I can have multiple XTerm’s side-by-side in X. Now it’s time to get down to the cloning business.

Mounting and Imaging the external USB drive

  • First of all, my Seagate FreeAgent drive was NTFS-formatted by the manufacture. Secondly, I wasn’t sure where the device was mapped inside the /dev. Digging around, I found these commands:
    • # lsusb (to list all USB devices)
  • I saw that my Seagate drive was detected properly with an entry in the list. Further more, running dmesg, I confirmed that the Linux LiveCD recognized my drive:
    • # dmesg | grep -i “SCSI” (this command is to grep the boot-up kernel messages for the word “SCSI” to make sure the kernel detected the device when it was booting)
  • Cool, but now I thought to myself, “how am I supposed to know which device in the /dev folder is my USB?” Actually I made an educated guess here and got lucky. The USB drive was mapped to the /dev/sdb1. I guess with some greppings through the lsub/ other cryptic linux commands/ blind guesses/ beginner’s luck, you’ll find which entry in the /dev folder is your USB drive. Nonetheless, try /dev/sdb1 first, you never know.
  • With my newly gained knowledge (and power), I was ready to mount my drive and start a mini cloning factory:
    • # mkdir /seagate (to create a new mount folder placeholder)
    • # mount -t ntfs /dev/sdb1 /seagate (to mount the NTFS-formatted USB drive to the /seagate folder)
  • I was able to mount the USB drive to the /seagate folder using the above command. However, it was read-only since the LiveCD OS did not know the linux permission of the drive. I found out about this when the imaging utility partimage failed to write the image file to the drive. The correct mount command to enable Linux permission is
    • # mount -t ntfs-3g /dev/sdb1 /seagate (notice the ntfs-3g param)

    Afterwards I was able to write a test file to my USB drive ( #echo “test” > /seagate/test.txt ) and seeing all the Linux permissions on the files ( # ll /seagate )

  • I then started partimage. I selected my partition to be imaged, put in the filename in the “Image path” box (/seagate/d830). I didn’t bother with the gzip since I really just image this one time. For my laptop, imaging 10GB took 7 minutes. The files on the USB drive was spillted into files like “d830.000“, “d830.001“, etc.
  • I then unmount the USB drive with
    • # umount -f /seagate

    I remember the LiveCD complained about some other processes were also accessing the device. To find out which process was using the resource, I did a

    • lsof | grep /seagate (list all processes that are opening the /seagate folder)

    Ah, I had a XTerm which I had CD’ed into the /seagate folder. Silly me! I cd to another folder and afterwards, umount was able to finish its job.

Restoring the image

  • Since the replacement one is an exact duplicate, I didn’t have to pay much attention to the partition image. I popped the SystemRescueCD in, switched the USB drive to connect to the replacement laptop, and booted it up with the CD.
  • I went through almost the exact same steps as above: mount the drive using the -ntfs-3g param, then start partimage. Only this time I chose “Restore” instead of creating image and the file name was “/seagate/d830.000“. Partimage automatically picked up the rest.
  • The entire restoring process took another 7 minutes.

I restarted the laptop and crossed my fingers. To my delight, my Windows XP Pro was up and running, even my fingerprints profile was loaded correctly. I swiped my finger, smiled to myself, and thought that it wasn’t too bad, at least I didn’t have to use Norton Ghost — everything was open-source. Just have to love it!

Final Words

I hope you enjoy this post and find it useful. Now I have to finish up posting this blog, pack the original laptop to send it back to Dell, and get busy finding a piece of paper to fix the battery issue for the replacement laptop. Then I can resume doing Rails and Wars of Earth…

Links & References

view comments
 

I have to keep reminding myself that I’m almost done with this freaking Lenovo notebook. It’s gonna be the end of a series of my daily frustration and cursing at whoever designed this god forbid keyboard. I’m using a Lenovo 3000 N100 and guess what: the FN key and Ctrl key are switched. Even worse: there is no direct way to use the HOME/ END buttons. I have to use a combo of FN and Page Up for HOME and FN + Page Down for END. Sometimes I missed the FN key, the cursor would jump up or down one page since I was then hitting Page Up/Down instead. Imagine when you are focusing on the screen, and bam, your code is gone no where in sight. Your line of thought is disrupted, you suddenly become disoriented. Not only do I feel the anger and hatred on a daily basis, my buddy who happens to have the same exact Lenovo model also share the frustration with me: whoever at Lenovo/IBM approved the keyboard design to get through QA should be hang, or brutally beaten to dead and got beaten some more.

Lenovo 3000 N100

To save myself from committing such a hideous crime (I still want to do it), I got myself a Dell Latitude D830. So far I find myself really enjoying the normal keyboard layout of the Dell 830. I can’t stress the “normal” part well enough. The Ctrl button is there at a corner for a reason and no sane people would combine FN + Page Up/Down for the frequently used Home/End buttons. It’s such a silly thing about keyboard design that Lenovo/IBM whimsically decide to switch keys around (ha ha, you buy our laptop, pwned!). I should seriously consider suing Lenovo for the amount of frustration and loss of productivity causing by their laptop, making a case of “Lenovo vs. the People”
To sum up: if you want to get the Lenovo 3000 N100: DON’T! Spend money on something else that would bring you happiness, like buying your loved ones dinners, or rather send me some money for this advice.

view comments
 

PrototypeJs LogoThe recent release of Prototype 1.60RC1 inadvertently breaks the drag and drop effect of Scriptaculous in IE6 (and 7). I don’t know about the exact cause of the error but according to sources around the internet, it’s because Prototype always returns false for the leftClick event in IE6. Luckily, the trunk version of Prototype has this bug patched (since revision 7954).

To fix the draggable, just patch your prototype.js file, replacing the code block “Event.method” around line 3686 with the newer code block from “event.js” in the prototype main trunk.

For your convenience, here is the patched prototype.js (release 1.60RC1) with fix from Event.js (rev 8037)

  • Download: the patched prototype.js for Scriptaculous Draggable
view comments