Every time I try to start a specific program (Mathematica), my Ubuntu session crashes and I get thrown back to login screen. I want to find out 1) what is it exactly that crashes (probably X) and 2) find the error log produced by this crash.
I tried looking at .xsession-errors file, but the file is huge and I don't know how to find what I'm looking for from there. It would be ideal if I could somehow make X output its error log to another file temporarily or something.
EDIT: The relevant error log was found from /var/log/syslog which says: "gnome-session: Gdk-WARNING: gnome-session: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.#012". This is possibly related to this bug: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/999191 .