How to prevent terminal title changing after sshHow to change Terminal Title in ubuntu 16.04Why does gnome-terminal freeze when an SSH session gets disconnected?Set terminal title to taskbar?SSH Lost Terminal ColorsFunction to change title doesn't work when run in scriptgnome-terminal does not allow changing the titleSSH keyfiles not found after changing desktopsset-title function in bash not work after applying powerline

When does a Chain Familiar’s attack occur using the new UA Eldritch Invocation: Chain Master's Fury?

Can I leave my car sitting outside for about 5 years?

Blue. Orange. Green. Magenta. What does this strange picture represent?

Can I ignore an open source license if I checkout a version that was released prior to the license being added

I've increased my productivity by 40% by automating my job. Should I ask for a higher salary, or just enjoy having more time to do things I like?

How to stretch this Venn diagram?

Conversion of mass into energy with 100% efficiency

Why is JavaScript not compiled to bytecode before sending over the network?

Aligning equations with unequal amount of elements

Writing Vec compare in a more compact way

What's the meaning of "411 on the late-night drop box"?

Biggest Irreducible Hello World

How to answer my 5 year old why I can tell her what she has to do and why she can't tell me

Is rotating a pawn so that it faces a different direction and then moves in that direction technically permitted according to the 2018 FIDE Laws?

How does divination manifest for spells such as Scrying?

C - random password generator

How am I ever going to be able to "vet" 120,000+ lines of Composer PHP code not written by me?

Expectation of 500 coin flips after 500 realizations

Why did Bayer lose aspirin and heroin trademarks under the 1919 Treaty of Versailles?

How do I get a stuck gas canister (for hiking/camping) out of a stainless steel mug?

Would a level 18+ Champion Fighter recover HP outside of combat?

Who is the narrator of Star Wars?

As a post-doc applicant, should I address a professor by their first name in email after they addressed me that way?

Is it possible to duplicate an item in Stardew Valley?



How to prevent terminal title changing after ssh


How to change Terminal Title in ubuntu 16.04Why does gnome-terminal freeze when an SSH session gets disconnected?Set terminal title to taskbar?SSH Lost Terminal ColorsFunction to change title doesn't work when run in scriptgnome-terminal does not allow changing the titleSSH keyfiles not found after changing desktopsset-title function in bash not work after applying powerline






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









3


















I use one of the many solutions to set the terminal title:



Function in .bashrc:



function set-title() 
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="[e]2;$*a]"
PS1=$ORIG$TITLE



And it works perfectly! But when I ssh to a remote host, the title is changed to ubuntu@remote.host.name.



Is there any solution to prevent title changing after ssh?










share|improve this question



























  • You probably need to put this in your remote machine's .bashrc as well.@i.bondarenko

    – Pie
    Oct 1 at 4:06






  • 1





    Unfortunately I can't modify the remote machine's .bashrc. Some of them in production environment so any modification on them is restricted. Others are test servers and their uptime very short so I need to modify .bashrc many times per day. But anyway thank you for the suggestion @Pie.

    – i.bondarenko
    Oct 1 at 4:34






  • 1





    I tried to combine "ssh + set_title_command" and wrapp it into alias, but without success.

    – i.bondarenko
    Oct 1 at 4:40











  • Combine how? I'd use alias myssh="ssh servername;set_title"

    – waltinator
    Dec 4 at 18:16











  • @waltinator Thank you for the suggestion. I have tried: alias myssh="ssh ubuntu@host;set-title my_title1" but without success.

    – i.bondarenko
    Dec 5 at 6:54

















3


















I use one of the many solutions to set the terminal title:



Function in .bashrc:



function set-title() 
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="[e]2;$*a]"
PS1=$ORIG$TITLE



And it works perfectly! But when I ssh to a remote host, the title is changed to ubuntu@remote.host.name.



Is there any solution to prevent title changing after ssh?










share|improve this question



























  • You probably need to put this in your remote machine's .bashrc as well.@i.bondarenko

    – Pie
    Oct 1 at 4:06






  • 1





    Unfortunately I can't modify the remote machine's .bashrc. Some of them in production environment so any modification on them is restricted. Others are test servers and their uptime very short so I need to modify .bashrc many times per day. But anyway thank you for the suggestion @Pie.

    – i.bondarenko
    Oct 1 at 4:34






  • 1





    I tried to combine "ssh + set_title_command" and wrapp it into alias, but without success.

    – i.bondarenko
    Oct 1 at 4:40











  • Combine how? I'd use alias myssh="ssh servername;set_title"

    – waltinator
    Dec 4 at 18:16











  • @waltinator Thank you for the suggestion. I have tried: alias myssh="ssh ubuntu@host;set-title my_title1" but without success.

    – i.bondarenko
    Dec 5 at 6:54













