...
Sometimes I get X11 related errors about the .Xauthority file, what to do?
All accounts have home directories with 500mb quotas. If you are near the limit and try to login or use X based software, you may not be able to. Clean up by deleting some files, also delete the .Xauthority file, logout and back in and you should be all set.
How does one submit a job using as input an interactive program that has a gui but not support for unattended batch submissions?
There is a command called xvfb-run that is an xwindow virtual frame buffer.
This creates an environment for the program to run the gui unattended.
For example, it is convenient to use the Mathematica notebook .nb file format as input. However this is done normally in an interactive GUI session. To simulate this X based environment use the Xvfb functionality. For example, to submit a job:
-bash-3.2$ bsub -q normal_public6 xvfb-run mathematica your_notebook.nb
Other programs may benefit as well.
Note: consider adding to your mathematica notebook the appropriate save and quit commands at the end. This will ensure proper shutdown of the application.