diff --git a/gio/Makefile.am b/gio/Makefile.am
index 27369c8..3eb4c1b 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -511,6 +511,8 @@ endif
 
 install-data-local: install-ms-lib
 	$(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
+	## Will fail if cross-compiling: just don't care.
+	-./glib-compile-schemas "$(DESTDIR)$(schemadir)"
 
 uninstall-local: uninstall-ms-lib
 
@@ -664,6 +666,7 @@ EXTRA_DIST += 			\
 	makefile.msc		\
 	gio.rc.in		\
 	gschema.dtd		\
+	gio.terminal.gschema.xml \
 	gconstructor_as_data.h	\
 	gnetworking.h.win32	\
 	$(NULL)
@@ -736,7 +739,9 @@ gsettings_LDADD = libgio-2.0.la 			\
 gsettings_SOURCES = gsettings-tool.c
 
 schemadir = $(datadir)/glib-2.0/schemas
-dist_schema_DATA = gschema.dtd
+dist_schema_DATA = \
+	gschema.dtd			\
+	gio.terminal.gschema.xml
 
 # ------------------------------------------------------------------------
 # gdbus(1) tool
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 786ce0f..fe38ae6 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -44,6 +44,7 @@
 #include <glib/gstdio.h>
 #include "glibintl.h"
 #include "giomodule-priv.h"
+#include "gsettings.h"
 #include "gappinfo.h"
 #include "gappinfoprivate.h"
 #include "glocaldirectorymonitor.h"
@@ -71,10 +72,14 @@
 #define FULL_NAME_KEY               "X-GNOME-FullName"
 #define KEYWORDS_KEY                "Keywords"
 #define STARTUP_WM_CLASS_KEY        "StartupWMClass"
+#define TERMINAL_PREFERENCES_SCHEMA "gio.terminal"
+#define TERMINAL_PREFERENCES_SCHEMA_PATH \
+                                    "/org/gnome/desktop/applications/terminal/"
 
 enum {
   PROP_0,
-  PROP_FILENAME
+  PROP_FILENAME,
+  PROP_TERMPATH
 };
 
 static void     g_desktop_app_info_iface_init         (GAppInfoIface    *iface);
@@ -93,6 +98,7 @@ struct _GDesktopAppInfo
   char *desktop_id;
   char *filename;
   char *app_id;
+  char *terminal_path;
 
   GKeyFile *keyfile;
 
@@ -113,6 +119,7 @@ struct _GDesktopAppInfo
   char *startup_wm_class;
   char **mime_types;
   char **actions;
+  GSettings *term_settings;
 
   guint nodisplay       : 1;
   guint hidden          : 1;
@@ -1533,6 +1540,7 @@ g_desktop_app_info_finalize (GObject *object)
 
   g_free (info->desktop_id);
   g_free (info->filename);
+  g_free (info->terminal_path);
 
   if (info->keyfile)
     g_key_file_unref (info->keyfile);
@@ -1556,6 +1564,8 @@ g_desktop_app_info_finalize (GObject *object)
   g_strfreev (info->mime_types);
   g_free (info->app_id);
   g_strfreev (info->actions);
+  if (info->term_settings)
+    g_object_unref (info->term_settings);
 
   G_OBJECT_CLASS (g_desktop_app_info_parent_class)->finalize (object);
 }
