如何获得屏幕命令,以指出你在寻找什么屏幕的Ubuntu服务器?

当我用红帽子使用屏幕命令时,它列出了我在腻子中看到的屏幕 屏幕命令在红帽子

但是当我在ubuntu 10.04中使用屏幕命令时,它并没有列出我在putty中看到的屏幕。 有什么办法可以configurationUbuntu 10.04或腻子列出我在看什么屏幕?

这是由.screenrchardstatus设置设置的。 这取自RHEL系统上的/etc/screenrc

 # Red Hat's normal status line hardstatus string "[screen %n%?: %t%?] %h" 

Ubuntu也有一个名为screen-profiles (基于byobu)的包,其中包含一组用于screen的自定义。

不要抹黑上面的答案,下面在屏幕底部创build一个“任务栏”:

 hardstatus alwayslastline hardstatus string '%{= BG}[ %{C}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{y}%?%+Lw%?%?%= %{g}][%{Y}%Y-%m-%d %{W}%c %{g}]' 

另一种做类似的方法:

把这个放到你的〜/ .screenrc中:

 termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' 

像这样的东西到你的〜/ .bashrc中:

 PS1="\[\033]0;\h [screen: ${STY#*.}]\007\]\e[1m\u@\h["${STY#*.}"]:\w \$ \e[0m" 

(相关: https : //serverfault.com/a/96324/75874 )