最近想要給screen session中的每一個 窗口命名一個標識名字,而不是默認的 $ bash

相關命令: ctrl+z(我的screen配置的+z,默認是+a)+A



最終的效果

http://www.CUOXin.com/phpgcs
先看目前的配置 .screenrc
:~$ screen -S screen-config
:~$ xclip -sel clip <.screenrc
啟動時不顯示歡迎屏幕startup_message off
定義screen的功能鍵為Ctrl-Z。向終端輸入Ctrl-Z時應按 Ctrl-Z z。escape ^Zz
屏幕緩沖區1000行。defscrollback 1000
在最下一行顯示窗口列表和時鐘hardstatus onhardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rY}%n %t%{-}%+w %=%{..G} %{..Y} %Y/%m/%d %c:%s"hardstatus string '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}]%{=b C}[ %m/%d %c:%s ]%{W}'
關閉錯誤提示vbell off
按 Ctrl-Z w 或 Ctrl-Z Ctrl-W 顯示窗口列表bind w windowlist -bbind ^w windowlist -b
進程掛起時自動detachautodetach on
重命名session:~$ screen -S screen-config
[detached from 12356.screen-config]
:~$ screen -r screen-config
相關命令:
ctrl+z(我的screen配置的+z,默認是+a)
:sessionname new-config-screen
ctrl+d (退出)

[detached from 12356.new-screen-config]
refer:http://superuser.com/questions/370510/rename-screen-session
新聞熱點
疑難解答