Solved How to set title of gnome-terminal under FreeBSD 10.1 with CSH?

How to set title of gnome-terminal under FreeBSD 10.1 with csh(1)? Gnome-terminal's title is "terminal"

How to change it?

I want PWD on it, how can I do?

I use csh(1)

Anyone help me, please!
 
Add this to your ~/.cshrc (just under "# An interactive shell"):
Code:
    switch($TERM)
        case "rxvt":
        case "screen*":
        case "xterm*":
          set TITLE = "%{\033]0;%n@%m:%~\007%}"
          breaksw
        default:
           set TITLE = ""
           breaksw
    endsw

    set prompt = "${TITLE}%n@%m:%~%# "
   unset TITLE
 
I'm not sure how to do that. Have a look at the csh(1) man page, specifically the part about the prompt variables you can use. There are a lot of variables you can use.

If you run something like sysutils/tmux on top of an Xterm or Gnome-Terminal it'll do that automatically. You'll also have the benefit of being able to resume the session after you lost connection.
 
Back
Top