Author Topic: Add support for gnome-terminal for project tools > run in X-term  (Read 1270 times)

Dennis

  • Senior Community Member
  • Posts: 3966
  • Hero Points: 517
It already looks for numerous different terminal programs, but none of them are installed by default on Ubuntu 20.

Setting VSLICKXTERM fixes Tools > OS Shell..., but it does not work for project tools / run in X term.  The problem seems to trace to passing the -T argument to set the title in XtermGetCommandPrefix()

https://community.slickedit.com/index.php/topic,17428.msg67886.html#msg67886

Here is a patch:
Code: [Select]
--- /home/XXXXX/doscmds.e 2024-01-11 09:37:00.443908942 -0500
+++ /opt/slickedit-pro2023/macros/doscmds.e 2023-11-02 11:29:09.108852612 -0400
@@ -646,22 +646,17 @@
       if (containsXterm("/usr/sbin/", "xterm", xterm)) return(xterm);
       if (containsXterm("/usr/sbin/", "xwsh", xterm)) return(xterm);
       if (containsXterm("/usr/sbin/", "iwsh", xterm)) return(xterm);
-   } else if (ostype == "LINUX") {
-      if (containsXterm("/usr/bin/", "gnome-terminal", xterm)) return(xterm);
    }
    return('');
 }
 _str _XtermGetCommandPrefix(_str title,bool includeShell=true)
 {
-   xterm := buildXtermPath();
+   _str xterm=buildXtermPath();
    if (xterm == "") {
       _message_box(nls("Can't find an X terminal emulator (xterm,dtterm,aixterm,hpterm,cmdtool).\nPlease set VSLICKXTERM to the full path to your X terminal emulator."));
       return('');
    }
-   prefix := xterm' -T "'title'" -e ';
-   if (pos("gnome-terminal", xterm) > 0) {
-      prefix = xterm :+ ' -- ';
-   }
+   _str prefix=xterm' -T "'title'" -e ';
    if( includeShell ) {
       cmdshell := get_env('SHELL');
       if (cmdshell=='') {
« Last Edit: January 11, 2024, 02:42:54 PM by Dennis »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6884
  • Hero Points: 530
Re: Add support for gnome-terminal for project tools > run in X-term
« Reply #1 on: February 15, 2024, 09:57:16 PM »
Fixed support for gnome-terminal. Thanks