gpt4 book ai didi

xterm - 如何使用带有 -S 选项的 xterm?

转载 作者:行者123 更新时间:2023-12-04 17:47:16 26 4
gpt4 key购买 nike

我正在尝试 automate xterm它主要依赖于启动xterm时的-S选项。

来自手册页

-Sccn

This option allows xterm to be used as an input and output channel for an existing program and is sometimes used in spe‐ cialized applications. The option value specifies the last few letters of the name of a pseudo-terminal to use in slave mode, plus the number of the inherited file descriptor. If the option contains a “/” character, that delimits the characters used for the pseudo-terminal name from the file descriptor. Otherwise, exactly two characters are used from the option for the pseudo-terminal name, the remainder is the file descriptor. Examples (the first two are equivalent since the descriptor follows the last “/”):

    -S/dev/pts/123/45
-S123/45
-Sab34

Note that xterm does not close any file descriptor which it did not open for its own use. It is possible (though probably not portable) to have an application which passes an open file descriptor down to xterm past the initialization or the -S option to a process running in the xterm.

希望这个选项是利用xterm的输入输出 channel ,可以自定义。

如何使用这个选项?

最佳答案

“如何使用”的范围很广。有几个使用示例:Tcl/Tk 脚本 multixterm前一段时间写的, ditto 程序是 ncurses-examples 的一部分.

这里提到后者:

该选项用得不多;几年前出现了一些问题,已在 patch #314 中修复(较新的版本应该如图所示工作)。

关于xterm - 如何使用带有 -S 选项的 xterm?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47882198/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com