When I first tried Freemat, I wasn't able to get it to do anything. The startup banner didn't appear, and although I could type numbers and operators into the main window (and they even appeared in the history), Freemat didn't do anything except echo the characters I typed.
Some work with strace eventually showed that Freemat was looking for a file named "Private" in the directory it was started in, and if it found one (actually, in my case, it was a directory) then it refused to cooperate further.
I have no idea how I came to have such a directory in my home directory. It was empty anyway, so I deleted it and Freemat ran fine thereafter.
I did a quick grep through Freemat's sources and didn't find anything obvious. It's possibly a KDE thing (I don't know a lot about KDE; personally, I don't like it), but it seems odd that the existence of a file with an un-obviously-KDE-related name would cause such a problem.
Running Freemat 4.0 on Debian squeeze (Debian package 4.0-2).
Below is a patch fixing the issue. We want to scanDirectory() if fileBaseName matches 'private' case-insensitively.
--- a/libs/libFreeMat/Interpreter.cpp
+++ b/libs/libFreeMat/Interpreter.cpp
@@ -364,7 +364,7 @@
procFileP(prefix + ":" + fileBaseName,fileAbsoluteFilePath,tempfunc);
else if (fileBaseName[0] == '@')
scanDirectory(fileAbsoluteFilePath,tempfunc,fileBaseName);
scanDirectory(fileAbsoluteFilePath,tempfunc,fileAbsoluteFilePath);
else
procFileMex(fileBaseName,fileAbsoluteFilePath,tempfunc);