How to take a snapshot of the Tmobile G1 Android screen with Ubuntu Linux

To take a snapshot of the Android screen you will need the Dalvik Debug Monitor Service (DDMS). The DDMS comes with the Android SDK. To get the SDK on either Ubuntu or Windows, check this link.

Once you obtained DDMS, locate it. It will be in your sdk tools folder:
sudo /home/user/nameofyourSDKfolder/tools/ddms
ddms android

Make sure you enable USB Debugging on the device by going to Settings -> Applications -> Development and ticking the box and plug in your device now.

select Device -> Screen Capture

Freenx nx server problem in Ubuntu Jaunty 9.04

After upgrading to Jaunty, I never managed to successfully connect to my desktop using NX. I use a windows computer with nomachine nx client. I always got an error like this:

Info: Proxy running in client mode with pid '1728'
Session: Starting session at 'Sat Jan 12 16:34:05 2008'.
Warning: Connected to remote version 3.0.0 with local version 3.1.0
Info: Connection with remote proxy completed.
Warning: Unrecognized session type 'unix-desktop'. Assuming agent session.
Info: Using ADSL link parameters 512/24/1/0.
Info: Using cache parameters 4/4096KB/16384KB/16384KB.
Info: Using pack method 'adaptive-7' with session 'unix-gnome'.
Info: Using ZLIB data compression 1/1/32.
Info: Using ZLIB stream compression 4/4.
Info: No suitable cache file found.
Info: Forwarding X11 connections to display ':0'.
Info: Forwarding multimedia connections to port '6000'.
Info: Listening to font server connections on port '11000'.
Session: Session started at 'Sat Jan 12 16:58:19 2008'.
Info: Established X server connection.
Info: Using shared memory parameters 0/0K.
Session: Terminating session at 'Sat Jan 12 16:58:19 2008'.
Session: Session terminated at 'Sat Jan 12 16:58:19 2008'.

After hours of searching the web, I concluded the problem is with the ownership and permissions of the .Xauthority file. Here’s how I fixed it:
sudo chown hydtech /home/hydtech/.Xauthority
sudo chgrp hydtech /home/hydtech/.Xauthority

and delete:
sudo rm /home/hydtech/.Xauthority-l
sudo rm /home/hydtech/.Xauthority-c

Now it works like a charm.

Android T-mobile G1 reverse tethering with Wifi

I am currently trying to figure out how to reverse tether a G1 to use an ad-hoc computer-to-computer network. I have Internet at work through ethernet and created an ad-hoc network, but the built in G1 wireless scanner cannot detect ad-hoc networks. There is an application in the marketplace called Wifi Scanner which can detect adhoc networks but it does not have a connect feature. I tried to manually connect using ifconfig in terminal but havent been successful yet. I’ll post updates if I make progress.

How to enable NTFS and HFS+ support in Gparted

I use Gparted to clone/backup my OSX86 partition. You’ll notice that the hfs and hfs+ options are greyed out. I need NTFS to format a storage space to share between Operating systems.

Start up terminal and enter:

sudo apt-get install hfsplus hfsutils hfsprogs ntfsprogs

now you can use gparted with ntfs, hfs and hfsplus formats.

How to Install VLC Player in BackTrack 3

First, download the package from here and save it in your / directory or you can do this from the command line by opening up a Konsole and typing:
cd /
This will put you in the / directory
This will download the file in the present directory
tar zxf vlc-0.9.9-i486-1alien.tgz
The tar tool will unzip and untar this file
cd install
changes the directory to /install
chmod 777
changes the permission so you can execute the file
cp /
copies the file to the / dir
cd ..
goes back to the / directory
executes the script
rm -R vlc-0.9.9-i486-1alien.tgz /install
removes unwanted files.

/tmp folder permissions changing after reset / reboot in BackTrack 3 and 4

KDE requires the /tmp directory to have the correct permissions (1777) for a user to log in or it will give you an error saying: “call to Inusertemp failed. temporary Directories Full?”. For this you have to change the folder permissions of /tmp by:
chmod 1777 /tmp

This will give permissions of drwxrwxrwt. One problem I was having with BackTrack was that after every reboot, the permission would get set back to dwrwxr_xr_x. I realized this was happening due to BackTrack using the aufs file system to mount root. The aufs or AnotherUnionFS is used on the live CD to make it appear as writeable but in reality the media is physically read only.

To eliminate this problem, open fstab:
kwrite /etc/fstab

And replace the aufs line with your device and the correct file system.
For example: /dev/sda8 / ext3 defaults 0 0

How to add new users to BackTrack 3

After installing BackTrack, it is important that you change the default password for security reasons. Also, you might want to add a user to the system so you can avoid using the root login as you don’t want to screw things up accidentally.

To add a new user, open up a Konsole and type:


This will guide you through the process of adding a new user.


keep hitting enter for all default values and select a good password:


your user is created but KDE still won’t let you log on because /tmp does not have the correct permissions. you will get an error saying “call to Inusertemp failed (temporary Directories Full?)”

To set the correct permissions type:
cd .. to go up one directory

chmod 1777 /tmp to set the correct permissions on the tmp dir. * see UPDATE *

now you can logoff root and login with your new user.

check here to install packages using slapt-get.

* UPDATE * – I found out on reboot these permissions get reset. To make permanent changes see here.

How to Install OpenOffice 3.0.1 in BackTrack 3

goto and download the version for linux.

