[gnome-panel] main: unset GNOME Terminal enviroment variables



commit d00d2132cbaa76a566b9ae5bfbcb65a58aa2130c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Oct 2 17:38:10 2022 +0300

    main: unset GNOME Terminal enviroment variables
    
    Unset GNOME Terminal enviroment variables to avoid following
    error:
      Error creating terminal: Failed to get screen from object path
      /org/gnome/Terminal/screen/dd1b8ccf_5db8_48ed_835d_64fea4e88605
    
    Steps to reproduce problem:
    - Open two terminal windows;
    - Restart GNOME Panel from one window with `gnome-panel --replace &`;
    - Close window with `exit`;
    - Try to open new terminal window from panel.
    
    Without this commit new terminal window will not open and mentioned
    error will be logged.
    
    These environment variables was introduced in:
    https://gitlab.gnome.org/GNOME/gnome-terminal/-/commit/4f2d2a394282bb0d15ee13bb8c7cb6efee0cd8f4

 gnome-panel/gp-main.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gnome-panel/gp-main.c b/gnome-panel/gp-main.c
index da06bafbf..4904fc880 100644
--- a/gnome-panel/gp-main.c
+++ b/gnome-panel/gp-main.c
@@ -198,6 +198,9 @@ main (int argc, char *argv[])
   session = gp_session_new (replace, autostart_id != NULL ? autostart_id : "");
   g_unsetenv ("DESKTOP_AUTOSTART_ID");
 
+  g_unsetenv ("GNOME_TERMINAL_SCREEN");
+  g_unsetenv ("GNOME_TERMINAL_SERVICE");
+
   g_signal_connect (session,
                     "name-lost",
                     G_CALLBACK (name_lost_cb),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]