diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c
index 80254b3..03c289a 100644
--- a/libdocument/ev-file-helpers.c
+++ b/libdocument/ev-file-helpers.c
@@ -67,9 +67,17 @@ ev_dot_dir (void)
 					    "evince",
 					    NULL);
 
-		exists = ensure_dir_exists (dot_dir);
-		if (!exists)
-			exit (1);
+		exists = g_file_test (dot_dir, G_FILE_TEST_IS_DIR);
+		if (!exists) {
+			g_free (dot_dir);
+			dot_dir = g_build_filename (g_get_user_config_dir (),
+						    "evince",
+						    NULL);
+
+			exists = ensure_dir_exists (dot_dir);
+			if (!exists)
+				exit (1);
+		}
 	}
 
 	return dot_dir;
diff --git a/shell/ev-application.c b/shell/ev-application.c
index e852561..6b9428a 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -745,25 +745,37 @@ static void
 ev_application_init (EvApplication *ev_application)
 {
 	gint i;
+	gchar *config_dir;
 	const gchar *home_dir;
 	
 	ev_application_init_session (ev_application);
 
-	home_dir = g_get_home_dir ();
-	if (home_dir) {
-		ev_application->accel_map_file = g_build_filename (home_dir,
-								   ".gnome2",
-								   "accels"
-								   "evince",
-								   NULL);
-		gtk_accel_map_load (ev_application->accel_map_file);
-	}
-	
 	ev_application->toolbars_model = egg_toolbars_model_new ();
 
 	ev_application->toolbars_file = g_build_filename
 			(ev_dot_dir (), "evince_toolbar.xml", NULL);
 
+	// This test should be run after at least one ev_dot_dir call, to give 
+	// $XDG_CONFIG_HOME/evince a chance to be created
+	config_dir = g_build_filename (g_get_user_config_dir (), 
+				       "evince", 
+				       NULL);
+	home_dir = g_get_home_dir();
+	if (g_file_test (config_dir, G_FILE_TEST_IS_DIR)) {
+		ev_application->accel_map_file = g_build_filename (config_dir,
+					     "accels",
+					     NULL);
+		gtk_accel_map_load (ev_application->accel_map_file);
+	} else if (home_dir) {
+		ev_application->accel_map_file = g_build_filename (home_dir,
+					     ".gnome2",
+					     "accels"
+					     "evince",
+					     NULL);
+		gtk_accel_map_load (ev_application->accel_map_file);
+	}
+	g_free (config_dir);
+	
 	egg_toolbars_model_load_names (ev_application->toolbars_model,
 				       DATADIR "/evince-toolbar.xml");
 
