-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
I'm working on a project that is used to start different commands on different servers, and for this, it needs to forward terminals through TCP pipes.
There are various reasons why I don't want to directly open a local ssh command on the client side; here are some of them:
- ssh may not be available on the client side, or it might be incompatible with the ssh server
- there may not be an ssh server running on the server side at all
- possibly, logging in with ssh requires 2FA, and once authenticated, I want to be able to open many terminals without having to do 2FA many times
This is how I use it right now:
- create a process on the server side using
exec.Commandand thenpty.Start - forward the input and output of the tty (
*os.File, as returned bypty.Startto the "other side", using a TCP connection / pipe - open fyne.Terminal on the client side using
terminal.RunWithConnectionand display the terminal there
However, I'm missing a functionality: when the terminal is resized, then I'm not able to reconfigure the pty size, because that interface is hidden. It would be nice to add this feature. This would allow Terminal to be used through any pipe/network connection.
Suggested changes are:
- Add the possiblity to listen for pty.WinSize changes, e.g. add a
Terminal.SetResizeHandlermethod - In term_unix.go,
updatePTYSizemethod should first call the resize handler, and after that callpty.Setsize, but only ift.pty != nil
Using this modified interface, an end user could forward not just the pty through a pipe, but also forward terminal size changes.
Metadata
Metadata
Assignees
Labels
No labels