Domanda

I'm in the initial stages of designing an app that will connect to a remote server via ssh using the libssh2 library. One of the features I would like to have is the ability to be able to interact with a remote ncurses application. I understand that when connecting with libssh2 and executing a command, I will be returned a string that represents the output of the command on the remote system. But what if that command launches an ncurses (graphical) application. What output would I get back?

È stato utile?

Soluzione

So long as you're requesting a pty on the other end, your ncurses programs will be sending you lots of control sequences dictating cursor positions, colors, etc... What you're going to end up doing is writing a terminal emulator in order to interact with ncurses applications, so you might do some searching for vt100 terminal emulation or something of the sort.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top