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

Unabled to split panes or open a new tab when bashed or sshed into docker container #966

Open
jamesrobb opened this issue Dec 2, 2024 · 3 comments

Comments

@jamesrobb
Copy link

Before opening an issue, please try starting terminator with an empty config
file, by issuing terminator -u -g /dev/null and see if it starts normally.

If it does, and you still want to open the bug, then please attach the
config file, usually found at $HOME/.config/terminator/config to the issue

Fill out as many of these fields as you can

Describe the bug
I have a setup where I am sshed into a server, and from there I bash into a docker container using docker exec. When I am in the container I am unable to open new tabs or split the pane, irrespective of using hotkeys or the right-click menu.
To Reproduce
Steps to reproduce the behavior:

  • ssh into a server
  • enter a docker container via docker exec -it <container> /usr/bin/zsh
  • try to open a new tab or split a pane

Expected behavior
The ability to open tabs or spit panes works as one would intuitively expect.

Screenshots
not applicable

Desktop (please complete the following information):

  • OS or Linux Distribution: Manjaro
  • Version: 24.2.0
  • Display Technology: X11

Additional context
When I run terminator from another terminal and try to open a tab or split a pane I get the following error.

gi.repository.GLib.GError: g_convert_error: The hostname of the URI “file://525198bb6eda/<directory_i_am_in>” is invalid (4)
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/terminatorlib/terminal_popup_menu.py", line 209, in <lambda>
    self.terminal.get_cwd()))
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/terminatorlib/terminal.py", line 260, in get_cwd
    return(GLib.filename_from_uri(vte_cwd)[0])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I updated my OS today and I think hundreds of packages were upgraded. It doesn't look like terminator was upgraded, but something it depends on seems to have been as this all worked yesterday.

@egmontkob
Copy link

Here's a simpler reproducer that doesn't need a container. It only emits the relevant OSC 7 escape sequence, and then waits to make sure the prompt doesn't override it with something else.

printf '\e]7;file://525198bb6eda/bin\e\\'; sleep 1000

Sometimes Terminator just hangs for a couple of seconds (while the stack trace is collected, I guess) but then continues normally. Sometimes, however, it crashes for me.

The stack trace is somewhat different based on whether you invoke the menu entry or press the hotkey, but it doesn't matter. The point is that GLib.filename_from_uri() throws an exception which remains uncaught.

@egmontkob
Copy link

Some other VTE-based terminals also suffer from this issue: gnunn1/tilix#2244, https://gitlab.xfce.org/apps/xfce4-terminal/-/issues/345.

@egmontkob
Copy link

GLib might soon fix leading digits, but even then, the bug would remain with other invalid URIs (such as the hostname containing an underscore, or other nasty things).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants