4

linux下screen如何显示当前处在哪个screen(如何显示当前screenid)

 2 years ago
source link: https://blog.csdn.net/weixin_34220834/article/details/92107468
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

linux下screen如何显示当前处在哪个screen(如何显示当前screenid)

weixin_34220834 于 2014-05-12 19:05:00 发布 2036

http://blog.csdn.net/asx20042005/article/details/7035115

发现其中有一条名为:显示screen的状态栏,大喜,将其加到/etc /screenrc中,启动screen,发现screen启动后在屏幕最下方一行出现了一个状态栏,可以指示当前处在哪个screen,虽然修改 putty窗口标题的办法暂时不知道,但这样也完全可以满足需要。

把方法转过来记录一下:

/etc/screenrc(不同OS或不同screen版本路径可能不同,很多文章里提到其路径是~/.screenrc,但我在这里却不是这个路径)中加入如下代码,启动screen(如果已经启动就全部exit掉重新启动screen)即可生效:

# 允许设置窗口标题

caption always "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%H %Y/%m/%d "

转载于:https://my.oschina.net/u/1431835/blog/263722


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK