--- a/src/State.cpp
+++ b/src/State.cpp
@@ -14,6 +14,7 @@
 #include "SDL_keysym.h"
 #include "SDL_mixer.h"
 
+#include <FindDirectory.h>
 #include <string>
 #include <fstream>
 //include <unistd.h>
@@ -44,7 +45,9 @@
 	}
 	return "c:\\openmortal.ini";	
 #else
-	return std::string(getenv("HOME")) + "/.openmortalrc";
+	char path[B_PATH_NAME_LENGTH];
+	find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
+	return std::string(path) + "/openmortalrc";
 #endif
 }
 
