How can I launch gnome-terminal with unique titles for multiple tabs?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite
1












I've seen various posts about launching gnome-terminal with multiple tabs and the script below is working for me. That is to say, this script will launch gnome-terminal with various working directories or profiles. . .



#!/bin/sh
gnome-terminal
--tab --working-directory=$HOME/notes
--tab --working-directory=$HOME/puppet
--tab --profile=root-beamish
--tab --profile=odyssey
--tab --profile=root


... but I'd like to set a unique title for each tab.



In the case where a tab has its own profile I can change the title from within gnome-terminal with Edit | Profiles | (NAME) | Edit | Title and Command and then change "Initial Title" to what I want and "When terminal commands set their own titles" from "Replace initial title" to "Keep initial title". However, I'd rather not create a unique profile for every tab. I'd like a generic solution.



I've tried adding --title='MyTitle' but it doesn't seem to help. I'm using GNOME 2.28.2 on CentOS 6.







share|improve this question





















  • An old question, but I've just solved it on Ubuntu and would like to share my solution. I've written a script which sets a title based on the cwd. Since gnome-terminal now supports per-tab working directories, this script can be wired straight into your ~/.bashrc.
    – halfer
    Apr 13 '14 at 11:19














up vote
5
down vote

favorite
1












I've seen various posts about launching gnome-terminal with multiple tabs and the script below is working for me. That is to say, this script will launch gnome-terminal with various working directories or profiles. . .



#!/bin/sh
gnome-terminal
--tab --working-directory=$HOME/notes
--tab --working-directory=$HOME/puppet
--tab --profile=root-beamish
--tab --profile=odyssey
--tab --profile=root


... but I'd like to set a unique title for each tab.



In the case where a tab has its own profile I can change the title from within gnome-terminal with Edit | Profiles | (NAME) | Edit | Title and Command and then change "Initial Title" to what I want and "When terminal commands set their own titles" from "Replace initial title" to "Keep initial title". However, I'd rather not create a unique profile for every tab. I'd like a generic solution.



I've tried adding --title='MyTitle' but it doesn't seem to help. I'm using GNOME 2.28.2 on CentOS 6.







share|improve this question





















  • An old question, but I've just solved it on Ubuntu and would like to share my solution. I've written a script which sets a title based on the cwd. Since gnome-terminal now supports per-tab working directories, this script can be wired straight into your ~/.bashrc.
    – halfer
    Apr 13 '14 at 11:19












up vote
5
down vote

favorite
1









up vote
5
down vote

favorite
1






1





I've seen various posts about launching gnome-terminal with multiple tabs and the script below is working for me. That is to say, this script will launch gnome-terminal with various working directories or profiles. . .



#!/bin/sh
gnome-terminal
--tab --working-directory=$HOME/notes
--tab --working-directory=$HOME/puppet
--tab --profile=root-beamish
--tab --profile=odyssey
--tab --profile=root


... but I'd like to set a unique title for each tab.



In the case where a tab has its own profile I can change the title from within gnome-terminal with Edit | Profiles | (NAME) | Edit | Title and Command and then change "Initial Title" to what I want and "When terminal commands set their own titles" from "Replace initial title" to "Keep initial title". However, I'd rather not create a unique profile for every tab. I'd like a generic solution.



I've tried adding --title='MyTitle' but it doesn't seem to help. I'm using GNOME 2.28.2 on CentOS 6.







share|improve this question













I've seen various posts about launching gnome-terminal with multiple tabs and the script below is working for me. That is to say, this script will launch gnome-terminal with various working directories or profiles. . .



#!/bin/sh
gnome-terminal
--tab --working-directory=$HOME/notes
--tab --working-directory=$HOME/puppet
--tab --profile=root-beamish
--tab --profile=odyssey
--tab --profile=root


... but I'd like to set a unique title for each tab.



In the case where a tab has its own profile I can change the title from within gnome-terminal with Edit | Profiles | (NAME) | Edit | Title and Command and then change "Initial Title" to what I want and "When terminal commands set their own titles" from "Replace initial title" to "Keep initial title". However, I'd rather not create a unique profile for every tab. I'd like a generic solution.



I've tried adding --title='MyTitle' but it doesn't seem to help. I'm using GNOME 2.28.2 on CentOS 6.









