diff options
author | Ondrej Holy <oholy@redhat.com> | 2016-12-13 08:43:48 +0100 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2016-12-15 16:52:44 +0100 |
commit | 325e45c137f25fe57ea2eaf06461c86d659e58e6 (patch) | |
tree | cd235dd905c2902536c4bdc80071f66c03b848b6 | |
parent | d455f97e3577445ed3c4ef6ddad0365bc4284453 (diff) | |
download | gvfs-325e45c137f25fe57ea2eaf06461c86d659e58e6.tar.gz |
recent: Fix crashes when DISPLAY is not set
Recent backend is based on GtkRecentManager and calls gtk_init.
Unfortunatelly, gtk_init aborts with "cannot open display: " warning
if DISPLAY variable is not set. It happens e.g. when recent backend
is spawned from a terminal without a graphical session. Systemd user
units make this even worse and this happens also in graphical session
if gvfs was running before the graphical session starts...
Let's remove gtk_init call. It seems that GtkRecentManager works
properly without it, because the display isn't really needed for it.
https://bugzilla.gnome.org/show_bug.cgi?id=773300
-rw-r--r-- | daemon/gvfsbackendrecent.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/daemon/gvfsbackendrecent.c b/daemon/gvfsbackendrecent.c index 7db60cfa..f1dce2e0 100644 --- a/daemon/gvfsbackendrecent.c +++ b/daemon/gvfsbackendrecent.c @@ -691,8 +691,6 @@ g_vfs_backend_recent_init (GVfsBackendRecent *backend) backend->items = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, (GDestroyNotify)recent_item_free); backend->uri_map = g_hash_table_new (g_str_hash, g_str_equal); - gtk_init (NULL, NULL); - /* translators: This is the name of the backend */ g_vfs_backend_set_display_name (vfs_backend, _("Recent")); g_vfs_backend_set_icon_name (vfs_backend, "document-open-recent"); |