First, please use [code][/code]
tags around your code, to preserve formatting and to improve readability.
Second, start by reading the error message it gave you. "Unknown input format: 'x11grab'
" It's not recognizing the -f option you gave it.
So check whether you have the correct format. Run ffmpeg -formats
$ ffmpeg -formats | grep "grab"
D dv1394 DV1394 A/V grab
D video4linux2 Video4Linux2 device grab
D x11grab X11grab
So it's not x11grab, it's X11grab. Try it again with a capital X.
Here's another hint. Try putting the error messages you get into Google
or another web search. Chances are you'll find that other people have had the same or similar problems.