share|improve this question












share|improve this question




share|improve this question








edited May 23 '17 at 12:39









Community♦

1




1









asked Nov 16 '11 at 15:25









Philip Durbin

6231712




6231712











  • An old question, but I've just solved it on Ubuntu and would like to share my solution. I've written a script which sets a title based on the cwd. Since gnome-terminal now supports per-tab working directories, this script can be wired straight into your ~/.bashrc.
    – halfer
    Apr 13 '14 at 11:19
















  • An old question, but I've just solved it on Ubuntu and would like to share my solution. I've written a script which sets a title based on the cwd. Since gnome-terminal now supports per-tab working directories, this script can be wired straight into your ~/.bashrc.
    – halfer
    Apr 13 '14 at 11:19















An old question, but I've just solved it on Ubuntu and would like to share my solution. I've written a script which sets a title based on the cwd. Since gnome-terminal now supports per-tab working directories, this script can be wired straight into your ~/.bashrc.
– halfer
Apr 13 '14 at 11:19




An old question, but I've just solved it on Ubuntu and would like to share my solution. I've written a script which sets a title based on the cwd. Since gnome-terminal now supports per-tab working directories, this script can be wired straight into your ~/.bashrc.
– halfer
Apr 13 '14 at 11:19










3 Answers
3






active

oldest

votes

















up vote
5
down vote













Use the -t option. (see gnome-terminal --help-terminal-options)



gnome-terminal 
--tab -t "notes" --working-directory=$HOME/notes
--tab -t "puppet" --working-directory=$HOME/puppet
--tab -t "beamish" --profile=root-beamish
--tab -t "odyssey" --profile=odyssey
--tab -t "root" --profile=root



-------- updated at 2011-11-15 22:00:00 --------



So... that worked for me on Solaris 11 Express, with gnome-terminal 2.30.2.



Since then, I've been able to test it on Ubuntu 11.04 (Natty), which uses 2.32.1, and found exactly the same behavior as you.



In the case of Ubuntu, I was able to track it to the ubuntu .bashrc file. In particular, the section that looks like:



# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="[e]0;$debian_chroot:+($debian_chroot)u@h: wa]$PS1"
;;
*)
;;
esac


In this case, the PS1 variable is being expanded for terminal types matching xterm* and rxvt*.



PS1="[e]0;$debian_chroot:+($debian_chroot)u@h: wa]$PS1"


specifically the part between PS1="[e]0; and a]. Those get turned into the window title.



Once I commented out that whole case statement, the behavior of gnome-terminal with the -t option worked as expected. I'll see if I can find a CentOS 6 box to test this with, too.




-------- updated at 2017-11-1 09:38:00 --------



So it looks like more recent versions of Gnome-Terminal have made away with some useful features, like the simple -t option to set terminal titles.



It is still possible to set terminal titles at runtime, it's just ugly as hell now. You can use printf or echo in the command to effect a title.



For example:



To start a terminal window with 1 tab, titled 'My Fancy Title' using printf:



gnome-terminal --tab -e 'bash -c "printf "e]2;My Fancy Titlea"; bash -i"'


To start a terminal window with 2 tabs, one running top, and one with a title, using echo:



gnome-terminal 
--tab -e 'bash -c "echo -ne "33]0;my tab running top07"; top"'
--tab -e 'bash -c "echo -ne "33]0;My Fancy Title07"; bash -i"'


This does at least offer an option for setting the terminal title at runtime.



See this post for an option to put a simple function in your ~/.bashrc to allow for setting and resetting the title at will.






share|improve this answer



















  • 1




    Thanks but -t is equivalent to --title which doesn't work for me, as I mentioned in my original post.
    – Philip Durbin
    Nov 16 '11 at 18:23










  • do you by any chance have a customized, or complex, PS1 to set up your shell prompt? If so, can you try unsetting your PS1, and re-run your script?
    – Tim Kennedy
    Nov 16 '11 at 18:40










  • Unfortunately, that doesn't help either. What Linux distribution are you using, Tim?
    – Philip Durbin
    Nov 17 '11 at 1:01










  • Actually, I was testing on Solaris 11 Express, which uses gnome-terminal 2.30.2. I've just tried it with ubuntu and found exactly the same behavior you have. I'll update the answer with what I found.
    – Tim Kennedy
    Nov 17 '11 at 2:51










  • "Option "-t" is no longer supported in this version of gnome-terminal" It says this when I specify this option.
    – Calmarius
    Oct 31 '17 at 11:47

















