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

[bug fix]: Fix screen-splitting issues in terminatorlib/terminal.py #965

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0xh3xa
Copy link

@0xh3xa 0xh3xa commented Nov 28, 2024

What:

A problem occurs when attempting to split the screen either horizontally or vertically in Terminator.

Traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/terminatorlib/terminal_popup_menu.py", line 198, in <lambda>
    self.terminal.get_cwd()))
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/terminatorlib/terminal.py", line 261, in get_cwd
    return(GLib.filename_from_uri(vte_cwd)[0])
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
gi.repository.GLib.GError: g_convert_error: The hostname of the URI  “file://test-account/home/main” is invalid (4)

Description of the fix:

  • This fix resolves an issue in terminatorlib/terminal.py where the improper handling of the GLib.filename_from_uri function caused the split-screen feature to fail due to an incorrect return value.

  • I've updated the get_cwd(self) function to use Python's built-in method for retrieving the current working directory instead of relying on GLib.filename_from_uri.

Screenshots:

image

A problem occurs when attempting to split the screen either horizontally or vertically in Terminator.

@0xh3xa 0xh3xa changed the title Fix: Screen splitting and resolve get_cwd error in terminatorlib/terminal.py by handling GLib.filename_from_uri output Fix: Resolve get_cwd error and screen splitting issue in terminatorlib/terminal.py by correctly handling GLib.filename_from_uri output Nov 28, 2024
@mattrose
Copy link
Member

This doesn't duplicate the functionality. It just sets cwd as the home directory. Can you be more clear on the errors that you're seeing

@mattrose mattrose added the question Further information is requested label Jan 18, 2025
@0xh3xa
Copy link
Author

0xh3xa commented Feb 18, 2025

@mattrose I have updated the description to include the error trace.

@0xh3xa 0xh3xa changed the title Fix: Resolve get_cwd error and screen splitting issue in terminatorlib/terminal.py by correctly handling GLib.filename_from_uri output bugfix: Fix get_cwd and screen-splitting issues in terminatorlib/terminal.py by properly handling GLib.filename_from_uri output Feb 18, 2025
@0xh3xa 0xh3xa changed the title bugfix: Fix get_cwd and screen-splitting issues in terminatorlib/terminal.py by properly handling GLib.filename_from_uri output bugfix: Fix screen-splitting issues in terminatorlib/terminal.py Feb 18, 2025
@0xh3xa 0xh3xa changed the title bugfix: Fix screen-splitting issues in terminatorlib/terminal.py [bug fix]: Fix screen-splitting issues in terminatorlib/terminal.py Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants