使用单个bash脚本在GNU屏幕上打开多个拆分窗口


9

我想创建一个bash脚本来自动打开一个包含4个运行预定命令的会话的屏幕窗口。我想在顶部的两个框架中打开htop和slurm,在中间的大框架中打开squidview,在底部的大框架中打开一个空白终端。是否可以使用单个bash脚本进行设置?


以下是针对此问题的问答: unix.stackexchange.com/questions/381435/…–
SDsolar

Answers:


7

这会执行您想要的操作:

$ cat my_screenrc
screen top 
split
focus down
screen vmstat 1
split
focus down
screen
focus bottom
$ screen -c my_screenrc

screen 似乎比多个面板更倾向于屏幕翻转,并且该文档相当神秘。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.