English
Ask Your Question
4

How to rename terminal tab in Fedora 21

asked 2015-01-05 18:00:58 +0000

penner gravatar image

updated 2015-01-07 19:54:40 +0000

Used to be able to right click on the tab. This no longer works.

EDIT: It's too bad gnome-terminal no longer supports setting the title but I understand their desire to keep the codebase small. I have switched to ROXTerm and it has this feature and more. You can make it look very close to gnome-terminal. Very happy so far.

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
1

answered 2015-02-22 02:56:33 +0000

westonganger gravatar image

Create a function in ~/.bashrc

set-title(){
  ORIG=$PS1
  TITLE="\e]2;$@\a"
  PS1=${ORIG}${TITLE}
}

Then you use your function to set the tab title. It allows spaces in it too.

set-title my new tab title
edit flag offensive delete link more

Comments

This actually works. Thank you. I've marked this as the best answer as it does answer my original question.

penner ( 2015-02-23 18:02:44 +0000 )edit
2

answered 2015-01-08 14:13:57 +0000

maxhaase gravatar image

updated 2015-01-10 07:53:37 +0000

Install ROXTerm. It's actually more feature-rich than GNOME Terminal.

sudo yum install roxterm

A comment about GNOME Terminal: I agree, that was indeed one of the dumbest things GNOME Terminal could have done, when one has a lot of servers to keep track of, removing the tab-labeling was a real stupid decision.

edit flag offensive delete link more
1

answered 2015-01-06 08:21:02 +0000

Woland gravatar image

This functionality was removed from the latest version of gnome-terminal.

From their Bugzilla:

The only way to set the title is through an xterm escape sequence.

You can add this function to your bashrc to work around this:

title () { echo -en "\033]0;$@\007" }

edit flag offensive delete link more

Comments

I've tried and it doesn't work (F21)

q2dg ( 2015-01-06 20:52:30 +0000 )edit

From the downvotes. I know this answer does not make people happy, but this is the actual answer to this question: Gnome terminal has just had a lot of its functions removed for various reasons. "Go install X" is not really an answer to THIS question. OK, go install Emacs and use Eshell---it is more extensible and feature rich than you can imagine, but it does not have tabs as such, but named buffers do the same thing better, IMHO.

Woland ( 2015-01-26 00:47:08 +0000 )edit

My downvote is due to your solution doesn't work for me (Gnome 3.14.2, Fedora 21)

q2dg ( 2015-01-26 01:38:26 +0000 )edit

That function does not work with bash (4.3) and Gnome 3.14. (Syntax error.) Changing it to multi-line still doesn't work. @maxhasse's answer does work.

Nathan Kidd ( 2015-05-21 14:23:09 +0000 )edit
0

answered 2016-03-07 19:25:20 +0000

Alenka gravatar image

PROMPT_COMMAND='echo -ne "\033]0;YOUR TITLE\007"'

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

Follow
1 follower

Stats

Asked: 2015-01-05 18:00:58 +0000

Seen: 3,177 times

Last updated: Feb 22 '15