Windows 中的 Linux 控制台控制,如 Putty

发布于 2024-11-15 09:17:45 字数 84 浏览 2 评论 0原文

前几天我在使用 Putty 并意识到它有自己的控制台控件(Linux 控制台而不是 Windows 命令提示符),我想知道他们是如何做到的?有什么建议吗?

I was using Putty the other day and realized 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不回头走下去 2024-11-22 09:17:45

tl;dr:PuTTY 几乎不执行任何“控制台”工作;它只是显示服务器上发生的情况,就像纯文本远程桌面一样。


PuTTY 有许多不同的组件;最重要的是通过 SSH、Telnet 和串行端口等方式实现通信的后端,以及可能是 通过解释一些终端的历史,

最容易理解终端仿真器所做的工作;早在我出生之前,在老电影时代,终端是非常有限的设备——键盘和打印机,能够通过简单的电线发送击键,并在发回简单命令时打印字符(在纸上!)。所有实际的思考都是由电线另一端的房间大小的主机完成的。 以改善全球热核战争的用户体验:terminal in wargames

Terminals 后来添加了简单的视频输出, 视频终端大致相同,只是添加了一些额外的命令来制作漂亮的颜色等等。

最终,在我出生的时候,恐龙灭绝了,我们进入了计算机的现代时代,对于像我们这样的普通人来说,拥有一台自己的整台计算机变得可行,但终端机制仍然存在,而且非常有用和可靠,不能扔掉;所以终端模拟器被发明了;同样的简单命令通过线路发送,终端软件会伪造视频终端所显示的相同显示。

如果您想自己编写其中一个,则需要:

  1. 了解控制序列您要模拟的终端类型。
  2. 具有大量控制能力的编程环境;大多数图形工具包的文本控件都无法解决这个问题。
  3. 耐心
  4. 更有耐心。

如果您尝试一下,这些链接可能会有所帮助:

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:terminal in wargames

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:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文