diff --git a/config/config.sample.php b/config/config.sample.php
index 8561d0a75807ad43726ef3cdf5c079ba61e14de4..e46c3cacd7ea51a8c4c1144f0deb70fa94eb4f11 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -15,6 +15,7 @@ $CONFIG = array(
 "theme" => "",
 "3rdpartyroot" => "",
 "3rdpartyurl" => "",
+"defaultapp" => "files",
 "knowledgebaseenabled" => true,
 "knowledgebaseurl" => "",
 "appstoreenabled" => true,
diff --git a/lib/base.php b/lib/base.php
index a874a604707290ee4df04794eee3ee970f18235d..7d073481e00cb4817cadf3177b2bc2c077125190 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -424,7 +424,7 @@ class OC{
 		register_shutdown_function(array('OC_Helper','cleanTmp'));
 		
 		//parse the given parameters
-		self::$REQUESTEDAPP = (isset($_GET['app'])?str_replace('\0', '', strip_tags($_GET['app'])):'files');
+		self::$REQUESTEDAPP = (isset($_GET['app'])?str_replace('\0', '', strip_tags($_GET['app'])):OC_Config::getValue('defaultapp', 'files'));
 		if(substr_count(self::$REQUESTEDAPP, '?') != 0){
 			$app = substr(self::$REQUESTEDAPP, 0, strpos(self::$REQUESTEDAPP, '?'));
 			$param = substr(self::$REQUESTEDAPP, strpos(self::$REQUESTEDAPP, '?') + 1);