msx
unread,Aug 22, 2012, 7:50:53 AM8/22/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lanterna...@googlegroups.com
Hello, i just looked around how lanterna works and i like it.
What i want to do is the following: users connects to my server with a telnet client (windows telnet, putty or whatever), i manage connections, and i want to serve them my lanterna GUI.
How is it possible? using the various UnixTerminal, SwingTerminal and CygwinTerminal all opens new graphical windows. I don't want to open any window, the gui should appear to the remote telnet machines.
I managed to do this: i disabled graphics with -Djava.awt.headless=false and passed my client's socket Input and Output streams to TerminalFacade to create a terminal connected to the socket, like this:
Socket clientSocket = serverSocket.accept();
Terminal rawTerminal = TerminalFacade.createTerminal(clientSocket.getInputStream(), clientSocket.getOutputStream(),Charset.forName("UTF8"));
this somehow work but using any telnet client i get a lot of garbage on the screen, and some code that appears written on the screen every second ([[24;80R)
What is the correct way of doing this? Where am i wrong?
Thanks :)