GRC: when passing arguments to terminal emulator: individually

The joined argument string is only useful for logging; some terminal
emulators seem to accept it (which probably means they pass their one
argument to a shell), others fail (gnome-terminal, alacritty, …).

By splitting the arguments, this should work on all terminal emulators.

Tested against xterm and alacritty, the former still works, the latter
now works.

Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
This commit is contained in:
Marcus Müller 2024-04-24 01:51:36 +02:00 committed by Jeff Long
parent 0990cb2029
commit 2c9f52d7e9
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ class ExecFlowGraphThread(threading.Thread):
if ('gnome-terminal' in xterm_executable):
run_command_args = [xterm_executable, '--'] + run_command_args
else:
run_command_args = [xterm_executable, '-e', run_command]
run_command_args = [xterm_executable, '-e'] + run_command_args
# this does not reproduce a shell executable command string, if a graphical
# terminal is used. Passing run_command though shlex_quote would do it but

View File

@ -50,7 +50,7 @@ class ExecFlowGraphThread(threading.Thread):
if ('gnome-terminal' in xterm_executable):
run_command_args = [xterm_executable, '--'] + run_command_args
else:
run_command_args = [xterm_executable, '-e', run_command]
run_command_args = [xterm_executable, '-e'] + run_command_args
# this does not reproduce a shell executable command string, if a graphical
# terminal is used. Passing run_command though shlex_quote would do it but