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 775036 - gnome-terminal does not change window and tab title after exiting root account
gnome-terminal does not change window and tab title after exiting root account
Status: RESOLVED INVALID
Product: gnome-terminal
Classification: Core
Component: general
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-24 18:39 UTC by Numan Demirdöğen
Modified: 2016-11-25 18:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Numan Demirdöğen 2016-11-24 18:39:06 UTC
If a user change user to root via sudo su command then exit root account by writing exit, gnome-terminal does not change window title or tab name to default one or profile's preferred title.

Steps to produce bug:
1- Open gnome-terminal -> title of the terminal shows user's preferred title like Terminal or user_name@host_name:some_dir_path
2- sudo su -> title or tab name of the terminal changes to root@host_name:some_dir_path
3- Exit root account by exit command
4- Title of the terminal remains root@host_name:some_dir_path

What I expect to happen:
1- Open gnome-terminal -> title of the terminal shows user's preferred title like Terminal or user_name@host_name:some_dir_path
2- sudo su -> title of the terminal changes to root@host_name:some_dir_path
3- Exit root account by exit command
4- Title of the terminal should change to user's preferred title like Terminal or user_name@host_name:some_dir_path

In order to determine whether the bug is triggered by Ubuntu modules, I tested gnome-terminal with LIBOVERLAY_SCROLLBAR=0 UBUNTU_MENUPROXY=0 NO_UNITY_GTK_MODULE=1 environment variables and bug still remains.

Here is the link to the Launchpad bug: https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1388478

LC_ALL=C gnome-terminal --version
GNOME Terminal 3.20.2

LC_ALL=C lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.10
Release:	16.10
Codename:	yakkety
Comment 1 Egmont Koblinger 2016-11-24 21:48:47 UTC
Could you please try the same steps with "xterm" rather than "gnome-terminal"?

From the terminal emulator's point of view, there's no such concept of "user's preferred title", and there's no way to revert to a "default" title. It can only "set" a new title.

The terminal emulator obeys the instructions it receives from the shell or any other app running inside. If such an instruction tells it to change the title, it does so. Moreover, it has no way of knowing whether the title change request comes from the user's shell or from the root account.

So there are two possibilities: Either at one point gnome-terminal stops acting on such title change requests (I think it's extremely unlikely); or your shell does something wrong, in which case it's not a gnome-terminal bug.

(By the way, I've tested on Ubuntu 16.10 with a brand new account and it works just fine, as you'd expect it. So it's probably something broken with your personal settings.)
Comment 2 Numan Demirdöğen 2016-11-25 16:53:27 UTC
@Egmont Koblinger, first of all thank you for helping me and such an informative answer.

I tried same steps with xterm and the behavior is same as gnome-terminal. 

After reading your answer, I created a new user, logged in as new user and tried the same steps. The result was what I would expected, which means this particular behavior was caused by something that I changed.

In order to find what could be the reason for this behavior, I commented out every variable in ~/.bashrc and ~/.profile one by one but it did not work. 

Anyway, I will try to find the culprit.
Comment 3 Egmont Koblinger 2016-11-25 18:09:23 UTC
Compare them with those of the brand new user (or /etc/skel).