Title of MATE Terminal window does not change back after closing ssh session

Bug #887693 reported by Sander-oele
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
mate-terminal (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I recently switched from Ubuntu to Linux Mint 11 on my desktop.

In Ubuntu, closing an SSH session would change the window title of gnome-terminal back to the "user@host" value of the local machine.

In Mint, this doesn't happen by default. This means that if i connect to some remote Ubuntu server and disconnect, the title of the window stays on "remote-user@remote-server".

Please change this! :)

Putting this line in ~/.bashrc seems to solve it:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Tags: mint-mate
Revision history for this message
Sander-oele (sander-oele) wrote :

Correction: the code that fixes the problem (taken from an ubuntu .bashrc) is:

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
    ;;
*)
    ;;
esac

Revision history for this message
Sampo Niskanen (sampo-niskanen) wrote :

I can confirm this bug in Linux Mint 14 and its fix. The code should probably be added to /etc/bash.bashrc.

Revision history for this message
Mattis Stordalen Flister (mattis-stordalen-flister) wrote :

Can confirm this issue in Linux Mint 15 Olivia.

The above fix is in /etc/bash.bashrc, but it is commented out. When I comment it back in, the title is updated accordingly.

summary: - title of gnome-terminal window does not change back after closing ssh
+ Title of MATE Terminal window does not change back after closing ssh
session
Revision history for this message
Felipe Rodrigues (fbidu) wrote :

I can confirm that Linux Mint 17.1 is also affected by this bug and that sander-ole's code fixes the issue.

Revision history for this message
mc^2 (mkoren) wrote :

One quick correction: the commented line in /etc/bash.bashrc has
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD} -- i.e. doesn't convert the home dir to tilde (~).
Sander-oele's made an improvement on that but the fix only works when you quote the tilde as in:
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/"~"}
(otherwise bash reexpands it again, at least on my Linux Mint machine)

Vlad Orlov (monsta)
Changed in linuxmint:
status: New → Confirmed
Vlad Orlov (monsta)
affects: linuxmint → mate-terminal (Ubuntu)
Norbert (nrbrtx)
Changed in mate-terminal (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Sander-oele (sander-oele) wrote :

I'm curious what suddenly became 'incomplete' about this bug after 10 years?

Revision history for this message
Norbert (nrbrtx) wrote :

@Sander-oele (sander-oele)

Please reproduce this bug on freshest Ubuntu MATE version, then it will be reopened.

Revision history for this message
Norbert (nrbrtx) wrote :

Can you reproduce this bug with newer version of Ubuntu MATE?

Norbert (nrbrtx)
tags: added: mint-mate
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mate-terminal (Ubuntu) because there has been no activity for 60 days.]

Changed in mate-terminal (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.