[GH-ISSUE #478] any hint or possibility to use tview on server? #347

Closed
opened 2026-03-04 01:04:13 +03:00 by kerem · 4 comments
Owner

Originally created by @hick on GitHub (Jul 22, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/478

I mean to develop a telnet server using tview, and use telnet client to connect to such server resposing with tview terminal ui ?

tview.NewApplication().SetRoot(box, true).Run() will output the tview ui on the server directly

Originally created by @hick on GitHub (Jul 22, 2020). Original GitHub issue: https://github.com/rivo/tview/issues/478 I mean to develop a telnet server using tview, and use telnet client to connect to such server resposing with tview terminal ui ? `tview.NewApplication().SetRoot(box, true).Run()` will output the tview ui on the server directly
kerem closed this issue 2026-03-04 01:04:13 +03:00
Author
Owner

@tslocum commented on GitHub (Aug 18, 2020):

I created sshtargate to accomplish this for SSH connections by creating a pseudo-terminal and then copying between the input/output of the pty and the SSH connection.

https://gitlab.com/tslocum/sshtargate/-/blob/master/portal/portal.go

<!-- gh-comment-id:675380838 --> @tslocum commented on GitHub (Aug 18, 2020): I created [sshtargate](https://gitlab.com/tslocum/sshtargate) to accomplish this for SSH connections by creating a pseudo-terminal and then copying between the input/output of the pty and the SSH connection. https://gitlab.com/tslocum/sshtargate/-/blob/master/portal/portal.go
Author
Owner

@rivo commented on GitHub (Sep 15, 2020):

I'll close this. @hick, please get in touch with @tslocum. He managed to do this and can answer your questions.

<!-- gh-comment-id:692669445 --> @rivo commented on GitHub (Sep 15, 2020): I'll close this. @hick, please get in touch with @tslocum. He managed to do this and can answer your questions.
Author
Owner

@iamtakingiteasy commented on GitHub (Aug 22, 2021):

Linked sources does not seem to use tview, nor tcell at all.

Allocating OS pty should not be required for this task, just to wrap ssh channel ReadWriteCloser with tcell.Tty methods to expose window dimensions, window dimensions change callback and noop implementation for other methods, see https://github.com/gdamore/tcell/issues/148

Sadly tcell's NewTerminfoScreenFromTty seem to be hard-wired to load terminfo details from local environment and there is no means in current API to override it.

https://github.com/gdamore/tcell/pull/479 hopefully should provide such means in form of NewTerminfoScreenFromTtyTerminfo.

<!-- gh-comment-id:903282242 --> @iamtakingiteasy commented on GitHub (Aug 22, 2021): Linked sources does not seem to use tview, nor tcell at all. Allocating OS pty should not be required for this task, just to wrap ssh channel ReadWriteCloser with `tcell.Tty` methods to expose window dimensions, window dimensions change callback and noop implementation for other methods, see https://github.com/gdamore/tcell/issues/148 Sadly tcell's `NewTerminfoScreenFromTty` seem to be hard-wired to load terminfo details from local environment and there is no means in current API to override it. https://github.com/gdamore/tcell/pull/479 hopefully should provide such means in form of `NewTerminfoScreenFromTtyTerminfo`.
Author
Owner

@progrium commented on GitHub (Aug 13, 2022):

The previously mentioned function was merged, so I decided to try it out with an integration example using gliderlabs/ssh and it works!

https://github.com/progrium/tview-ssh

<!-- gh-comment-id:1214242368 --> @progrium commented on GitHub (Aug 13, 2022): The previously mentioned function was merged, so I decided to try it out with an integration example using [gliderlabs/ssh](https://github.com/gliderlabs/ssh) and it works! https://github.com/progrium/tview-ssh
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#347
No description provided.