up vote
3
down vote













When I did a




$ gnome-terminal -t "MyTitle"




The new terminal had "MyTitle" as the title for a moment and immediately was replaced by the default title.



I went to




Edit | Profiles | (Default) | Edit | Title and Command




And changed "When terminal command set their own titles:" to "Keep initial title", the above command launched a terminal with "MyTitle" as the title.



Hope this helps.






share|improve this answer





















  • The reason this works is because it disables the title being set in a .bashrc as mentioned in the update to the answer above. The downside is that it stops the title being changed globally for all terminals using the profile.
    – ahcox
    Aug 25 '15 at 12:02

















up vote
0
down vote













This creates two tabs, each opened to a directory "foo" or "bar", with tab titles "foo" and "bar"



gnome-terminal --tab -t foo -e 'sh -c "cd foo; sh"' --tab -t bar -e 'sh -c "cd bar; sh"'






share|improve this answer





















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f24734%2fhow-can-i-launch-gnome-terminal-with-unique-titles-for-multiple-tabs%23new-answer', 'question_page');

    );

    Post as a guest






























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    5
    down vote













    Use the -t option. (see gnome-terminal --help-terminal-options)



    gnome-terminal 
    --tab -t "notes" --working-directory=$HOME/notes
    --tab -t "puppet" --working-directory=$HOME/puppet
    --tab -t "beamish" --profile=root-beamish
    --tab -t "odyssey" --profile=odyssey
    --tab -t "root" --profile=root



    -------- updated at 2011-11-15 22:00:00 --------



    So... that worked for me on Solaris 11 Express, with gnome-terminal 2.30.2.



    Since then, I've been able to test it on Ubuntu 11.04 (Natty), which uses 2.32.1, and found exactly the same behavior as you.



    In the case of Ubuntu, I was able to track it to the ubuntu .bashrc file. In particular, the section that looks like:



    # If this is an xterm set the title to user@host:dir
    case "$TERM" in
    xterm*|rxvt*)
    PS1="[e]0;$debian_chroot:+($debian_chroot)u@h: wa]$PS1"
    ;;
    *)
    ;;
    esac


    In this case, the PS1 variable is being expanded for terminal types matching xterm* and rxvt*.



    PS1="[e]0;$debian_chroot:+($debian_chroot)u@h: wa]$PS1"


    specifically the part between PS1="[e]0; and a]. Those get turned into the window title.



    Once I commented out that whole case statement, the behavior of gnome-terminal with the -t option worked as expected. I'll see if I can find a CentOS 6 box to test this with, too.




    -------- updated at 2017-11-1 09:38:00 --------



    So it looks like more recent versions of Gnome-Terminal have made away with some useful features, like the simple -t option to set terminal titles.



    It is still possible to set terminal titles at runtime, it's just ugly as hell now. You can use printf or echo in the command to effect a title.



    For example:



    To start a terminal window with 1 tab, titled 'My Fancy Title' using printf:



    gnome-terminal --tab -e 'bash -c "printf "e]2;My Fancy Titlea"; bash -i"'


    To start a terminal window with 2 tabs, one running top, and one with a title, using echo:



    gnome-terminal 
    --tab -e 'bash -c "echo -ne "33]0;my tab running top07"; top"'
    --tab -e 'bash -c "echo -ne "33]0;My Fancy Title07"; bash -i"'


    This does at least offer an option for setting the terminal title at runtime.



    See this post for an option to put a simple function in your ~/.bashrc to allow for setting and resetting the title at will.






    share|improve this answer



















    • 1




      Thanks but -t is equivalent to --title which doesn't work for me, as I mentioned in my original post.
      – Philip Durbin
      Nov 16 '11 at 18:23










    • do you by any chance have a customized, or complex, PS1 to set up your shell prompt? If so, can you try unsetting your PS1, and re-run your script?
      – Tim Kennedy
      Nov 16 '11 at 18:40










    • Unfortunately, that doesn't help either. What Linux distribution are you using, Tim?
      – Philip Durbin
      Nov 17 '11 at 1:01










    • Actually, I was testing on Solaris 11 Express, which uses gnome-terminal 2.30.2. I've just tried it with ubuntu and found exactly the same behavior you have. I'll update the answer with what I found.
      – Tim Kennedy
      Nov 17 '11 at 2:51










    • "Option "-t" is no longer supported in this version of gnome-terminal" It says this when I specify this option.
      – Calmarius
      Oct 31 '17 at 11:47














    up vote
    5
    down vote













    Use the -t option. (see gnome-terminal --help-terminal-options)



    gnome-terminal 
    --tab -t "notes" --working-directory=$HOME/notes
    --tab -t "puppet" --working-directory=$HOME/puppet
    --tab -t "beamish" --profile=root-beamish
    --tab -t "odyssey" --profile=odyssey
    --tab -t "root" --profile=root



    -------- updated at 2011-11-15 22:00:00 --------



    So... that worked for me on Solaris 11 Express, with gnome-terminal 2.30.2.



    Since then, I've been able to test it on Ubuntu 11.04 (Natty), which uses 2.32.1, and found exactly the same behavior as you.



    In the case of Ubuntu, I was able to track it to the ubuntu .bashrc file. In particular, the section that looks like:



    # If this is an xterm set the title to user@host:dir
    case "$TERM" in
    xterm*|rxvt*)
    PS1="[e]0;$debian_chroot:+($debian_chroot)u@h: wa]$PS1"
    ;;
    *)
    ;;
    esac


    In this case, the PS1 variable is being expanded for terminal types matching xterm* and rxvt*.



    PS1="[e]0;$debian_chroot:+($debian_chroot)u@h: wa]$PS1"


    specifically the part between PS1="[e]0; and a]. Those get turned into the window title.



    Once I commented out that whole case statement, the behavior of gnome-terminal with the -t option worked as expected. I'll see if I can find a CentOS 6 box to test this with, too.




    -------- updated at 2017-11-1 09:38:00 --------



    So it looks like more recent versions of Gnome-Terminal have made away with some useful features, like the simple -t option to set terminal titles.



    It is still possible to set terminal titles at runtime, it's just ugly as hell now. You can use printf or echo in the command to effect a title.



    For example:



    To start a terminal window with 1 tab, titled 'My Fancy Title' using printf:



    gnome-terminal --tab -e 'bash -c "printf "e]2;My Fancy Titlea"; bash -i"'


    To start a terminal window with 2 tabs, one running top, and one with a title, using echo:



    gnome-terminal 
    --tab -e 'bash -c "echo -ne "33]0;my tab running top07"; top"'
    --tab -e 'bash -c "echo -ne "33]0;My Fancy Title07"; bash -i"'


    This does at least offer an option for setting the terminal title at runtime.



    See this post for an option to put a simple function in your ~/.bashrc to allow for setting and resetting the title at will.






    share|improve this answer



















    • 1




      Thanks but -t is equivalent to --title which doesn't work for me, as I mentioned in my original post.
      – Philip Durbin
      Nov 16 '11 at 18:23










    • do you by any chance have a customized, or complex, PS1 to set up your shell prompt? If so, can you try unsetting your PS1, and re-run your script?
      – Tim Kennedy
      Nov 16 '11 at 18:40










    • Unfortunately, that doesn't help either. What Linux distribution are you using, Tim?
      – Philip Durbin
      Nov 17 '11 at 1:01










    • Actually, I was testing on Solaris 11 Express, which uses gnome-terminal 2.30.2. I've just tried it with ubuntu and found exactly the same behavior you have. I'll update the answer with what I found.
      – Tim Kennedy
      Nov 17 '11 at 2:51










    • "Option "-t" is no longer supported in this version of gnome-terminal" It says this when I specify this option.
      – Calmarius
      Oct 31 '17 at 11:47












    up vote
    5
    down vote










    up vote
    5
    down vote









    Use the -t option. (see gnome-terminal --help-terminal-options)



    gnome-terminal 
    --tab -t "notes" --working-directory=$HOME/notes
    --tab -t "puppet" --working-directory=$HOME/puppet
    --tab -t "beamish" --profile=root-beamish
    --tab -t "odyssey" --profile=odyssey
    --tab -t "root" --profile=root



    -------- updated at 2011-11-15 22:00:00 --------



    So... that worked for me on Solaris 11 Express, with gnome-terminal 2.30.2.



    Since then, I've been able to test it on Ubuntu 11.04 (Natty), which uses 2.32.1, and found exactly the same behavior as you.



    In the case of Ubuntu, I was able to track it to the ubuntu .bashrc file. In particular, the section that looks like:



    # If this is an xterm set the title to user@host:dir
    case "$TERM" in
    xterm*|rxvt*)
    PS1="[e]0;$debian_chroot:+($debian_chroot)u@h: wa]$PS1"
    ;;
    *)
    ;;
    esac


    In this case, the PS1 variable is being expanded for terminal types matching xterm* and rxvt*.



    PS1="[e]0;$debian_chroot:+($debian_chroot)u@h: wa]$PS1"


    specifically the part between PS1="[e]0; and a]. Those get turned into the window title.



    Once I commented out that whole case statement, the behavior of gnome-terminal with the -t option worked as expected. I'll see if I can find a CentOS 6 box to test this with, too.




    -------- updated at 2017-11-1 09:38:00 --------



    So it looks like more recent versions of Gnome-Terminal have made away with some useful features, like the simple -t option to set terminal titles.



    It is still possible to set terminal titles at runtime, it's just ugly as hell now. You can use printf or echo in the command to effect a title.



    For example:



    To start a terminal window with 1 tab, titled 'My Fancy Title' using printf:



    gnome-terminal --tab -e 'bash -c "printf "e]2;My Fancy Titlea"; bash -i"'


    To start a terminal window with 2 tabs, one running top, and one with a title, using echo:



    gnome-terminal 
    --tab -e 'bash -c "echo -ne "33]0;my tab running top07"; top"'
    --tab -e 'bash -c "echo -ne "33]0;My Fancy Title07"; bash -i"'


    This does at least offer an option for setting the terminal title at runtime.



    See this post for an option to put a simple function in your ~/.bashrc to allow for setting and resetting the title at will.






    share|improve this answer















    Use the -t option. (see gnome-terminal --help-terminal-options)



    gnome-terminal 
    --tab -t "notes" --working-directory=$HOME/notes
    --tab -t "puppet" --working-directory=$HOME/puppet
    --tab -t "beamish" --profile=root-beamish
    --tab -t "odyssey" --profile=odyssey
    --tab -t "root" --profile=root



    -------- updated at 2011-11-15 22:00:00 --------



    So... that worked for me on Solaris 11 Express, with gnome-terminal 2.30.2.



    Since then, I've been able to test it on Ubuntu 11.04 (Natty), which uses 2.32.1, and found exactly the same behavior as you.



    In the case of Ubuntu, I was able to track it to the ubuntu .bashrc file. In particular, the section that looks like:



    # If this is an xterm set the title to user@host:dir
    case "$TERM" in
    xterm*|rxvt*)
    PS1="[e]0;$debian_chroot:+($debian_chroot)u@h: wa]$PS1"
    ;;
    *)
    ;;
    esac


    In this case, the PS1 variable is being expanded for terminal types matching xterm* and rxvt*.



    PS1="[e]0;$debian_chroot:+($debian_chroot)u@h: wa]$PS1"


    specifically the part between PS1="[e]0; and a]. Those get turned into the window title.



    Once I commented out that whole case statement, the behavior of gnome-terminal with the -t option worked as expected. I'll see if I can find a CentOS 6 box to test this with, too.




    -------- updated at 2017-11-1 09:38:00 --------



    So it looks like more recent versions of Gnome-Terminal have made away with some useful features, like the simple -t option to set terminal titles.



    It is still possible to set terminal titles at runtime, it's just ugly as hell now. You can use printf or echo in the command to effect a title.



    For example:



    To start a terminal window with 1 tab, titled 'My Fancy Title' using printf:



    gnome-terminal --tab -e 'bash -c "printf "e]2;My Fancy Titlea"; bash -i"'


    To start a terminal window with 2 tabs, one running top, and one with a title, using echo:



    gnome-terminal 
    --tab -e 'bash -c "echo -ne "33]0;my tab running top07"; top"'
    --tab -e 'bash -c "echo -ne "33]0;My Fancy Title07"; bash -i"'


    This does at least offer an option for setting the terminal title at runtime.



    See this post for an option to put a simple function in your ~/.bashrc to allow for setting and resetting the title at will.







    share|improve this answer















    share|improve this answer



    share|improve this answer








    edited Nov 1 '17 at 13:56


























    answered Nov 16 '11 at 17:45









    Tim Kennedy

    13.2k22848




    13.2k22848







    • 1




      Thanks but -t is equivalent to --title which doesn't work for me, as I mentioned in my original post.
      – Philip Durbin
      Nov 16 '11 at 18:23










    • do you by any chance have a customized, or complex, PS1 to set up your shell prompt? If so, can you try unsetting your PS1, and re-run your script?
      – Tim Kennedy
      Nov 16 '11 at 18:40










    • Unfortunately, that doesn't help either. What Linux distribution are you using, Tim?
      – Philip Durbin
      Nov 17 '11 at 1:01










    • Actually, I was testing on Solaris 11 Express, which uses gnome-terminal 2.30.2. I've just tried it with ubuntu and found exactly the same behavior you have. I'll update the answer with what I found.
      – Tim Kennedy
      Nov 17 '11 at 2:51










    • "Option "-t" is no longer supported in this version of gnome-terminal" It says this when I specify this option.
      – Calmarius
      Oct 31 '17 at 11:47












    • 1




      Thanks but -t is equivalent to --title which doesn't work for me, as I mentioned in my original post.
      – Philip Durbin
      Nov 16 '11 at 18:23










    • do you by any chance have a customized, or complex, PS1 to set up your shell prompt? If so, can you try unsetting your PS1, and re-run your script?
      – Tim Kennedy
      Nov 16 '11 at 18:40










    • Unfortunately, that doesn't help either. What Linux distribution are you using, Tim?
      – Philip Durbin
      Nov 17 '11 at 1:01










    • Actually, I was testing on Solaris 11 Express, which uses gnome-terminal 2.30.2. I've just tried it with ubuntu and found exactly the same behavior you have. I'll update the answer with what I found.
      – Tim Kennedy
      Nov 17 '11 at 2:51










    • "Option "-t" is no longer supported in this version of gnome-terminal" It says this when I specify this option.
      – Calmarius
      Oct 31 '17 at 11:47







    1




    1




    Thanks but -t is equivalent to --title which doesn't work for me, as I mentioned in my original post.
    – Philip Durbin
    Nov 16 '11 at 18:23




    Thanks but -t is equivalent to --title which doesn't work for me, as I mentioned in my original post.
    – Philip Durbin
    Nov 16 '11 at 18:23












    do you by any chance have a customized, or complex, PS1 to set up your shell prompt? If so, can you try unsetting your PS1, and re-run your script?
    – Tim Kennedy
    Nov 16 '11 at 18:40




    do you by any chance have a customized, or complex, PS1 to set up your shell prompt? If so, can you try unsetting your PS1, and re-run your script?
    – Tim Kennedy
    Nov 16 '11 at 18:40












    Unfortunately, that doesn't help either. What Linux distribution are you using, Tim?
    – Philip Durbin
    Nov 17 '11 at 1:01




    Unfortunately, that doesn't help either. What Linux distribution are you using, Tim?
    – Philip Durbin
    Nov 17 '11 at 1:01












    Actually, I was testing on Solaris 11 Express, which uses gnome-terminal 2.30.2. I've just tried it with ubuntu and found exactly the same behavior you have. I'll update the answer with what I found.
    – Tim Kennedy
    Nov 17 '11 at 2:51




    Actually, I was testing on Solaris 11 Express, which uses gnome-terminal 2.30.2. I've just tried it with ubuntu and found exactly the same behavior you have. I'll update the answer with what I found.
    – Tim Kennedy
    Nov 17 '11 at 2:51












    "Option "-t" is no longer supported in this version of gnome-terminal" It says this when I specify this option.
    – Calmarius
    Oct 31 '17 at 11:47




    "Option "-t" is no longer supported in this version of gnome-terminal" It says this when I specify this option.
    – Calmarius
    Oct 31 '17 at 11:47












    up vote
    3
    down vote













    When I did a




    $ gnome-terminal -t "MyTitle"




    The new terminal had "MyTitle" as the title for a moment and immediately was replaced by the default title.



    I went to




    Edit | Profiles | (Default) | Edit | Title and Command




    And changed "When terminal command set their own titles:" to "Keep initial title", the above command launched a terminal with "MyTitle" as the title.



    Hope this helps.






    share|improve this answer





















    • The reason this works is because it disables the title being set in a .bashrc as mentioned in the update to the answer above. The downside is that it stops the title being changed globally for all terminals using the profile.
      – ahcox
      Aug 25 '15 at 12:02














    up vote
    3
    down vote













    When I did a




    $ gnome-terminal -t "MyTitle"




    The new terminal had "MyTitle" as the title for a moment and immediately was replaced by the default title.



    I went to




    Edit | Profiles | (Default) | Edit | Title and Command




    And changed "When terminal command set their own titles:" to "Keep initial title", the above command launched a terminal with "MyTitle" as the title.



    Hope this helps.






    share|improve this answer





















    • The reason this works is because it disables the title being set in a .bashrc as mentioned in the update to the answer above. The downside is that it stops the title being changed globally for all terminals using the profile.
      – ahcox
      Aug 25 '15 at 12:02












    up vote
    3
    down vote










    up vote
    3
    down vote









    When I did a




    $ gnome-terminal -t "MyTitle"




    The new terminal had "MyTitle" as the title for a moment and immediately was replaced by the default title.



    I went to




    Edit | Profiles | (Default) | Edit | Title and Command




    And changed "When terminal command set their own titles:" to "Keep initial title", the above command launched a terminal with "MyTitle" as the title.



    Hope this helps.






    share|improve this answer













    When I did a




    $ gnome-terminal -t "MyTitle"




    The new terminal had "MyTitle" as the title for a moment and immediately was replaced by the default title.



    I went to




    Edit | Profiles | (Default) | Edit | Title and Command




    And changed "When terminal command set their own titles:" to "Keep initial title", the above command launched a terminal with "MyTitle" as the title.



    Hope this helps.







    share|improve this answer













    share|improve this answer



    share|improve this answer











    answered Nov 15 '13 at 17:09









    kishore

    311




    311











    • The reason this works is because it disables the title being set in a .bashrc as mentioned in the update to the answer above. The downside is that it stops the title being changed globally for all terminals using the profile.
      – ahcox
      Aug 25 '15 at 12:02
















    • The reason this works is because it disables the title being set in a .bashrc as mentioned in the update to the answer above. The downside is that it stops the title being changed globally for all terminals using the profile.
      – ahcox
      Aug 25 '15 at 12:02















    The reason this works is because it disables the title being set in a .bashrc as mentioned in the update to the answer above. The downside is that it stops the title being changed globally for all terminals using the profile.
    – ahcox
    Aug 25 '15 at 12:02




    The reason this works is because it disables the title being set in a .bashrc as mentioned in the update to the answer above. The downside is that it stops the title being changed globally for all terminals using the profile.
    – ahcox
    Aug 25 '15 at 12:02










    up vote
    0
    down vote













    This creates two tabs, each opened to a directory "foo" or "bar", with tab titles "foo" and "bar"



    gnome-terminal --tab -t foo -e 'sh -c "cd foo; sh"' --tab -t bar -e 'sh -c "cd bar; sh"'






    share|improve this answer

























      up vote
      0
      down vote













      This creates two tabs, each opened to a directory "foo" or "bar", with tab titles "foo" and "bar"



      gnome-terminal --tab -t foo -e 'sh -c "cd foo; sh"' --tab -t bar -e 'sh -c "cd bar; sh"'






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        This creates two tabs, each opened to a directory "foo" or "bar", with tab titles "foo" and "bar"



        gnome-terminal --tab -t foo -e 'sh -c "cd foo; sh"' --tab -t bar -e 'sh -c "cd bar; sh"'






        share|improve this answer













        This creates two tabs, each opened to a directory "foo" or "bar", with tab titles "foo" and "bar"



        gnome-terminal --tab -t foo -e 'sh -c "cd foo; sh"' --tab -t bar -e 'sh -c "cd bar; sh"'







        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Dec 8 '15 at 18:34









        Chris Koknat

        1012




        1012






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f24734%2fhow-can-i-launch-gnome-terminal-with-unique-titles-for-multiple-tabs%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)