I didn't know that it would be this hard to debug a shell script program like
this, and I'm not planning on learning more shell-scripting language, so I am
abandoning this project, probably forever. I am posting my final version
here; anyone should feel free to modify or complete it.
See these two links for the text version, or see the attached files.
http://qrshellscript.pastebay.com/1410001
http://pastebin.ubuntu.com/7076532/
I recommend putting the attached image in the same directory as the shell
script to be the window icon.