You are not logged in.
I am trying to figure out how to dynamically change the terminal title (urxvt in this case) while in screen. The following snippet from my ~/.bashrc does this as long as screen is not running:
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME}: ${PWD}07"'
;;
esac
This sets the terminal title to "user@hostname: PWD" and is updated when I change directories. I would like to have the same thing occur while running screen.
According to the screen docs it can be done, but I have not figured out how, nor have I found working examples on the net. If anyone has any pointers or a working example your help would be much appreciated.
EDIT: I've gotten this working by adding the screen) section to ~/.bashrc:
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME}: ${PWD}07"'
;;
screen)
PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME}: ${PWD}07"'
;;
esac
And adding the following to ~/.screenrc
hardstatus off
Now obviously this prevents me from having a hardstatus line at the bottom of my screen session. However, modifing my hardstatus line into a caption line works fine. So, I'll mark this [solved] and hopefully someone can use this info in the future.
Thanks.
Offline