通过代码改变xshell、putty等终端的长度宽度
来源:互联网 发布:js中的事件方法有哪些 编辑:程序博客网 时间:2024/06/05 14:13
前提是代码中通过ssh、telnet等方式连接服务器,然后获取服务端到终端的输出流OutputStream
然后,通过输出流向终端输出更改屏幕大小的命令:("\033[8;" + height + ";" + width + "t").getBytes()
依据的原理如下:
CSI Ps ; Ps ; Ps t Window manipulation (from dtterm, as well as extensions). These controls may be disabled using the allowWindowOps resource. Valid values for the first (and any additional parameters) are: Ps = 1 -> De-iconify window. Ps = 2 -> Iconify window. Ps = 3 ; x ; y -> Move window to [x, y]. Ps = 4 ; height ; width -> Resize the xterm window to given height and width in pixels. Omitted parameters reuse the current height or width. Zero parameters use the dis- play's height or width. Ps = 5 -> Raise the xterm window to the front of the stack- ing order. Ps = 6 -> Lower the xterm window to the bottom of the stacking order. Ps = 7 -> Refresh the xterm window. Ps = 8 ; height ; width -> Resize the text area to given height and width in characters. Omitted parameters reuse the current height or width. Zero parameters use the display's height or width. Ps = 9 ; 0 -> Restore maximized window. Ps = 9 ; 1 -> Maximize window (i.e., resize to screen size). Ps = 9 ; 2 -> Maximize window vertically. Ps = 9 ; 3 -> Maximize window horizontally. Ps = 1 0 ; 0 -> Undo full-screen mode. Ps = 1 0 ; 1 -> Change to full-screen. Ps = 1 0 ; 2 -> Toggle full-screen. Ps = 1 1 -> Report xterm window state. If the xterm window is open (non-iconified), it returns CSI 1 t . If the xterm window is iconified, it returns CSI 2 t . Ps = 1 3 -> Report xterm window position. Result is CSI 3 ; x ; y t Ps = 1 4 -> Report xterm window in pixels. Result is CSI 4 ; height ; width t Ps = 1 8 -> Report the size of the text area in characters. Result is CSI 8 ; height ; width t Ps = 1 9 -> Report the size of the screen in characters. Result is CSI 9 ; height ; width t Ps = 2 0 -> Report xterm window's icon label. Result is OSC L label ST Ps = 2 1 -> Report xterm window's title. Result is OSC l label ST Ps = 2 2 ; 0 -> Save xterm icon and window title on stack. Ps = 2 2 ; 1 -> Save xterm icon title on stack. Ps = 2 2 ; 2 -> Save xterm window title on stack. Ps = 2 3 ; 0 -> Restore xterm icon and window title from stack. Ps = 2 3 ; 1 -> Restore xterm icon title from stack. Ps = 2 3 ; 2 -> Restore xterm window title from stack. Ps >= 2 4 -> Resize to Ps lines (DECSLPP).
参考 http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
0 0
- 通过代码改变xshell、putty等终端的长度宽度
- 通过putty和xshell登录虚拟机linux
- 动态改变CComboBox的下拉列表的长度和宽度
- 获取元素长度、宽度并改变其值的js
- 通过鼠标的拖动改变DOM的高度和宽度
- 通过代码修改TextView的宽度
- 改变frameset的宽度
- iOS--根据文本内容的长度动态改变label的宽度(有最大值)
- 解决Xshell等Linux终端连接MySQL中文乱码问题
- xshell 与 putty
- putty与xshell
- Xshell通过ssh连接Android终端模拟器Termux
- 怎样解决putty终端乱码的方法
- 怎样解决putty终端乱码的方法
- 解决putty终端乱码的方法
- 在putty等远程命令行终端执行带有GUI图形界面的程序找不到$DISPLAY错误的解决办法,xserver相关
- Putty的ppk文件转成Xshell使用的key文件
- Putty的ppk文件转成Xshell使用的key文件
- 解决yum被占进程运行问题
- iOS- 断点续传实现原理
- 04.2#R基础(系统4)-R的数据可视化
- fastjson 处理json字符串嵌套结构
- 微信 服务器配置 (四)
- 通过代码改变xshell、putty等终端的长度宽度
- [Objective-C]关联(objc_setAssociatedObject、objc_getAssociatedObject、objc_removeAssociatedObjects)
- 1062 Text Reverse
- SVN中tag branch trunk用法详解
- (十九)maven实践-父子模块
- ios 去除字符串首尾空格、换行
- 一个类似淘宝筛选框的右边弹出框(Acitivity实现)
- kendoMaskedTextBox常用录入格式
- AVL树,红黑树,B树,B+树,Trie树应用场景简介