From f66c232edf359fb6dfb7922357b68fb910c2be3a Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 3 Feb 2015 09:29:51 +0100 Subject: [PATCH] Mount /run/user/$uid/dconf if the app has access to $HOME This is needed because while the dconf database is stored in the home dir, the run dir is used to trigger re-mapping of the database files. --- xdg-app-helper.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xdg-app-helper.c b/xdg-app-helper.c index d2b6a219..5a5ff2a3 100644 --- a/xdg-app-helper.c +++ b/xdg-app-helper.c @@ -257,6 +257,7 @@ static const create_table_t create[] = { { FILE_TYPE_DIR, "run/user", 0755}, { FILE_TYPE_DIR, "run/user/%1$d", 0700, NULL, FILE_FLAGS_USER_OWNED }, { FILE_TYPE_DIR, "run/user/%1$d/pulse", 0700, NULL, FILE_FLAGS_USER_OWNED }, + { FILE_TYPE_DIR, "run/user/%1$d/dconf", 0700, NULL, FILE_FLAGS_USER_OWNED }, { FILE_TYPE_DIR, "run/user/%1$d/xdg-app-monitor", 0700, NULL, FILE_FLAGS_USER_OWNED }, { FILE_TYPE_REGULAR, "run/user/%1$d/pulse/native", 0700, NULL, FILE_FLAGS_USER_OWNED }, { FILE_TYPE_DIR, "var", 0755}, @@ -1345,6 +1346,14 @@ main (int argc, free (session_dbus_address); } + if (mount_host_fs || mount_home) + { + char *dconf_run_path_relative = strdup_printf ("run/user/%d/dconf", getuid()); + char *dconf_run_path_absolute = strdup_printf ("/run/user/%d/dconf", getuid()); + + bind_mount (dconf_run_path_absolute, dconf_run_path_relative, BIND_READONLY); + } + if (mount_host_fs) mount_extra_root_dirs (mount_host_fs_ro);