Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gnome-terminal as terminal emulator #264

Closed
tcaiazzi opened this issue Jan 17, 2024 · 0 comments
Closed

Add gnome-terminal as terminal emulator #264

tcaiazzi opened this issue Jan 17, 2024 · 0 comments
Assignees
Milestone

Comments

@tcaiazzi
Copy link
Member

tcaiazzi commented Jan 17, 2024

We need to add specific support to gnome-terminal as terminal emulator.

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.

@tcaiazzi tcaiazzi self-assigned this Jan 17, 2024
@tcaiazzi tcaiazzi added this to the Release 3.7.3 milestone Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant