After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740188 - the --title option is nonfunctional
the --title option is nonfunctional
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 748845 748989 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-11-15 19:25 UTC by Matthias Clasen
Modified: 2017-01-17 23:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2014-11-15 19:25:40 UTC
As noticed in https://bugzilla.redhat.com/show_bug.cgi?id=1160184
the --title option doesn't seem to have any effect anymore.

I would suggest to just remove it.
Comment 3 Vishal Verma 2014-12-24 01:03:07 UTC
So..what is the one true way of setting the title?
--help still shows the --title option which clearly doesn't work..
Comment 4 Vishal Verma 2014-12-24 01:26:51 UTC
Going through the git history, I found the answer.

Documenting it here so that $regular_user who Googles for this problem will perhaps find the answer.

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"
}
Comment 5 jan.jeseter@seznam.cz 2015-04-14 14:04:54 UTC
Hello, dear GNOME developers, 
Could you please put back the setting --title (-t)?
I used (for years) this command:
"gnome-terminal --geometry=$GEO -t $SID:$MN -x ssh -l $MN $SID"
How can I use it now? 
Thank you very, very much.
JJ

PS: gnome-terminal is my favorite program.
Comment 6 Kirby 2015-05-08 15:04:36 UTC
I set terminal window titles a lot.  I'd really appreciate a way to do this that doesn't feel like a fragile workaround.  Can this issue be reopened?  Is there another issue I should be commenting on instead?


BTW, If the `title ()` shell function above doesn't work for you, try this:

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

Source:  http://unix.stackexchange.com/questions/177572
Comment 7 Christian Persch 2015-05-11 07:59:25 UTC
*** Bug 748989 has been marked as a duplicate of this bug. ***
Comment 8 tadbilby 2015-05-30 03:10:59 UTC
I second jan.jeseter's comment.  Please return an easy way to set the tab title, it is extremely useful when connecting to AIX, Solaris, etc. which do not set the tab title.
Comment 9 Christian Persch 2015-05-30 10:34:28 UTC
What could be easier than 
$ printf "\e]2;MY SUPERDUPERFABULOUS TITLE\a"

?
Comment 10 tadbilby 2015-05-30 17:26:14 UTC
I'm using 
$ PROMPT_COMMAND='echo -ne "\033]0;YOUR TITLE GOES HERE\007"' 
I'm also trying roxterm
I would prefer not to use escape sequences to set a terminal tab title.
Comment 11 luozy 2015-06-01 02:03:52 UTC
To comment 9:
(1) <printf "\e]2;MY SUPERDUPERFABULOUS TITLE\a"> is not simple.
  set title with menu is sample
  set title with "-t" is sample

(2) it's about function, not just sample.
  with -t option, it's possible to start terminal with initial title.
  For example:
  To set 10 tab title, by using -t option, it can be done by one command. 
  we can use a "t.sh", then, every time, running ./t.sh.
Comment 12 Christian Persch 2015-06-04 08:04:44 UTC
*** Bug 748845 has been marked as a duplicate of this bug. ***
Comment 13 luozy 2015-06-04 08:19:31 UTC
I added a user-defined title option in a private patch.
Feature:
(1) Using -T option to set a user-defined title, it never changes.
(2) it ignores the close button in the tab with user-defined title.
    you can close it with right click.

Usage:
  -T, --ud-title=UDTITLE          Set the user-defined title, never change!

Example:
gnome-terminal --tab -T "aaa" --tab -T "bbb" --tab -T "ccc"


Refer: https://bugzilla.gnome.org/show_bug.cgi?id=748989
Comment 14 bugreport 2015-06-16 00:22:15 UTC
The removal of --title breaks some automated scripting I use.
I generated a UUID and launched a gnome-terminal with --title $uuid.
Then I could use xdotool search to find window that was create based on the unique title. Then I could launch additional tabs in that window, etc.

It is hard to believe that this was removed. While I do use escape sequences to change the title (always have), this was the only reliable way I found to find the window instance of a launched gnome-terminal. Due to the whole gnome-terminal-server concept I dont think there is a reliable way to do it via 'pid' or make any assumptions about the window stack.
Comment 15 mike newman 2015-10-25 14:49:58 UTC
I would echo the previous comment.

I use scripts to generate terminal windows for various purposes, and it is really convenient to have them pop up with an initial title.  Although luozy's patch above is nice it doesn't allow further changes.  The old --title would allow later changes, so it provided a way to set the intial title automatically without changing the funcitonality of anything.

I understand that for many uses escape sequences are a useful, but why is it important to *remove* the code that allows --title on the command line?  I can't see any benefit to this other than saving a few bytes of code size.

