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

any hint or possibility to use tview on server? #478

Closed
hick opened this issue Jul 22, 2020 · 4 comments
Closed

any hint or possibility to use tview on server? #478

hick opened this issue Jul 22, 2020 · 4 comments

Comments

@hick
Copy link

hick commented Jul 22, 2020

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

@tslocum
Copy link
Contributor

tslocum commented 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

@rivo
Copy link
Owner

rivo commented Sep 15, 2020

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

@rivo rivo closed this as completed Sep 15, 2020
@iamtakingiteasy
Copy link

iamtakingiteasy commented 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 gdamore/tcell#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.

gdamore/tcell#479 hopefully should provide such means in form of NewTerminfoScreenFromTtyTerminfo.

@progrium
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants