Jostein Berntsen wrote: > > This blog post discusses how to achieve that: > > http://platypope.org/blog/2007/3/10/fun-with-screen > > - Jostein >
Almost have it working... The only thing i'm noticing is that when I (Ctrl+a c) to make a new screen, it seems to be parsing the hostname of the box screen is running on, rather than parsing the hostname of the server I ssh to shortly after making the screen. Does that make sense? In other words, all of the screen title names are the name of the local hostname. I want to be able to ssh to another server and have it change my screen title to the host I've connected to. Any input? p.s. here's the relevant parts of my screenrc, and my PS1 in .bashrc export PS1='\[\033[s\033k\033\13...@\h\n\[\033[u\]\u \w \$ ' # TERMINAL SETTINGS # ------------------------------------------------------------------------------ # The vt100 description does not mention "dl". *sigh* termcapinfo vt100 dl=5\E[M # turn sending of screen messages to hardstatus off hardstatus off # Set the hardstatus prop on gui terms to set the titlebar/icon title termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007 # use this for the hard status string #hardstatus string "%h%? users: %u%?" shelltitle '@|' hardstatus alwayslastline hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]' # set these terminals up to be 'optimal' instead of vt100 termcapinfo xterm*|linux*|rxvt*|Eterm* OP # Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E> # (This fixes the "Aborted because of window size change" konsole symptoms found # in bug #134198) termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' # To get screen to add lines to xterm's scrollback buffer, uncomment the # following termcapinfo line which tells xterm to use the normal screen buffer # (which has scrollback), not the alternate screen buffer. # #termcapinfo xterm|xterms|xs|rxvt ti@:te@ # ------------------------------------------------------------------------------ # STARTUP SCREENS # ------------------------------------------------------------------------------ # Example of automatically running some programs in windows on screen startup. # # The following will open top in the first window, an ssh session to monkey # in the next window, and then open mutt and tail in windows 8 and 9 # respectively. # # caption always "%?%F%{-b bc}%:%{-b bb}%?%C|%D|%M %d|%H%?%F%{+u wb}%? %L=%-Lw%45>%{+b by}%n%f*%t%{-}%+Lw%-0<" # caption always "%?%F%{-b kr}%:%{-b rr}%?%C|%D|%M %d|%H%?%F%{+u wk}%? %L=%-Lw%45>%{+b wr}%n%f*%t%{-}%+Lw%-0<" -- View this message in context: http://old.nabble.com/How-to-set-screenname-automatically-to-hostname.-tp27026674p27289702.html Sent from the Gnu - Screen mailing list archive at Nabble.com. _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users