开发者

Linux console control in windows like Putty

开发者 https://www.devze.com 2023-03-13 05:57 出处:网络
I was using Putty the other day and r开发者_运维知识库ealized that it has it\'s own console control (a Linux one not the windows command prompt) and I was wondering how they did it? Any suggestions?tl

I was using Putty the other day and r开发者_运维知识库ealized that it has it's own console control (a Linux one not the windows command prompt) and I was wondering how they did it? Any suggestions?


tl;dr: PuTTY does almost no "console" work; it just shows what it happening on the server, like a text-only remote desktop.


PuTTY has a number of different components; the most significant are the backends which implement communications over such things as SSH, Telnet, and serial ports, and the terminal emulator which is probably the bit you are interested in.

The work done by the terminal emulator is most easily understood by explaining a little about the history of terminals; back before I was born, in days of old movies, terminals were seriously limited devices - a keyboard and printer, capable of sending the keystrokes over a simple wire and printing characters (on paper!) when simple commands were sent back. All the actual thinking was done by the room-sized mainframe at the other end of the wire. Terminals later added simple video output to improve the user experience of global thermonuclear war:

Linux console control in windows like Putty

The information going over the wire to the video terminals were much the same, with a few extra commands added to make pretty colours and so on.

Eventually, around the time I was born, the dinosaurs die off and we enter the modern age of computers, and it becomes practical for normal mortals like us to have a whole computer to themselves, but mechanism for terminals was still around and too useful and reliable to throw away; so terminal emulators were invented; the same simple commands are sent up the wire, and terminal software fakes up the same display a video terminal would have shown.

If you wanted to go about writing one of these yourself, you would need:

  1. An understanding of the control sequences of the type of terminal you want to emulate.
  2. A programming environment with a lot of control; the text controls of most graphical toolkits won't cut it.
  3. Patience
  4. More patience.

These links might help if you take the plunge:

  • http://en.wikipedia.org/wiki/Terminal_emulator
  • http://www.columbia.edu/kermit/terminals.html
  • Programming a terminal emulator, what's in it?
  • http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号