The import utility provided by ImageMagick is a powerful utility to take screenshots. The simplest usage is:
$ import mydesktop.png
And click on the window you want to capture or select the region you want to capture.
There are many available options such as:
- Take a screenshot ofthe desktop and resize to 50% after some delay
$ import -window root -resize 50% -delay 500 screen.png
- Take a screenshot ofthe desktop and resize to 800×600
$ import -window root -resize 800x600
Check the man import for full list of options.
To record a video of the desktop, try:
$ ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq desktop_video.mpg
If you are looking for information on how to record the screen on Ubuntu take a look here.