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 709358 - Terminal title should not be set from vte.sh but from g-t
Terminal title should not be set from vte.sh but from g-t
Status: RESOLVED OBSOLETE
Product: vte
Classification: Core
Component: general
0.34.x
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-03 12:40 UTC by Egmont Koblinger
Modified: 2021-06-10 14:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Egmont Koblinger 2013-10-03 12:40:48 UTC
Currently vte.sh does two totally different things: (i) tells the terminal its cwd via the new osc7 escapes, and (ii) updates the terminal title.

(i) Setting osc7 is a new technical requirement for something that's g-t has been doing for 10+ years, and (currently) g-t is the only terminal for Linux I'm aware of that supports this. There's a clear specification of what needs to be done, and vte.sh does this. It's reasonable to put this in a vte-specific file, until in a couple of a years probably other terminals will also support it and distributions will move this to global bashrc/zshrc.

(ii) On the other hand, setting the terminal title is something that: (a) does not belong to VTE since all graphical terminals support this escape, so the proper place to address this is .bashrc or somehting like this, (b) is highly of personal taste, e.g. I prefer to have something completely different in the terminal's title, and (c) not user-friendly to disable.

Moreover, vte.sh only sets the window title for bash only, not for zsh, I don't know why. (And there's a minor cosmetical issue of mixed usage of \a and \007).

My suggestion is:

- Let's remove setting the terminal title from vte.sh, keep only the osc7 stuff. Let users set their preferred terminal title if they want to.

- As a convenience shortcut, perhaps even add a preference to g-t to show the current working directory in the title (as it is set by osc7 escapes).
Comment 1 Christian Persch 2013-10-03 12:57:17 UTC
The problem is that vte.sh a) needs PROMPT_COMMAND, but b) the title is _also_ set from a PROMPT_COMMAND, and c) the default bashrc (at least on fedora) only sets PROMPT_COMMAND when it's empty, and d) this part runs *after* sourcing vte.sh

So setting the title also from vte.sh's PROMPT_COMMAND was the only way I could get this working. 

Now I did think about how to make this work better, and came up with an idea in https://bugzilla.redhat.com/show_bug.cgi?id=924275#c13 but the maintainer didn't like it, and as to distros other than fedora, they don't seem to be interested at all in fixing this problem.
Comment 2 Egmont Koblinger 2013-10-13 13:40:22 UTC
Tough problem, indeed.

Apparently Ubuntu Saucy will still ship g-t 3.6 because they couldn't figure out how to solve this. It's a shame. Maybe they were confused by the Fedora specific stuff?

Anyway, I'd still prefer if vte.sh shipped some distro-independent generic version, rather than one heavily taylored to Fedora's internals (and is actually working around a bug in Fedora). As long as there's no cross-distro agreement on how this problem needs to be solved, patching it to fit smoothlessly into distros should IMO be the distros' job and not mainstream's (but apparently they are lazy/ignorant/toobusy/whatever)... Maybe ship the current version as vte-fedora.sh (along with a generic vte.sh) for their conveinence?

Bug 704960 is also relevant.
Comment 3 Christian Persch 2013-10-13 17:32:06 UTC
It's not fedora-specific since it works just fine on other distros too. The only real problem is sourceing the vte.sh file for non-login shells. Overwriting the title may be a bit inconvenient, but not a big problem, IMHO. Bug 697475 has that discussion, but it doesn't seem to me that other distros care at all (e.g. debian just added a relnote instead of fixing the problem)

Since fedora is the gnome reference distro, and also the distro *I* use, I think it's understandable that I want to make it work on fedora out-of-the-box, with no action required on the part of the user.
Comment 4 GNOME Infrastructure Team 2021-06-10 14:44:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vte/-/issues/2026.