Is it really not possible to leave the old code intact?
Comment 16 Brian J. Murrell 2015-12-09 13:18:59 UTC
I have to echo the last few comments.  What exactly was the reason for removing "--title"?  What problems was having it available as a command line option causing?
Comment 17 Lijeesh 2016-01-10 05:58:01 UTC
Being a sever admin, I keep 10-20 terminal tabs open during work. I would give a short title (www1, db, mongo etc) to each tab to easily and quickly identify the tab. Visually it was a great help. When this title feature was removed, my life on gnome-terminal became very hard and finally switched to terminator which supports tab title. If title feature would ever come back, I will switch back to gnome-terminal.
Comment 18 WillC 2016-02-21 02:22:16 UTC
I would like to echo comments 6, 8, 14, 15, 16. 
I've spent 15 years doing commercial development and minor admin in Windows, and the last year struggling with Linux, which is strangely obtuse and badly documented when it could be so simple and powerful for new users. 

Why on earth have you taken away a simple command like title - which still exists and is incredibly useful in Windows, by the way - and then advise _your_ _users_ to learn some obtuse escape character code?
Comment 20 André Klapper 2016-03-10 12:20:24 UTC
[General comment: Arguments and criticizing ideas / concepts is welcome. Criticizing people is not. Thanks for your understanding and for keeping Bugzilla a respectful place.]
Comment 21 Karl Palsson 2016-04-07 17:01:38 UTC
This bug is marked "resolved fixed" but clearly isn't?  If it's not fixed, can we at least keep the bookkeeping straight and mark it as "resolved wontfix" ?
Comment 22 Debarshi Ray 2016-04-07 18:25:09 UTC
commit 156b85533f42d8c7e6cf6258ce3e7fe4ec8f1754
Author: Christian Persch <chpe@gnome.org>
Date:   Tue Feb 16 18:59:09 2016 +0100

    client: legacy: Reimplement deprecated --title option
    
    This reverts commit 0033eca2909ddccf3358c1f089bce05d3473b123.
    
    Reimplement the deprecated --title client option. It seems it is absolutely
    required by all those super l33t unix admins that are above using a lowly
    command like printf(1) or the even simpler xtermcontrol(1).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740188
Comment 24 Christian Persch 2016-04-14 14:09:15 UTC
@comment 23: Do refrain from adding useless comments to bugzilla. This bug is closed.
Comment 25 Debarshi Ray 2016-05-09 13:28:13 UTC
(In reply to Debarshi Ray from comment #22)
> commit 156b85533f42d8c7e6cf6258ce3e7fe4ec8f1754

https://git.gnome.org/browse/gnome-terminal/commit/?id=156b85533f42d8c7e6cf6258ce3e7fe4ec8f1754

(I was expecting bugzilla to turn it into a hyperlink. I don't know why it didn't.)
Comment 26 André Klapper 2016-05-09 18:22:17 UTC
[offtopic]

(In reply to Debarshi Ray from comment #25)
> (I was expecting bugzilla to turn it into a hyperlink.

Hmm. The regex is in https://git.gnome.org/browse/bugzilla-gnome-org-customizations/tree/extensions/GNOME/Extension.pm#n300 - feel free to file a separate bug report about it.
Comment 27 Vladimir Dobriakov 2016-06-11 12:26:45 UTC
It took me one hour to find a workaround: tried `terminator`, tried to set up an older gnome-terminal version in Ubuntu 16.04. But the best option is to use `mate-terminal` - this fork just keeps all the goodness of previous gnome-terminal versions.

* you can open multiple tabs from the command line giving them different titles
        mate-terminal --tab -t "aaa" --tab -t "bbb" --tab -t "ccc"

* you can set up a keyboard shortcut (I use Ctrl+Shift-i) to set t**i**tle
Comment 30 Olav Vitters 2016-09-01 18:09:41 UTC
Anyone asking for people to be fired has been banned. In case it isn't clear: such discussions do NOT belong here!
Comment 31 Michael Catanzaro 2016-09-01 18:41:45 UTC
(In reply to Vladimir Dobriakov from comment #27)
> It took me one hour to find a workaround: tried `terminator`, tried to set
> up an older gnome-terminal version in Ubuntu 16.04. But the best option is
> to use `mate-terminal` - this fork just keeps all the goodness of previous
> gnome-terminal versions.

Yeah sorry, the --title option is restored in GNOME 3.20 (March 2016 release), which we released half a year ago, but Ubuntu 16.04 shipped with GNOME 3.18 (September 2015 release), which had removed this option.
Comment 32 hawat.thufir 2017-01-17 21:35:54 UTC
Will this fix enable renaming each tab by clicking on the tab?
Comment 33 WillC 2017-01-17 23:28:34 UTC
(In reply to Michael Catanzaro from comment #31)
> (In reply to Vladimir Dobriakov from comment #27)
> > It took me one hour to find a workaround: tried `terminator`, tried to set
> > up an older gnome-terminal version in Ubuntu 16.04. But the best option is
> > to use `mate-terminal` - this fork just keeps all the goodness of previous
> > gnome-terminal versions.
> 
> Yeah sorry, the --title option is restored in GNOME 3.20 (March 2016
> release), which we released half a year ago, but Ubuntu 16.04 shipped with
> GNOME 3.18 (September 2015 release), which had removed this option.

Thanks Michael