[Gambas-bugtracker] Bug #2521: When Selecting Terminal Emulation in debug mode Most Terminal types exit with error 1

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Mon Apr 18 15:37:33 CEST 2022


http://gambaswiki.org/bugtracker/edit?object=BUG.2521&from=L21haW4-

Comment #8 by Brian G:

The included code seems to start both terminals correctly:

Xfce4-terminal and mate-terminal do not support the --wait or the --, -- must be -x, -x is depreciated in gnome-terminal only
So the following code seems to work: With one caveat that maybe you can solve.

The One issue is that mate-terminal can be configured with a profile parameter to keep the terminal open after a command completes. 
If this is set in the mate-terminal profile then, upon closing the mate-terminal the Gambas program abends with a seg fault.
But for normal use everything works fine.

The XFCE4-terminal and mate-terminal work correctly with the following settings.


Select Case sProg

      Case "konsole"
        aExec = ["konsole", "--nofork", "--hold", "--name", Project.Name & "-output", "-e", aExec.Join(" ")]

      Case "gnome-terminal"
        aExec.Insert([sProg, "--hide-menubar", "--maximize", "--wait", "--title=" & sTitle, "--"], 0)
        $aCmdStart.Add("h", 0)
        $bGnomeTerminal = True

      Case "xfce4-terminal", "mate-terminal"
        aExec.Insert([sProg, "--hide-menubar", "--maximize", "--title=" & sTitle, "-x"], 0)
        $aCmdStart.Add("h", 0)
        $bGnomeTerminal = True

      Case "lxterminal"
        aExec.Insert(["lxterminal", "-t", sTitle, "-e"], 0)

      Case "xterm"
        aExec.Insert(["xterm", "-title", sTitle, "-hold", "-e"], 0)

    End Select

Brian G changed the state of the bug to: Accepted.




More information about the Bugtracker mailing list