@@ -1574,6 +1584,17 @@ g_desktop_app_info_set_property (GObject      *object,
       self->filename = g_value_dup_string (value);
       break;
 
+    case PROP_TERMPATH:
+      g_free (self->terminal_path);
+      if (self->term_settings)
+        g_object_unref (self->term_settings);
+      self->term_settings = NULL;
+      self->terminal_path = g_value_dup_string (value);
+      if (self->terminal_path)
+        self->term_settings = g_settings_new_with_path (TERMINAL_PREFERENCES_SCHEMA,
+                                                        self->terminal_path);
+      break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -1593,6 +1614,9 @@ g_desktop_app_info_get_property (GObject    *object,
     case PROP_FILENAME:
       g_value_set_string (value, self->filename);
       break;
+    case PROP_TERMPATH:
+      g_value_set_string (value, self->terminal_path);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -1617,6 +1641,13 @@ g_desktop_app_info_class_init (GDesktopAppInfoClass *klass)
                                    PROP_FILENAME,
                                    g_param_spec_string ("filename", "Filename", "", NULL,
                                                         G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+  g_object_class_install_property (gobject_class,
+                                   PROP_TERMPATH,
+                                   g_param_spec_string ("terminal-path",
+                                                        "Terminal path",
+                                                        "",
+                                                        TERMINAL_PREFERENCES_SCHEMA_PATH,
+                                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 }
 
 static void
@@ -1939,6 +1970,10 @@ g_desktop_app_info_dup (GAppInfo *appinfo)
 
   new_info->filename = g_strdup (info->filename);
   new_info->desktop_id = g_strdup (info->desktop_id);
+  new_info->terminal_path = g_strdup (info->terminal_path);
+
+  if (info->term_settings)
+    new_info->term_settings = g_object_ref (info->term_settings);
 
   if (info->keyfile)
     new_info->keyfile = g_key_file_ref (info->keyfile);
@@ -2438,16 +2473,18 @@ expand_application_parameters (GDesktopAppInfo   *info,
 }
 
 static gboolean
-prepend_terminal_to_vector (int    *argc,
-                            char ***argv)
+prepend_terminal_to_vector (GSettings *term_settings,
+                            int       *argc,
+                            char      ***argv)
 {
 #ifndef G_OS_WIN32
   char **real_argv;
   int real_argc;
   int i, j;
+  char *pgm;
   char **term_argv = NULL;
   int term_argc = 0;
-  char *check;
+  char *check = NULL;
   char **the_argv;
 
   g_return_val_if_fail (argc != NULL, FALSE);
@@ -2470,33 +2507,50 @@ prepend_terminal_to_vector (int    *argc,
   term_argc = 2;
   term_argv = g_new0 (char *, 3);
 
-  check = g_find_program_in_path ("gnome-terminal");
+  pgm = g_settings_get_string (term_settings, "exec");
+  if (pgm)
+    {
+      check = g_find_program_in_path (pgm);
+      g_free (pgm);
+    }
+
   if (check != NULL)
     {
       term_argv[0] = check;
-      /* Note that gnome-terminal takes -x and
-       * as -e in gnome-terminal is broken we use that. */
-      term_argv[1] = g_strdup ("-x");
+      term_argv[1] = g_settings_get_string (term_settings, "exec-arg");
+      if (!term_argv[1])
+        term_argc--;
     }
   else
     {
-      if (check == NULL)
-        check = g_find_program_in_path ("nxterm");
-      if (check == NULL)
-        check = g_find_program_in_path ("color-xterm");
-      if (check == NULL)
-        check = g_find_program_in_path ("rxvt");
-      if (check == NULL)
-        check = g_find_program_in_path ("xterm");
-      if (check == NULL)
-        check = g_find_program_in_path ("dtterm");
-      if (check == NULL)
+      check = g_find_program_in_path ("gnome-terminal");
+      if (check != NULL)
         {
-          check = g_strdup ("xterm");
-          g_warning ("couldn't find a terminal, falling back to xterm");
+          term_argv[0] = check;
+          /* Note that gnome-terminal takes -x and
+           * as -e in gnome-terminal is broken we use that. */
+          term_argv[1] = g_strdup ("-x");
+        }
+      else
+        {
+          if (check == NULL)
+            check = g_find_program_in_path ("nxterm");
+          if (check == NULL)
+            check = g_find_program_in_path ("color-xterm");
+          if (check == NULL)
+            check = g_find_program_in_path ("rxvt");
+          if (check == NULL)
+            check = g_find_program_in_path ("xterm");
+          if (check == NULL)
+            check = g_find_program_in_path ("dtterm");
+          if (check == NULL)
+            {
+              check = g_strdup ("xterm");
+              g_warning ("couldn't find a terminal, falling back to xterm");
+            }
+          term_argv[0] = check;
+          term_argv[1] = g_strdup ("-e");
         }
-      term_argv[0] = check;
-      term_argv[1] = g_strdup ("-e");
     }
 
   real_argc = term_argc + *argc;
@@ -2687,7 +2741,7 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo            *info,
         launched_uris = g_list_prepend (launched_uris, iter->data);
       launched_uris = g_list_reverse (launched_uris);
 
-      if (info->terminal && !prepend_terminal_to_vector (&argc, &argv))
+      if (info->terminal && !prepend_terminal_to_vector (info->term_settings, &argc, &argv))
         {
           g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
                                _("Unable to find terminal required for application"));
diff --git a/gio/gio.terminal.gschema.xml b/gio/gio.terminal.gschema.xml
new file mode 100644
index 0000000..0520f4c
--- /dev/null
+++ b/gio/gio.terminal.gschema.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+  <schema id="gio.terminal">
+    <key type="s" name="exec">
+      <default>'gnome-terminal'</default>
+      <summary>Terminal application</summary>
+      <description>Terminal program to use when starting applications that require one.</description>
+    </key>
+    <key type="s" name="exec-arg">
+      <default>'-x'</default>
+      <summary>Exec Arguments</summary>
+      <description>Argument used to execute programs in the terminal defined by the 'exec' key.</description>
+    </key>
+  </schema>
+</schemalist>
