This requires you to have:
-a jailbroken iPhone or iPod touch with Cydia
-a computer, Mac or PC (not sure about Linux although it should work)
-a WiFi connection
Step 1: Download the Necessary Programs...
Here is a few free clients for each OS:
Chicken of the VNC
Next, you'll need to download Veency from Cydia, this can be found in..
Once you have installed Veency, springboard will restart, there is no icon, but it is now installed on your device.
Step 2: Setting Up a Connection... Part 1
Copy the IP address, as this is how you will connect to your device.
Step 3: Setting Up a Connection...Part 2
On Windows, it's as simple as opening VNC viewer and Entering the IP address you saved earlier.
*I'm not completely sure how to do it with a Mac, however it should be something like, opening Chicken of the VNC and simply clicking "viewer". This is from what remember from my little experience with a Mac, so it may not be completely correct, however it should be something along those lines.
Once the Viewer has opened it should have a text area where you can either enter a host-name or a IP address, this is where you enter the IP you saved earlier from your iPod or iPhone.
Step 4: Connecting to Your Device
Your iPhone/iPod will now display a message asking if you would like to Accept connection from "yourcomputer'sIP"?
Accept this and you're in!
To Tell if you're connected to your iPod/iPhone, up in the corner, next to the battery, there will be a VNC logo(as in the Second Picture)
*To take screenshots with your iPod quickly press the Power and home buttons at the same time, the screen will flash white, and your screenshot will now be in the photos application of your device, and you can sync the with iTunes.(Works only with 2.x Firmware)