-
Notifications
You must be signed in to change notification settings - Fork 253
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
Terminator flatpak-spawn integration (HostCommand) #347
Comments
Where did you get a flatpak build of Terminator from? It's been on my todo list for a while but I've never used flatpak, and I haven't had time to do the research to build up a flatpak build yet. Did Redhat build one up? If we can get access to the flatpak build we can suggest a patch for flatpak that will do the right thing for the flatpak package. The best thing I can think I can think of is to add a profile, or change the default profile to have |
Seems to be working ok, terminator will need some modifications to spawn shell on a host by default(gnome-terminator/terminator#347)
No, redhat didn't yet build one. I know that the |
@mattrose this is now on https://src.fedoraproject.org/flatpaks/terminator/tree/master Ps. I've changed the app id to match your dbus name I'm happy to be your guinea pig for testing if needed. Give me a shout if you would like some help setting up development environment. |
I'll play with this a bit, I think the only thing we need is a way to detect that we're in a flatpak environment, and set the command appropriately. Is there a standard way of detecting that you're running in a flatpak sandbox? |
Apparently the common approach is to check if Looks like Tilix does it with custom bin mentioned here: https://github.com/gnunn1/tilix/blob/master/experimental/flatpak/tilix-flatpak-toolbox.c |
yeah, so I tried it, and if you alter the default profile in the Preferences UI so that it runs |
The issue is that flatpak-spawn produces unstable shell experience. |
Flatpak is using the "flatpak-spawn" command to escape from the sandbox and run commands on the host.
Tilix has implemented the below so it automatically spawns shell on the host instead of the container
https://github.com/gnunn1/tilix/blob/787e5335ecef9cada035170eeaedb301f567127d/source/gx/tilix/terminal/terminal.d#L2825..L2833
https://gitlab.gnome.org/GNOME/gnome-builder/-/blob/master/src/libide/threading/ide-flatpak-subprocess.c#L549
Would it be possible to look at the implementation in terminator ?
Here is an example of python running flatpak's "HostCommand"
https://stackoverflow.com/questions/39494813/pass-file-descriptor-via-a-dbus-function-call-from-python-aka-call-flatpaks-ho
Currently I can launch terminator from flatpak but I have to run
flatpak-spawn --host zsh
from within terminator and this is not persistent across tabs.Alternatively, if there would be a way to pass default run command to terminator as an argument for example:
--default-shell="flatpak-spawn --host $SHELL"
which would apply to all tabs overwriting the config.The text was updated successfully, but these errors were encountered: