-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Description
We need to add specific support to gnome-terminal
as terminal emulator.
Kathara/src/Kathara/cli/ui/utils.py
Lines 91 to 112 in d910504
def unix_connect() -> None: | |
if terminal == "TMUX": | |
from ...trdparty.libtmux.tmux import TMUX | |
logging.debug("Attaching `%s` to TMUX session `%s` with command `%s`" % (machine.name, machine.lab.name, | |
connect_command)) | |
TMUX.get_instance().add_window( | |
machine.lab.name, | |
machine.name, | |
connect_command, | |
cwd=machine.lab.fs_path() | |
) | |
else: | |
logging.debug("Opening Linux terminal with command: %s." % connect_command) | |
# Command should be passed as an array | |
# https://stackoverflow.com/questions/9935151/popen-error-errno-2-no-such-file-or-directory/9935511 | |
subprocess.Popen([terminal, "-e", connect_command], | |
cwd=machine.lab.fs_path(), | |
start_new_session=True | |
) |
Indeed, in the unix_connect
function, the -e
option we use to pass the connect_command
to the terminal will be deprecated for gnome-terminal
in the future.
We need to use --
to terminate the options and put the connect_command
to execute after it.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done