How to record iphone 3gs desktop?
Currently. there isn't any free version of any software that you want that can do screen recording.  But there are two apps last I checked. Both are paid. The first one, last time I checked it was $1.99.  Its on Cydia, its called ScreenRecorder:

http://www.cultofmac.com/33585/record-your-iphone-screen-with-screenrecorder-jailbreak-superguide/

There is also Display Recorder on the Cydia App Store for $4.99:

http://www.jailbreaknation.com/record-your-iphone-screen-on-ios-5-with-displayrecorder

There was also a paid App Store Application for the iPhone and iPod Touch, called Display Recorder but it got pulled from the App Store and I can't find it anymore.

I hope that the first two help, sorry that they aren't free but they work and are pretty awesome, they also have their limitations though, so read up on their limits first before taking the plunge.