I did not want to install any other piece of software for this little thing. So, I was thinking about using what is already there in my Ubuntu (default) installation.
xte is just the tool that I needed.
To give you an example, here is the command to send F11 key to active window.
$ xte "key F11"
Notes: I just figured out to use F11 and F12 in dell mini 9. Use Fn+z for F11, Fn+x for F12. I tested both keys in Ubuntu 9.04.