Gnu-Screen: Run script that sends commands to the screen session it is being run in

前端 未结 5 2116
半阙折子戏
半阙折子戏 2020-12-31 17:39

Is it possible to write a script to change the name and turn on monitoring for the current tab assuming that it is being run in screen?

Thanks.

5条回答
  •  感情败类
    2020-12-31 18:06

    Are you looking to display information or interact with the screen session itself? You can send messages back with this: (http://www.slac.stanford.edu/comp/unix/package/epics/extensions/iocConsole/screen.1.html#lbAI)

    THE MESSAGE LINE Screen displays informational messages and other diagnostics in a message line. While this line is distributed to appear at the bottom of the screen, it can be defined to appear at the top of the screen during compilation. If your terminal has a status line defined in its termcap, screen will use this for displaying its messages, otherwise a line of the current screen will be temporarily overwritten and output will be momentarily interrupted. The message line is automatically removed after a few seconds delay, but it can also be removed early (on terminals without a status line) by beginning to type.

    The message line facility can be used by an application running in the current window by means of the ANSI Privacy message control sequence. For instance, from within the shell, try something like:

    echo '^Hello world from window '$WINDOW'\\' 
    

    where '' is an escape, '^' is a literal up-arrow, and '\' turns into a single backslash.

提交回复
热议问题