Tech Tips

How to extend Windows 7 VM disk size on VirtualBox v4.2.16


The 30GB C: drive was running out of free space on my Windows 7 VM guest on VirtualBox v4.2.16.


1. Shutdown VM.

2. Extend it to 45GB:

[text]$ cd /home/user/.VirtualBox/HardDisks
$ VBoxManage modifyhd windows7.vdi –resize 46080

3. Extend partition size in Windows 7

a. Start the VM

b. Run diskmgmt.msc > right-click C: > Extend Volume...

Tech Tips

How to make dhclient send hostname to DHCP server

My Arch Linux recently switched from dhcpcd to dhclient as the DHCP client. The DHCP server isn’t assigning a FQDN to this client and it turns out that dhclient isn’t telling the server what’s the client’s hostname.


Create config file /etc/dhclient.conf with content:

send host-name = gethostname();

Tech Tips

How to fix copy-paste clipboard issue on Windows 7 Synergy client

Love the cross-platform and open source Synergy keyboard and mouse sharing application. With the newly added built-in encryption, it’s even more secure now.

The only problem I had was the copy-paste clipboard issue. When I hit CTRL-C to copy any text from a Windows 7 Synergy cilent (v1.4.12) running in service mode, it doesn’t get sync’d to my Arch Linux Synergy server (v1.4.12-1) and so I can’t paste it on the server machine. However, it does get copied into Windows 7’s own clipboard.

Workaround: Disable the “Elevate” option on Windows 7 Synergy cilent’s GUI. Some of you will need that elevate setting but copy-paste is more important to me. I already have another keyboard plugged in to the client that I can use for UAC prompts and elevated programs, so disabling “Elevate” is fine for me though cumbersome.


Updated on 20130806 to add screenshot.

Tech Tips

How to hide notification for particular Android app?

When you run many background apps (e.g. GMD GestureControl, SwipePad: Hyperspace Launcher, HomeFlip, GYF Side Launcher) that add themselves to your ongoing notification panel, the list grows fast and soon it gets so long that it takes up precious screen estate, forcing you to scroll down whenever you want to check the real notifications from incoming messaging text, email, etc.

So, how can the apps be barred from adding themselves to the notification panel, thus also removing the icons that clutter up the top left corner of the screen?

Goto: System Settings > Applications Manager > Pick the app that you want to hide, then uncheck “Show notifications”

This feature is available on Android 4.1 Jelly Bean for now.

Tech Tips

htop shows blank screen

Argh! My htop is showing a blank screen. I’m afraid of the dark…helppp!

Solution: export TERM=xterm-color before running htop

My tmux uses TERM=screen and htop didn’t like it on one particular machine while the others are fine. Setting it to the above solves it.

Tech Tips

How to extract image and text from PDF

1. Install poppler-utils

2. To extract original embedded images:

$ pdfimages -j <file.pdf> <to_dir>

3. To extract text:

$ pdftotext -j <file.pdf>

Tech Tips

Why is my Android phone disallowing me from changing ringtone or notification sound?

OBSERVATION: It allows me to change it, but after a while, it’ll revert back to a particular ringtone, notification sound, or “Unknown ringtone”. No matter which sound I picked, be it from internal storage or SD, it’ll always revert back after a while. It’s like the ringtone is stuck!

SOLUTION: Some profile changing app that you’ve previously set up could be messing with the sound settings in the background, e.g. Llama, Tasker, etc. Check your triggers and actions for these apps, or just disable them completely for a while. See if the problem comes back. If not, bingo, you’ve found the culprit.

Tech Tips

How to mute internal speaker of Dell Optiplex 990 so that audio plays via external speaker only

After upgrading Ubuntu 12.04 (Precise Pangolin) to 12.10 (Quantal Quetzal), the computer started playing sound through both the internal built-in speaker and external jacked in speakers. To mute the internal speaker, run:

[shell]/usr/bin/amixer -c 0 sset ‘Auto-Mute Mode’ ‘Line Out+Speaker'[/shell]

Just make sure “Auto-Mute Mode” is not set to “Disabled”.

Tech Tips

crontab -e not saving changes

‘crontab -e’ kept telling me ‘crontab: no changes made to crontab’ even though I’ve made changes. When I run ‘crontab -l’ to check, my changes were not saved.

Turned out it’s due to my environment variable:

export EDITOR=/usr/bin/gvim

Changing it to vim solves the problem:

export EDITOR=/usr/bin/vim

Tech Tips

How to create MBR for booting into Windows

I had a dual-booting laptop with Linux Mint and Windows XP on it. After deleting the Linux Mint partitions, it failed to boot into XP because grub can no longer find the MBR. This was the error message:

error: no such partition
grub rescue>


Boot into SystemRescueCD and run this command to create a new MBR:

lilo -M /dev/sda mbr

Note: My XP resides in /dev/sda.