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 initial flatpak-spawn support #570

Merged
merged 3 commits into from
Mar 29, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions terminatorlib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,11 @@ def get_flatpak_args(args, envv, cwd):
"flatpak-spawn", "--host", "--watch-bus", "--forward-fd=1",
"--forward-fd=2", "--directory={}".format(cwd)
]
# Detect and remove duplicate shell in args
# to work around vte.spawn_sync() requirement.
if len(set([args[0], args[1]])) == 1:
del args[0]
Comment on lines +418 to +419
Copy link
Contributor Author

@JayDoubleu JayDoubleu Feb 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattrose
This will remove duplicated first command/shells which is caused by https://github.com/gnome-terminator/terminator/blob/master/terminatorlib/terminal.py#L1484 and to my understanding it's no longer needed when working with spawn_async() so it should be safe to do that.


flatpak_args = flatpak_spawn + env_args + args
JayDoubleu marked this conversation as resolved.
Show resolved Hide resolved

dbg('returned flatpak args: %s' % flatpak_args)
Expand Down