发现为终端逃生codeS远程终端? (在这种情况下DECDHL) [英] Discovering remote Terminal for Terminal Escape Codes? (DECDHL in this case)

查看:129
本文介绍了发现为终端逃生codeS远程终端? (在这种情况下DECDHL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图确定什么控制台我在运行。(在特殊情况下很难基于到目前为止,我已经做了研究。),我发现,这将是非常有用的最新的功能是双高,双宽的一对夫妇的情景。

I am trying to determine WHAT console I am running in. (Exceptionally hard based on the research I have done so far.) The latest feature that I discovered that would be useful is Double High, Double Wide for a couple of scenarios.

安装程序是一个Kubuntu的15.04机器通过Terminal.app在OS X原生10.10.4(下)和远程访问。

The setup is a Kubuntu 15.04 machine with native (lower) and remote access via Terminal.app on OS X 10.10.4.

根据 vt100.net 苹果做正确的事情。

Based on vt100.net Apple is doing the right thing.

在这里输入的形象描述

#!/bin/bash

# Cool effect with OS X Terminal.app
# Not as much on others (Like Konsole)
function embiggen()
{
    # Yellow (Darker) foreground
    #                 |       Black backround
    #                 |             |
    printf "\x1b[38;5;226m\x1b[48;5;0m"

    #  Double high 'top anchor'
    #            |       line down
    #            |       |     Start of line
    #            |       |     |
    printf "\x1b#3$1\x1b[B\x1b[G"

    # Yellow (Bright) foreground
    #                 |         Red background
    #                 |    (Bright) |
    printf "\x1b[38;5;229m\x1b[48;5;196m"

    #  Double high 'bottom anchor'
    #            |       line down
    #            |       |     Start of line
    #            |       |     |
    printf "\x1b#4$1\x1b[B\x1b[G\n\n"
}

clear
embiggen "Hello, World"

使用的Konsole

With Konsole

在这里输入的形象描述

使用的Konsole渲染的似乎是从底层控制到顶部。即每行绘制底部到顶部基本上最高线获胜。但是,重新绘制低于predictable。

With Konsole the rendering seems to be controlled from bottom to top. i.e. each line is drawn bottom to top basically topmost line wins. However, repaints are less than predictable.

是否有远程可能使用一些扩展功能在一个合理的优雅降级的方式,当终端不支持扩展格式化?

最好的解决方案我还以为是使用自定义的切入点与
的ssh -i ... usr@svr.dom庆典--init文件osx_remote -i

Best 'solution' I have thought of is using a custom entry point with ssh -i ... usr@svr.dom bash --init-file osx_remote -i

推荐答案

简短的回答是不 - 这仅仅使用转义序列是不可能的。

The short answer, is "no" - this is not possible using just escape sequences.


  • 您不能告诉终端是否实际显示双倍大小的字符。使用光标位置报告,您的可以的告诉(除越野车实现),如果终端使用的屏幕上的两个小区重新present一个双宽字符。 xterm的那样,很久以前;其他终端做到这一点。

  • 双击文字大小是VT100功能,因此它们没有列在一个设备或者属性的响应。这将是有限的使用,因为有些终端仿真器开发人员只需剪切/粘贴的反应,使它们满足其检查特定功能的应用程序。

  • You cannot tell whether the terminal actually displays double-sized characters. Using the cursor-position report, you can tell (except for buggy implementations) if the terminal used two cells on the screen to represent a double-width character. xterm did that long ago; other terminals do that.
  • Double-sized characters are a VT100 feature, so they are not listed in a device attributes response either. That would be of limited use, since some terminal emulator developers simply cut/paste responses to make them satisfy applications which check for specific features.

如果你是在本地(而不是通过SSH)上运行,可以想象你可以写一个程序,做了一个X窗口转储和分析的的图片。

If you were running locally (rather than via ssh), conceivably you could write a program which did an X Window dump and analyzed that picture.

这篇关于发现为终端逃生codeS远程终端? (在这种情况下DECDHL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