Re: portable terminal

"John W. Eaton" <[email protected]>
Newsgroups gmane.comp.gnu.octave.maintainers
Message-ID <[email protected]>
On 7/29/20 12:31 PM, Rik wrote:
> jwe,
> 
> I saw this bit of code in your latest check-in for __debug_octave__.m:
> 
> +    if (isunix ())
> +      ## FIXME: is there a portable way to run a command in a new window?
> +      ## Obviously, gnome-terminal is not always available.
> +      command_string = "gnome-terminal -- gdb -p %d";
> 
> As far as I'm aware there isn't a 100% working solution.  On the other 
> hand, it probably is possible to do a bit better than one hardcoded 
> terminal.  I happen to use KDE for the desktop and don't have said 
> terminal installed.
> 
> I tried xdg-open, but it treats the command as a URL.
> 
> I think for a fair number of systems have the alternatives system 
> inherited from Debian (Ubuntu, Mint, etc.) or an implementation copied 
> from Debian (RHEL, Fedora) in which case there is a link at 
> /usr/bin/x-terminal-emulator which will work.
> 
> Also, can the default be made to use '-e gdb -p %d'?  That syntax will 
> work with either gnome-terminal or konsole, but the existing one does not.

Sure, please make whatever changes are helpful.  I have no objection to 
improvements.

jwe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.