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:48:35 +0100 |
commit | 6883981a14fbe512815783a2966f2a8a0149034f (patch) | |
tree | c1906ff95ec9725f89ab5a6bd26a58295e0430f5 /daemon/gvfsbackendrecent.c | |
parent | acb3269dd89c87d13c8e238ebb0c136e3824ac86 (diff) | |
download | gvfs-6883981a14fbe512815783a2966f2a8a0149034f.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
Diffstat (limited to 'daemon/gvfsbackendrecent.c')
-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 12000403..ad75e2af 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"); |