Wednesday, January 4, 2012

Create a New Terminal with a Title from Shell

gnome-terminal --working-direcotry=(mydirectory) - t "MyTitle"

to make sure the title works, edit /root/.bashrc to comment out the line that sets title of a terminal

case "$TERM" in
xterm*|rxvt*)
    #REMOVED because it makes commands to title() not work  
    #PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" <-- remove
    ;;
*)
    ;;
esac