3













3









3








I use one of the many solutions to set the terminal title:



Function in .bashrc:



function set-title() 
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="[e]2;$*a]"
PS1=$ORIG$TITLE



And it works perfectly! But when I ssh to a remote host, the title is changed to ubuntu@remote.host.name.



Is there any solution to prevent title changing after ssh?










share|improve this question
















I use one of the many solutions to set the terminal title:



Function in .bashrc:



function set-title() 
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="[e]2;$*a]"
PS1=$ORIG$TITLE



And it works perfectly! But when I ssh to a remote host, the title is changed to ubuntu@remote.host.name.



Is there any solution to prevent title changing after ssh?







command-line 16.04 bash ssh gnome-terminal






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 30 at 8:46









user3140225

2,7104 gold badges12 silver badges24 bronze badges




2,7104 gold badges12 silver badges24 bronze badges










asked Sep 30 at 7:35









i.bondarenkoi.bondarenko

1311 bronze badge




1311 bronze badge















  • You probably need to put this in your remote machine's .bashrc as well.@i.bondarenko

    – Pie
    Oct 1 at 4:06






  • 1





    Unfortunately I can't modify the remote machine's .bashrc. Some of them in production environment so any modification on them is restricted. Others are test servers and their uptime very short so I need to modify .bashrc many times per day. But anyway thank you for the suggestion @Pie.

    – i.bondarenko
    Oct 1 at 4:34






  • 1





    I tried to combine "ssh + set_title_command" and wrapp it into alias, but without success.

    – i.bondarenko
    Oct 1 at 4:40











  • Combine how? I'd use alias myssh="ssh servername;set_title"

    – waltinator
    Dec 4 at 18:16











  • @waltinator Thank you for the suggestion. I have tried: alias myssh="ssh ubuntu@host;set-title my_title1" but without success.

    – i.bondarenko
    Dec 5 at 6:54

















  • You probably need to put this in your remote machine's .bashrc as well.@i.bondarenko

    – Pie
    Oct 1 at 4:06






  • 1





    Unfortunately I can't modify the remote machine's .bashrc. Some of them in production environment so any modification on them is restricted. Others are test servers and their uptime very short so I need to modify .bashrc many times per day. But anyway thank you for the suggestion @Pie.

    – i.bondarenko
    Oct 1 at 4:34






  • 1





    I tried to combine "ssh + set_title_command" and wrapp it into alias, but without success.

    – i.bondarenko
    Oct 1 at 4:40











  • Combine how? I'd use alias myssh="ssh servername;set_title"

    – waltinator
    Dec 4 at 18:16











  • @waltinator Thank you for the suggestion. I have tried: alias myssh="ssh ubuntu@host;set-title my_title1" but without success.

    – i.bondarenko
    Dec 5 at 6:54
















You probably need to put this in your remote machine's .bashrc as well.@i.bondarenko

– Pie
Oct 1 at 4:06





You probably need to put this in your remote machine's .bashrc as well.@i.bondarenko

– Pie
Oct 1 at 4:06




1




1





Unfortunately I can't modify the remote machine's .bashrc. Some of them in production environment so any modification on them is restricted. Others are test servers and their uptime very short so I need to modify .bashrc many times per day. But anyway thank you for the suggestion @Pie.

– i.bondarenko
Oct 1 at 4:34





Unfortunately I can't modify the remote machine's .bashrc. Some of them in production environment so any modification on them is restricted. Others are test servers and their uptime very short so I need to modify .bashrc many times per day. But anyway thank you for the suggestion @Pie.

– i.bondarenko
Oct 1 at 4:34




1




1





I tried to combine "ssh + set_title_command" and wrapp it into alias, but without success.

– i.bondarenko
Oct 1 at 4:40





I tried to combine "ssh + set_title_command" and wrapp it into alias, but without success.

– i.bondarenko
Oct 1 at 4:40













Combine how? I'd use alias myssh="ssh servername;set_title"

– waltinator
Dec 4 at 18:16





Combine how? I'd use alias myssh="ssh servername;set_title"

– waltinator
Dec 4 at 18:16













@waltinator Thank you for the suggestion. I have tried: alias myssh="ssh ubuntu@host;set-title my_title1" but without success.

– i.bondarenko
Dec 5 at 6:54





@waltinator Thank you for the suggestion. I have tried: alias myssh="ssh ubuntu@host;set-title my_title1" but without success.

– i.bondarenko
Dec 5 at 6:54










0






active

oldest

votes













Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177606%2fhow-to-prevent-terminal-title-changing-after-ssh%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown


























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177606%2fhow-to-prevent-terminal-title-changing-after-ssh%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown









Popular posts from this blog

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?