• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

dr-mdr

Member

Thanks: 1
Messages: 35

#1
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!
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Messages: 26,762

#2
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
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Messages: 26,762

#4
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.
 
Top