tar -xvzf OOo_3.0.1_LinuxIntel_install_wJRE_en-US.tar.gz

cd into directory with all the rpm files:
cd OOO300_m15_native_packed-1_en-US.9379/RPMS

convert all rpms to tgz:
rpm2tgz *.rpm
This step will take a while.

Install all tgz using installpkg tool:
installpkg *.tgz

openoffice will be installed under /opt

Now we have to place it in the K menu.
Right click on the K and click Menu Editor.
goto File -> New Submenu -> type OpenOffice
Right click on OpenOffice Menu and select new item.
Add a name, description and in the “Command” field, add ‘/opt/openoffice.org3/program/soffice’
In “Work Path” add /opt/openoffice.org3/program
save and close

You can repeat the steps to add Writer, Calc, Math, Draw, Impress and Base

How to install Mozilla Thunderbird and Opera browser in Backtrack 3

Check my previous post on how to install slapt-get in BackTrack 3.

Now, you can use slapt-get to install packages from the slackware repositories. To install mozilla-thunderbird:

Make sure it exists in the repositories:

slapt-get --search thunderbird

if you find it, use the install parameter to install:

slapt-get --install mozilla-thunderbird-


For Opera, goto and download the latest tar.gz for Slackware.

untar the file:
tar -xvzf opera-9.64.gcc4-shared-qt3.i386.tar.gz
go into the folder and run
That’s it !

How to install BackTrack 3 or 4 to hard drive along with Windows XP, Ubuntu, Fedora, openSuse on Lenovo Thinkpad X60

From my last post you can see that I installed Fedora and openSuse to my existing dual boot Thinkpad X60 with Ubuntu and Windows. In this post, I will show you how to install BackTrack 3 to the hard drive. These instructions can also be used for BackTrack 4.

First we have to create a partition for the OS. You can only have 4 primary partitions out of which only 1 can be an extended partition. The extended partition can then in turn have multiple logical partitions. I used gparted in Ubuntu to partition my drive as follows.

Primary partition 1 – NTFS for XP
Primary partition 2 – NTFS used as storage
Primary partition 3 – extended partition which has all my linuxes for testing purposes
extended partition contains:
logical partition 1 – ext3, Fedora
logical partition 2 – ext3, openSuse
logical partition 3 – ext3, will be used for Backtrack
logical partition 4 – ext3, future linux (maybe Gentoo)
logical partition 5 – swap (I only have to use one swap for all my linuxes)
Primary partition 4 – ext3 for Ubuntu, my main linux


Now download, burn, and boot up BackTrack 3 live cd.

My BackTrack partition is sda8 and BT3 automatically mounted it to /mnt/sda8

if not, you can mount your drive by typing:
mkdir /mnt/sda8
mount /dev/sda8 /mnt/sda8

replace sda8 with your partition

now, copy the required files from the live cd to the hard drive:

cp --preserve -R /{bin,dev,home,pentest,root,usr} /mnt/sda8/
cp --preserve -R /{boot,lib,etc,opt,sbin,var} /mnt/sda8/
mkdir /mnt/sda8/{mnt,proc,sys,tmp}
mount --bind /dev/ /mnt/sda8/dev/
mount -t proc proc /mnt/sda8/proc/

The installation is done, now you can reboot and add the BackTrack to the grub menu.lst

Reboot into Ubuntu and:
sudo gedit /boot/grub/menu.lst

This is what my grub looks like. The part in bold is for BackTrack:

title Ubuntu Jaunty, kernel 2.6.28-11-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=da7e4aba-35c8-4ab8-a882-d5c7c324101a ro quiet splash
initrd /boot/initrd.img-2.6.28-11generic

title Ubuntu Jaunty, kernel 2.6.28-11-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=da7e4aba-35c8-4ab8-a882-d5c7c324101a ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu Jaunty, kernel 2.6.24-16-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=da7e4aba-35c8-4ab8-a882-d5c7c324101a ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic

title Ubuntu Jaunty, memtest86+
root (hd0,1)
kernel /boot/memtest86+.bin


# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
chainloader +1

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda5.
title Fedora ( (on /dev/sda5)
root (hd0,4)
kernel /boot/vmlinuz- ro root=UUID=cae92252-724a-4e24-841d-e8c3fb24f861 rhgb quiet
initrd /boot/initrd-

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda5.
#title Fedora ( (on /dev/sda5)
#root (hd0,4)
#kernel /boot/vmlinuz- ro root=UUID=cae92252-724a-4e24-841d-e8c3fb24f861 rhgb quiet
#initrd /boot/initrd-

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda6.
title openSUSE 11.1 – (on /dev/sda6)
root (hd0,5)
kernel /boot/vmlinuz- root=/dev/sda6 splash=silent showopts vga=0x317
initrd /boot/initrd-

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda6.
title Failsafe — openSUSE 11.1 – (on /dev/sda6)
root (hd0,5)
kernel /boot/vmlinuz- root=/dev/sda6 showopts ide=nodma apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x317
initrd /boot/initrd-

title BackTrack 3 Final KDE
rootnoverify (hd0,7)
kernel /boot/vmlinuz vga=0x317 root=/dev/sda8 ro quiet splash autoexec=xconf;kdm

title BackTrack 3 Final shell
root (hd0,7)
kernel /boot/vmlinuz ro root=/dev/sda8 vga=0x317

Reboot into BackTrack and check here to create a new user and

check here to install packages with slapt-get or here to see how I installed BT 4 on my lenovo S10 without a CD player or USB.