Commit 6b8d94ae authored by Giovanni Campagna's avatar Giovanni Campagna Committed by Ray Strode

Make sure we use the local gio vfs in gnome-settings

So that we don't accidentally start gvfsd too early

Patch slightly modified by Ray Strode to preserve
original glib environment variable values.
parent 39f146e6
......@@ -236,6 +236,34 @@ maybe_push_env_var (const char* name)
gsm_util_setenv (name, value);
static void
initialize_gio (void)
char *disable_fuse = NULL;
char *use_vfs = NULL;
disable_fuse = g_strdup (g_getenv ("GVFS_DISABLE_FUSE"));
use_vfs = g_strdup (g_getenv ("GVFS_USE_VFS"));
g_setenv ("GVFS_DISABLE_FUSE", "1", TRUE);
g_setenv ("GIO_USE_VFS", "local", TRUE);
g_vfs_get_default ();
if (use_vfs) {
g_setenv ("GIO_USE_VFS", use_vfs, TRUE);
g_free (use_vfs);
} else {
g_unsetenv ("GIO_USE_VFS");
if (disable_fuse) {
g_setenv ("GIO_DISABLE_FUSE", use_vfs, TRUE);
g_free (disable_fuse);
} else {
g_unsetenv ("GVFS_DISABLE_FUSE");
main (int argc, char **argv)
......@@ -263,6 +291,9 @@ main (int argc, char **argv)
gsm_util_init_error (TRUE, "%s", error->message);
/* Make sure we initialize gio in a way that does not autostart any daemon */
initialize_gio ();
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment