@@ -0,0 +1,48 @@
1+diff --git a/thunarx/thunarx-provider-factory.c b/thunarx/thunarx-provider-factory.c
2+index 31b8835..a3e7f4e 100644
3+--- a/thunarx/thunarx-provider-factory.c
4++++ b/thunarx/thunarx-provider-factory.c
5+@@ -141,12 +141,19 @@ static GList*
6+ thunarx_provider_factory_load_modules (ThunarxProviderFactory *factory)
7+ {
8+ ThunarxProviderModule *module;
9++ const gchar *thunar_dir;
10+ const gchar *name;
11+ GList *modules = NULL;
12+ GList *lp;
13+ GDir *dp;
14+
15+- dp = g_dir_open (THUNARX_DIRECTORY, 0, NULL);
16++ thunar_dir = g_getenv("THUNARX_MODULE_DIR");
17++ if (NULL == thunar_dir)
18++ {
19++ thunar_dir = THUNARX_DIRECTORY;
20++ }
21++
22++ dp = g_dir_open (thunar_dir, 0, NULL);
23+ if (G_LIKELY (dp != NULL))
24+ {
25+ /* determine the types for all existing plugins */
26+diff --git a/thunarx/thunarx-provider-module.c b/thunarx/thunarx-provider-module.c
27+index 023ad2a..6c21997 100644
28+--- a/thunarx/thunarx-provider-module.c
29++++ b/thunarx/thunarx-provider-module.c
30+@@ -174,10 +174,17 @@ static gboolean
31+ thunarx_provider_module_load (GTypeModule *type_module)
32+ {
33+ ThunarxProviderModule *module = THUNARX_PROVIDER_MODULE (type_module);
34++ const gchar *thunar_dir;
35+ gchar *path;
36++
37++ thunar_dir = g_getenv("THUNARX_MODULE_DIR");
38++ if (NULL == thunar_dir)
39++ {
40++ thunar_dir = THUNARX_DIRECTORY;
41++ }
42+
43+ /* load the module using the runtime link editor */
44+- path = g_build_filename (THUNARX_DIRECTORY, type_module->name, NULL);
45++ path = g_build_filename (thunar_dir, type_module->name, NULL);
46+ module->library = g_module_open (path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
47+ g_free (path);
48+