Index: src/keyfile.c
===================================================================
--- src/keyfile.c	(revision 2322)
+++ src/keyfile.c	(working copy)
@@ -638,21 +638,21 @@
 	g_free(tmp_string2);
 
 	/* tools */
-	tmp_string = g_find_program_in_path(GEANY_DEFAULT_TOOLS_MAKE);
-	prefs.tools_make_cmd = utils_get_setting_string(config, "tools", "make_cmd", tmp_string);
-	g_free(tmp_string);
+	prefs.tools_make_cmd = utils_get_setting_string(config, "tools", "make_cmd", "");
+	if (!NZV(prefs.tools_make_cmd))
+		setptr(prefs.tools_make_cmd, g_find_program_in_path(GEANY_DEFAULT_TOOLS_MAKE));
 
-	tmp_string = g_find_program_in_path(GEANY_DEFAULT_TOOLS_TERMINAL);
-	prefs.tools_term_cmd = utils_get_setting_string(config, "tools", "term_cmd", tmp_string);
-	g_free(tmp_string);
+	prefs.tools_term_cmd = utils_get_setting_string(config, "tools", "term_cmd", "");
+	if (!NZV(prefs.tools_term_cmd))
+		setptr(prefs.tools_term_cmd, g_find_program_in_path(GEANY_DEFAULT_TOOLS_TERMINAL));
 
-	tmp_string = g_find_program_in_path(GEANY_DEFAULT_TOOLS_BROWSER);
-	prefs.tools_browser_cmd = utils_get_setting_string(config, "tools", "browser_cmd", tmp_string);
-	g_free(tmp_string);
+	prefs.tools_browser_cmd = utils_get_setting_string(config, "tools", "browser_cmd", "");
+	if (!NZV(prefs.tools_browser_cmd))
+		setptr(prefs.tools_browser_cmd, g_find_program_in_path(GEANY_DEFAULT_TOOLS_BROWSER));
 
-	tmp_string = g_find_program_in_path(GEANY_DEFAULT_TOOLS_GREP);
 	prefs.tools_grep_cmd = utils_get_setting_string(config, "tools", "grep_cmd", tmp_string);
-	g_free(tmp_string);
+	if (!NZV(prefs.tools_grep_cmd))
+		setptr(prefs.tools_grep_cmd, g_find_program_in_path(GEANY_DEFAULT_TOOLS_GREP));
 
 	prefs.context_action_cmd = utils_get_setting_string(config, PACKAGE, "context_action_cmd", "");
 
