UPDATE July 18, 2013: Approximately 7 months after this article was published, there’s been news that the TrueCaller database has been hacked into by the so-called Syrian Electronic Army. Again, this highlights the need for users to be careful in the choosing the companies with whom they entrust their private data. TrueCaller is a mobile app and online service that serves as a very large phonebook for reverse phone number lookups. It can be used to augment your own phone’s contact list in your iOS, Android, Windows Phone, Symbian, or BlackBerry device, helping you let know the names of unknown callers. You can test to see which of your or your friends’ numbers are available in their database at www.truecaller.com. How does it work? TrueCaller claims to[…]

To convert multiple VMDKs into a single file, I used the following command (LinuxVM.vmdk is the name of the first VMDK file – i.e. the one attached to the VM): $ vmware-vdiskmanager -r LinuxVM.vmdk -t 0 LinuxVMSingleDisk.vmdk Note that vmware-vdiskmanager is bundled as part of VMware Workstation. I couldn’t locate that as a separate download, so I ended up downloading the trial version of Workstation. The above operation takes a while, but not too long. It shows its progress as it completes. Next, I had to modify the VM settings so that it would use the new disk. I couldn’t find this option in the GUI, so I had to modify the vmx file manually (use an appropriate editor on[…]

TCPMon is a nice little tool for testing TCP communication between a client and server. It is an open source project, distributed under the Apache 2.0 license. Downloading and Running TCPMon To download TCPMon, head over to the Apache TCPMon download page and download the binary distribution. (There’s a Google Code Project called TCPMon too, but that’s not the same one, and has fewer features) Once downloaded and extracted, navigate to the build folder and run TCPMon by executing tcpmon.sh on Linux or tcpmon.bat on Windows. (On Linux, you’ll need to set the execute bit on the sh file before you run it). Note that your current working directory must be the build folder, else Java will report a ClassNotFoundException TCPMon as an[…]

The dot refers to the current directory. The forward slash “/” is the directory path separator. So, when you type in ./filename at the shell, you prefix the filename with the path to the current directory. Why do we need to do this when running any executable file? When you run a command in the shell, it either runs it as a built-in command, or as an executable. If it isn’t a built-in command, the shell tries looking for the executable in all the directories specified by the PATH environment variable – you can see what this contains by typing in echo $PATH in the terminal. So if your file is in the current directory, the shell won’t find it[…]

I often get a chance to work from home, and this has given me opportunities to look for ways to share sessions with my colleagues. Windows XP used to have the excellent NetMeeting tool, but I recently switched to Ubuntu and haven’t yet found an equivalent. Yes, I’ve heard of VNC and used it a lot too, but I wasn’t happy with its remote desktop sharing performance. Ekiga is interoperable with NetMeeting calls, but doesn’t support screen sharing. Even Skype’s screen sharing does not seem to support remote screen controlling. However, Linux’s power is at the command line, and this is true even in the case of remote sharing. So here comes screen to the rescue – this magical command allows you[…]

Here’s a cheat sheet of Eclipse shortcuts I’ve put together to help me work really fast with the IDE. The shortcuts have been categorized into two sections – one that most people know about, and another section that contains the lesser known ones. You should be able quickly scan through the first section, and learn any of the ones that you don’t currently know. The second section might take longer, and you may want to bookmark this page for future reference. Easy Shortcuts Search in files Use Ctrl–H to search in all files across the workspace or project. Open Resource Ctrl–Shift–R opens a resource quickly – without the time it spends for indexing. This makes it especially fast when you’ve just opened a workspace, in[…]

To enable Oracle’s Java plugin in your Linux browsers, just copy these lines into a script, and run it! JAVA_HOME=/usr/lib/jvm/jdk1.7.0 MOZILLA_HOME=~/.mozilla mkdir $MOZILLA_HOME/plugins ln -s $JAVA_HOME/jre/lib/i386/libnpjp2.so $MOZILLA_HOME/plugins Note: You may need to change the value of JAVA_HOME so that it correctly points to your installation of the JDK. 64-bit users will need to change the final line to: ln -s $JAVA_HOME/jre/lib/amd64/libnpjp2.so $MOZILLA_HOME/plugins If you’re a newbie, here’s how to run the script: Using your favorite editor, paste the contents of the script into a new file. Find out where Oracle Java is installed. This location has the directories “bin”, “lib”, and “jre”, among others. Replace the value of JAVA_HOME with the path to this folder, and save the file. This[…]

Update (Nov 9, 2011): As noted in the comments below, Windows Services for UNIX Version (SFU) is no longer supported on Windows 7 and 2008. For these versions, try installing Cygwin with the optional nfs-server component. If you’re using Windows 2008, you can use the Server for NFS that comes built-in instead – in this case, most of the steps below should apply. A few days ago, I needed to share a large folder present on a Windows server to access it from my local Ubuntu workstation. I initially used Samba, but my build script refused to recognize paths present in that share. The solution was to use an NFS share – but this required a special setup on Windows.[…]

There are just three simple steps needed to automate your SSH/SFTP logins to remote Unix/Unix-like servers from your Ubuntu/Linux distribution, or an emulator on Windows like Cygwin. 1) Run ssh-keygen abdullah@desktop:~$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/abdullah/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/abdullah/.ssh/id_rsa. Your public key has been saved in /home/abdullah/.ssh/id_rsa.pub. The key fingerprint is: 06:23:fc:34:0f:12:40:b2:5e:7c:41:eb:4f:a2:ab:24 abdullah@desktop The key’s randomart image is: 2) Run ssh-copy-id <username>@<server-name> abdullah@desktop:~$ ssh-copy-id login@myserver.com login@myserver.com’s password: Now try logging into the machine, with “ssh ‘login@myserver.com'”, and check in: ~/.ssh/authorized_keys to make sure we haven’t added extra keys that you weren’t expecting. 3) Login to your server using ssh[…]

To delete or remove a directory in Linux, use the “-r” flag to the “rm” command. “r” stands for recursive. rm -r <directory_name> On some Linux systems, you might be prompted before each file is deleted. This means that the rm command has been aliased to “rm -i”, which turns on interactive mode. To run the original rm command and avoid the prompts, use “\rm”: \rm -r <directory_name> In the bash shell, just as the backslash is used to escape special characters, it is also used to escape aliases. Caution! Be careful to double check the directory name you provide, and be extra careful when using wildcards. There have been many stories of grief because of users ending up deleting important files[…]