As was, this was creating files in /tmp/, which then got left after LyX exited. They should be created in LyX's own temporary directory, right? The patch does this. Let me know if this is a problem.
rh
Index: support/FileName.cpp =================================================================== --- support/FileName.cpp (revision 26065) +++ support/FileName.cpp (working copy) @@ -393,10 +393,7 @@ FileName FileName::tempName(string const & mask) { - QFileInfo tmp_fi(toqstr(mask)); - if (!tmp_fi.isAbsolute()) - tmp_fi.setFile(package().temp_dir().d->fi.absoluteDir(), toqstr(mask)); - return FileName(createTempFile(tmp_fi.absoluteFilePath())); + return tempName(package().temp_dir(), mask); }