diff --git a/gplugin/gplugin-manager.h b/gplugin/gplugin-manager.h
--- a/gplugin/gplugin-manager.h
+++ b/gplugin/gplugin-manager.h
@@ -75,6 +75,12 @@
 	GPluginManager *manager,
 	const gchar *prefix,
 	const gchar *appname);
+void gplugin_manager_append_paths_from_environment(
+	GPluginManager *manager,
+	const gchar *name);
+void gplugin_manager_prepend_paths_from_environment(
+	GPluginManager *manager,
+	const gchar *name);
 
 GList *gplugin_manager_get_paths(GPluginManager *manager);
 
# HG changeset patch
# Node ID 07802bdc6335
# Parent  65d7732cb6bc
diff --git a/gplugin/gplugin-manager.c b/gplugin/gplugin-manager.c
--- a/gplugin/gplugin-manager.c
+++ b/gplugin/gplugin-manager.c
@@ -131,6 +131,30 @@
 	return TRUE;
 }
 
+void
+gplugin_manager_change_paths_from_environment(
+	GPluginManager *manager,
+	const gchar *name,
+	void (*changer)(GPluginManager*, const gchar*))
+{
+	gchar **paths;
+	gint i;
+	const gchar *from_env;
+
+	from_env = g_getenv(name);
+	if (from_env == NULL) {
+		return;
+	}
+
+	paths = g_strsplit(from_env, G_SEARCHPATH_SEPARATOR_S, 0);
+
+	for(i = 0; paths[i]; i++) {
+		(*changer)(manager, paths[i]);
+	}
+
+	g_strfreev(paths);
+}
+
 static void
 gplugin_manager_foreach_unload_plugin(
 	gpointer key,
@@ -521,6 +545,9 @@
 	}
 }
 
+
+
+
 /******************************************************************************
  * API
  *****************************************************************************/
@@ -698,6 +725,42 @@
 }
 
 /**
+ * gplugin_manager_append_paths_from_environment:
+ * @manager: The #GPluginManager instance.
+ * @name: The name of the environment variable containing the paths to add.
+ *
+ * Append the paths held in the environment variable @name to the list.
+ */
+void
+gplugin_manager_append_paths_from_environment(
+	GPluginManager *manager,
+	const gchar *name)
+{
+	gplugin_manager_change_paths_from_environment(
+			manager,
+			name,
+			&gplugin_manager_append_path);
+}
+
+/**
+ * gplugin_manager_prepend_paths_from_environment:
+ * @manager: The #GPluginManager instance.
+ * @name: The name of the environment variable containing the paths to add.
+ *
+ * Prepends the paths held in the environment variable @name to the list.
+ */
+void
+gplugin_manager_prepend_paths_from_environment(
+	GPluginManager *manager,
+	const gchar *name)
+{
+	gplugin_manager_change_paths_from_environment(
+			manager,
+			name,
+			&gplugin_manager_prepend_path);
+}
+
+/**
  * gplugin_manager_get_paths:
  * @manager: The manager instance.
  *
diff --git a/gplugin/tests/test-plugin-manager-paths.c b/gplugin/tests/test-plugin-manager-paths.c
--- a/gplugin/tests/test-plugin-manager-paths.c
+++ b/gplugin/tests/test-plugin-manager-paths.c
@@ -221,6 +221,74 @@
 	g_assert_cmpuint(0, ==, size);
 }
 
+
+static void
+test_gplugin_manager_add_app_paths_via_environ(void)
+{
+	GList *paths = NULL, *l = NULL;
+	gint found_pos = 0;
+	gchar *pre_paths, *post_paths;
+	gint found_paths = 0;
+	gint path_count;
+	const gchar *pre_env_var_name = "GPLUGIN_EXTRA_TEST_PREPATHS";
+	const gchar *post_env_var_name = "GPLUGIN_EXTRA_TEST_POSTPATHS";
+
+	GPluginManager *manager = gplugin_manager_get_default();
+
+	/* get number of paths to start */
+	paths = gplugin_manager_get_paths(manager);
+	path_count = g_list_length(paths);
+
+	/* build contents of environment vars */
+	pre_paths = g_strdup_printf("%s%s%s",
+			"/prefoo",
+			G_SEARCHPATH_SEPARATOR_S,
+			"/prebar/"
+			);
+	post_paths = g_strdup_printf("%s%s%s",
+			"/postfoo",
+			G_SEARCHPATH_SEPARATOR_S,
+			"/postbar/"
+			);
+
+	/* put /envfoo and /envbar as paths in an environment variable */
+	g_setenv(pre_env_var_name, pre_paths, TRUE);
+	g_setenv(post_env_var_name, post_paths, TRUE);
+
+	/* have the manager add them */
+	gplugin_manager_prepend_paths_from_environment(manager,
+			pre_env_var_name);
+	gplugin_manager_append_paths_from_environment(manager,
+			post_env_var_name);
+
+	/* now get the manager's current paths */
+	paths = gplugin_manager_get_paths(manager);
+
+	/* four more paths now */
+	test_path_count(manager, path_count + 4);
+
+	/* check order is correct */
+	found_pos = 0;
+	for(l = paths; l != NULL; l = l->next) {
+		found_pos += 1;
+		if (g_strcmp0(l->data, "/prefoo/") == 0) {
+			g_assert_cmpint(2, >=, found_pos);
+			found_paths += 1;
+		} else if (g_strcmp0(l->data, "/prebar/") == 0) {
+			g_assert_cmpint(2, >=, found_pos);
+			found_paths += 1;
+		} else if (g_strcmp0(l->data, "/postfoo/") == 0) {
+			g_assert_cmpint(2, <, found_pos);
+			found_paths += 1;
+		} else if (g_strcmp0(l->data, "/postbar/") == 0) {
+			g_assert_cmpint(2, <, found_pos);
+			found_paths += 1;
+		}
+	}
+	g_assert_cmpint(4, ==, found_paths);
+	g_free(pre_paths);
+}
+
 gint
 main(gint argc, gchar **argv)
 {
@@ -256,9 +324,14 @@
 	g_test_add_func(
 		"/plugins/paths/add_default_paths",
 		test_gplugin_manager_add_default_paths);
+
 	g_test_add_func(
 		"/plugins/paths/add_app_paths",
 		test_gplugin_manager_add_app_paths);
 
+	g_test_add_func(
+		"/plugins/paths/add_app_paths_via_environ",
+		test_gplugin_manager_add_app_paths_via_environ);
+
 	return g_test_run();
 }
