[nautilus] module: Add environment variable NAUTILUS_DISABLE_PLUGINS
- From: António Fernandes <antoniof src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [nautilus] module: Add environment variable NAUTILUS_DISABLE_PLUGINS
 
- Date: Wed, 20 Jul 2022 15:46:31 +0000 (UTC)
 
commit 9b0fd698ea9ee4d94bb47334d5911a30425b7e70
Author: Corey Berla <corey berla me>
Date:   Tue Jul 19 11:45:23 2022 -0700
    module: Add environment variable NAUTILUS_DISABLE_PLUGINS
    
    When NAUTILUS_DISABLE_PLUGINS == TRUE, do not load plugins.
    
    Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1779
 src/nautilus-module.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/nautilus-module.c b/src/nautilus-module.c
index bf474bd6f..4bb46ee64 100644
--- a/src/nautilus-module.c
+++ b/src/nautilus-module.c
@@ -254,6 +254,14 @@ void
 nautilus_module_setup (void)
 {
     static gboolean initialized = FALSE;
+    const gchar *disable_plugins;
+
+    disable_plugins = g_getenv ("NAUTILUS_DISABLE_PLUGINS");
+    if (g_strcmp0 (disable_plugins, "TRUE") == 0)
+    {
+        /* Troublingshooting envvar is set to disable extensions */
+        return;
+    }
 
     if (!initialized)
     {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]