Index: orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc
===================================================================
--- orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc	(revision 4031)
+++ orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc	(revision 4032)
@@ -50,5 +50,4 @@
 #endif /* HAVE_GTHREAD */
   gtk_init(&argc, &argv);
-
 #include "rc"
   gtk_rc_parse_string( rc_string );
Index: orxonox/trunk/src/orxonox.cc
===================================================================
--- orxonox/trunk/src/orxonox.cc	(revision 4031)
+++ orxonox/trunk/src/orxonox.cc	(revision 4032)
@@ -37,4 +37,5 @@
 
 #include <string.h>
+
 int verbose = 4;
 
@@ -46,4 +47,6 @@
 Orxonox::Orxonox ()
 {
+  ResourceManager::touchFile("~/.orxonox/orxonox.lock");
+
   pause = false;
 }
@@ -61,4 +64,6 @@
   delete ResourceManager::getInstance(); // deletes the Resource Manager
   delete TextEngine::getInstance();
+
+  ResourceManager::deleteFile("~/.orxonox/orxonox.lock");
 }
 
@@ -302,11 +307,12 @@
 
   int i;
-  for(i = 0; i < argc; ++i)
+  for(i = 1; i < argc; ++i)
     {
       if(! strcmp( "--help", argv[i])) return startHelp();
       else if(! strcmp( "--benchmark", argv[i])) return startBenchmarks();
+      
+      else PRINTF(2)("Orxonox does not understand the arguments %s\n", argv[i]);
     }
 
-  PRINTF(2)("Orxonox does not understand the arguments");
   return startOrxonox(argc, argv);
 }
@@ -316,9 +322,9 @@
 int startHelp()
 {
-  printf("orxonox: starts the orxonox game - rules\n");
-  printf("usage: orxonox [arg]\n\n");
-  printf("valid options:\n");
-  printf(" --benchmark\tstarts the orxonox benchmark\n");
-  printf(" --help \tshows this menu\n");
+  PRINT(0)("orxonox: starts the orxonox game - rules\n");
+  PRINT(0)("usage: orxonox [arg]\n\n");
+  PRINT(0)("valid options:\n");
+  PRINT(0)(" --benchmark\tstarts the orxonox benchmark\n");
+  PRINT(0)(" --help \tshows this menu\n");
 }
 
@@ -326,10 +332,20 @@
 int startOrxonox(int argc, char** argv)
 {
-  printf(">>> Starting Orxonox <<<\n");
+  // checking for existence of the configuration-files
+  if (!ResourceManager::isFile("~/.orxonox/orxonox.conf") || ResourceManager::isFile("~/.orxonox/orxonox.lock"))
+    {
+      if (ResourceManager::isFile("~/.orxonox/orxonox.lock"))
+	ResourceManager::deleteFile("~/.orxonox/orxonox.lock");
+      if (system("./orxonoxGui --gui") == -1)
+	system ("orxonoxGui --gui");
+      return 0;
+    }
+  
+  PRINT(0)(">>> Starting Orxonox <<<\n");
   Orxonox *orx = Orxonox::getInstance();
   
   if((*orx).init(argc, argv) == -1)
     {
-      printf("! Orxonox initialization failed\n");
+      PRINTF(1)("! Orxonox initialization failed\n");
       return -1;
     }
Index: orxonox/trunk/src/util/resource_manager.cc
===================================================================
--- orxonox/trunk/src/util/resource_manager.cc	(revision 4031)
+++ orxonox/trunk/src/util/resource_manager.cc	(revision 4032)
@@ -510,19 +510,23 @@
     }
 
-  stat(tmpDirName, &status);
-  if (status.st_mode & (S_IFDIR
+  if(!stat(tmpDirName, &status))
+    {
+      if (status.st_mode & (S_IFDIR
 #ifndef __WIN32__
-			| S_IFLNK
+			    | S_IFLNK
 #endif
-			))
-    {
-      delete tmpDirName;
-      return true;
-    }
-  else
-    {
-      delete tmpDirName;
-      return false;
-    }
+			    ))
+	{
+	  delete tmpDirName;
+	  return true;
+	}
+      else
+	{
+	  delete tmpDirName;
+	  return false;
+	}
+    }
+  else
+    return false;
 }
 
@@ -534,15 +538,75 @@
 bool ResourceManager::isFile(const char* fileName)
 {
+  char* tmpFileName = ResourceManager::homeDirCheck(fileName);
+  // actually checks the File
   struct stat status;
-  stat(fileName, &status);
-  if (status.st_mode & (S_IFREG 
+  if (!stat(tmpFileName, &status))
+    {
+      if (status.st_mode & (S_IFREG 
 #ifndef __WIN32__
-			| S_IFLNK
+			    | S_IFLNK
 #endif
-			))
-    return true;
-  else
-    return false;
-}
+			    ))
+	{
+	  delete tmpFileName;
+	  return true;
+	}
+      else
+	{
+	  delete tmpFileName;
+	  return false;
+	}
+    }
+  else 
+    {
+      delete tmpFileName;
+      return false;
+    }
+}
+
+bool ResourceManager::touchFile(const char* fileName)
+{
+  char* tmpName = ResourceManager::homeDirCheck(fileName);
+
+  FILE* stream;
+  if( (stream = fopen (tmpName, "w")) == NULL)
+    {
+      PRINTF(1)("could not open %s fro writing\n", fileName);
+      return false;
+    }
+    
+  delete tmpName; 
+}
+
+bool ResourceManager::deleteFile(const char* fileName)
+{
+  char* tmpName = ResourceManager::homeDirCheck(fileName);
+  unlink(tmpName);
+  delete tmpName;
+}
+
+char* ResourceManager::homeDirCheck(const char* name)
+{
+  char* retName;
+  if (!strncmp(name, "~/", 2))
+    {
+      char tmpFileName[500];
+#ifdef __WIN32__
+      strcpy(tmpFileName, getenv("USERPROFILE"));
+#else
+      strcpy(tmpFileName, getenv("HOME"));
+#endif
+      retName = new char[strlen(tmpFileName)+strlen(name)];
+      sprintf(retName, "%s%s", tmpFileName, name+1);
+    }
+  else
+    {
+      retName = new char[strlen(name)+1];
+      strcpy(retName, name);
+    }
+  return retName;
+}
+
+
 
 /**
Index: orxonox/trunk/src/util/resource_manager.h
===================================================================
--- orxonox/trunk/src/util/resource_manager.h	(revision 4031)
+++ orxonox/trunk/src/util/resource_manager.h	(revision 4032)
@@ -78,5 +78,7 @@
   // utility functions of this class
   static bool isDir(const char* directory);
-  static bool isFile(const char* directory);
+  static bool isFile(const char* fileName);
+  static bool touchFile(const char* fileName);
+  static bool deleteFile(const char* fileName);
 
  private:
@@ -92,4 +94,5 @@
   Resource* locateResourceByPointer(const void* pointer);
   
+  static char* homeDirCheck(const char* name);
 };
 
