Everyone wants to do a screencast these days and I've found a pretty good way to do it on Linux, which I thought I'd share.
You'll need to install two packages, Record My Desktop and wmctrl. In the world of Linux installing packages are nice and simple. On Fedora simply run:
su - yum install gtk-recordmydesktop wmctrl
Or if you're using Ubuntu run:
sudo apt-get install gtk-recordmydesktop wmctrl
Next step is to stop all applications you're not going to use as part of the screencast.
If you're going to use Chrome or Firefox as part of your screencast I'd recommend creating a new blank profile for that purpose. This helps reduce the amount of crud, such as bookmarks, extensions, etc. For Chrome this can be done by running:
For Firefox it's a bit more awkward. First start Firefox with:
Then click on create profile and click next, next, a few times..
If I'm using the terminal I also like to remove the hostname and such from the prompt. This can be done by running the following in the terminal:
export PS1=' $ '
Now, start all the applications you're going to use as part of the screencast. This includes Chrome/Firefox, your favourite IDE and quite likely (since you're using a proper operating system) a terminal.
Then you want to use wmctrl to resize all the applications to the same size. This is done by running:
wmctrl -r 'title' -e 0,100,200,1280,800
Replace 'title' with part of the title of your window, for example 'Chrome' works for Chrome. The numbers 100,200,1280,800 are the left, top, width, height. I've found 1280x800 is a good size for videos. Replace 100,200 with values that makes sure your applications doesn't overlap any menus, and places the applications centrally on your screen. The important bit is to use the same setting for all applications.
You'll also want to make sure you have a neutral background before you start recording. I tend to not want to include pictures of my children in screencasts .
You're now ready to start recording your screencast. Open RecordMyDesktop. The default settings has worked well for me, so I've just left everything untouched (I personally love things I don't have to tweak). Click on 'Select Window' and choose any of the windows you previously resized. RecordMyDesktop doesn't actually record that specific window, but it records that area of the screen.
Now click Record and start doing your thing!
To stop the recording click on the RecordMyDesktop stop icon, in Fedora this is found in the Message Tray (see https://wiki.gnome.org/Gnome3CheatSheet) while on Ubuntu in application indicators. After you stop the recording, RecordMyDesktop will encode your screencast, this takes a while so it's a perfect time for a cup of coffee (or a beer on a Friday).
If you need to trim the video avconv is nice and simple. The following example will trim the first 10 seconds, and include the following 60 seconds from input.ogv and save it as output.ogv:
avconv -i input.ogv -ss 10 -t 60 -vcodec copy -acodec copy output.ogv
Personally I find it's quicker and easier to just redo the screencast, but if you need to do some more editing OpenShot is a great app.
For an example on the results have a look at: http://vimeo.com/96213933