When I use the screen command in red hat it lists what screen I'm looking at in putty screen command in red hat

However when I use the screen command in ubuntu 10.04 it doesn't list what screen I'm looking at in putty. Is there any way I can configure ubuntu 10.04 or putty to list what screen I'm looking at?

link|improve this question

feedback

3 Answers

up vote 3 down vote accepted

This is set by the hardstatus setting in .screenrc. This is taken from /etc/screenrc on a RHEL system:

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

Ubuntu also has a package called screen-profiles (based on byobu) which contains a set of customisations for screen.

link|improve this answer
feedback

Not to discredit the answer above me, the following creates something like a "taskbar" at the bottom of your screen:

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}]'
link|improve this answer
feedback

Another way to do something similar:

Put this into your ~/.screenrc:

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

And something like this into your ~/.bashrc:

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

(related: http://serverfault.com/a/96324/75874)

link|improve this answer
Hmm, i tried this and it didn't work =( – user784637 Dec 28 '11 at 18:44
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.