There are various softwares available with fancy GUIs to create screen-casts. This script
will do just fine without much fuss. You need the 'swiss-knife' ffmpeg
installed. If you have vlc or mplayer installed, it must already be
there. You need to have ~/Video directory. You can save this scripts as
executable e.g. record_my_desktop.sh in /usr/local/bin or in some other PATH. After saving this file to some file you need to do
chmod +x filename.sh to make it executable.
#!/bin/bash
# This script record your desktop. It calculates your screen resolution and saves
# the video in ~/Video/output.mkv file.
rm -f ~/Video/output.mkv
Xaxis=$(xrandr -q | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1)
Yaxis=$(xrandr -q | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2)
ffmpeg -f x11grab -s $(($Xaxis))x$(($Yaxis)) -r 25 -i :0.0 -sameq ~/Video/output.mkv
First
two lines calculate your screen resolution. Last line do the job of capturing your desktop .
FFMPEG is a great tool to edit and modify videos, and various other things.
If you want to save your video to somewhere else change the filename at the end in 4th line.
Execute
it in a terminal, minimize the terminal, do your work and then
terminate the script. Downsize the video if required, and post the screen-cast.
Possible improvements could be like forcing a max-size to video saved. Sometimes moodle etc. have restriction on how big a file can be posted.
--