! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
dynamically-set title not working if --title some_title present in parameters
Status:
RESOLVED: FIXED
Product:
Xfce4-terminal
Component:
General

Comments

Description Gerhard Hintermayer 2007-02-14 13:18:58 CET
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061221 BonEcho/2.0.0.1
Build Identifier: 

although I set Dynamically-set title to "replaces intitial title", the title is frozen to the original title specified on the command line. When calling Terminal without title option (or directly vte), the title changes as expected (e.g. when editing a file with vi filename etc. is shown in title)

Reproducible: Always

Steps to Reproduce:
1. invoke Terminal --title=Frozen
2. edit some file with vim -> no changes
3. invoke Terminal
4. edit some file with vim -> title changes

Actual Results:  
title frozen to title specified on command line

Expected Results:  
dynamically set title
Comment 1 Benedikt Meurer editbugs 2007-02-14 16:53:05 CET
Sure, that's the expected behavior. The user specified title overrides all other titles.
Comment 2 Gerhard Hintermayer 2007-02-14 18:21:20 CET
and what's the purpose of the possible settings, if user set title always overrides dynamic titles ? especially ..goes before/after would'nt make any sense then, and replaces .. would only replace the standard (default) title.
I'd expect to Terminal exactly do what the options say, regardless of how the title was initialised and see no reason, why it should'nt do so.
Comment 3 Gerhard Hintermayer 2007-02-15 09:11:40 CET
so now I'm again on the machine where xfce 4.4 is installed.
Your explanation doesn't satisfy me (and probably lot of others)
In the current behavior dynamically set titles work only when *not* specifyig -T or --title= on the command line, which results in the default title "Untitled".
I don't want to hang around a dozen or more untitled Terminal windows housing different shells (ssh or telnet to different hosts and/or with different users). So I name the Terminals <user>@<hostname> to distinguish them. Your desribed behavior forces anybody to refrain from using anything than the default title when he likes to have dynamically set titles.
So why is the described behavior the expected one for you ?
The button in the Terminal prefs window also speaks of initial title, regardless where it did come from.

Comment 4 Gerhard Hintermayer 2007-03-12 14:30:30 CET
This issue is still not resolved for me. Dynamically set title do also no work, when specifying -e or -x on command line. Why does this have to be so ?

Comment 5 Nick Schermer editbugs 2009-12-10 18:36:50 CET
Titles support tokens since 0.4.3. So you can now type something like:

terminal --title "Remote server: %w", which will act like an appended dynamic title.
Comment 6 Gerhard Hintermayer 2009-12-10 19:33:13 CET
(In reply to comment #5)
> Titles support tokens since 0.4.3. So you can now type something like:
> 
> terminal --title "Remote server: %w", which will act like an appended dynamic
> title.

Sorry, but this gives me "Remote server: %w" as title, not exactly what I want. (at least with Terminal 0.4.2). Obviously noone is using Terminal to manage multiple hosts with application set dynamic titles, but with the need of a prepended FIXED host identification text :-(
Comment 7 Gerhard Hintermayer 2009-12-10 19:38:15 CET
(In reply to comment #5)
> Titles support tokens since 0.4.3. So you can now type something like:
> 
> terminal --title "Remote server: %w", which will act like an appended dynamic
> title.
Sorry just noticed the version you mentioned. And I'm lagging one minor number behind. Unfortunately 0.4.3 is not yet in Gentoo portage tree, so I'm going to set up an overlay and give it a try. Thanks for your time.
Comment 8 Nick Schermer editbugs 2009-12-11 11:25:08 CET
Well if the token substitution suits you needs i can close the bug.
Comment 9 Gerhard Hintermayer 2009-12-11 12:35:37 CET
(In reply to comment #8)
> Well if the token substitution suits you needs i can close the bug.

Ok, I get the desired result, but I'm not quite happy with the solution. I can e.g. emerge -Dpu world on multiple hosts and see both progress AND hostname in the Terminal window, but I have to run Terminal remotely on the machine I'm maintaining, which gives a lot of X protocol over the network.
What I did before is (1): Terminal --title user@host --execute ssh -l user host

so Terminal ran locally and only output of the pty was sent over the net. Obviously running an emerge on the remote host did'nt show any progress in the window title bar.

Now I would have to (2): ssh -l user host Terminal
the token substitution is not necessary here since the title is set to %w:%D anyhow.


But wait, I just tried (1) without the --title option with a 0.2.8 (very old,I know) Terminal and this gives me now the desired result (e.g. not setting the window title to Untiteled ,but to something like %w:%D) on recent distros (Gentoo up to date system, which was not present when I originally filed the bug report, so I thought "This doesn't work on all machines") but still the "Untitled" old quite old installations. Can somebody tell me what or who sets the Title to something different than "Untitled" ? Maybe I have to set up a env var to have this working on the old machines.

So the point is, how do I set the title to %w:%D on the old distros ?
Comment 10 Jeffery Small 2014-08-22 01:47:54 CEST
xfce4-terminal 0.6.3-1ubuntu1
Xubuntu 14.04.1
Intel Xeon 64-bit system

I have to agree with Gerhard on this issue.  I was also ready to file a new bug report until I ran across this one.  By logic it should follow that if you can specify an "Initial title" in the preferences which can then be overwritten if "Replace initial title" is specified, you should be able to do the same thing from the command line.  The setting of the initial title and the dynamic behavior are two separate things and should have independent controls.  Consider my issue:

I have a script that populates the desktop with a varying number of terminal windows.  If I don't specify a title (with -T or --title) then the default string specified in the preferences is used and, because "Replace initial title" is also set in the preferences, the title will update.  If I attempt to specify the user's $HOME in the script when populating these windows, then dynamic updating is lost.  If I specify "%w", then the initial title is displayed as "Untitled" but will dynamically update.

One possible solution to this problem is to allow -T (--title) to set an initial title, and have another command line option that determines the dynamic update policy, mirroring the four choices offered on the preferences menu.


BTW, where are the title tokens discussed?  I do not find them in my man page and I believe I am using the latest version of xfce4-terminal.  If these worked, I might be able to solve my problem, but I still think there is a serious inconsistency between the way the preference and command line options are working, and this is a poor UI decision in my book.

I hope this adds to the discussion.

Regards.
Comment 11 Leeman 2014-12-10 19:07:07 CET
Docs for the tokens are in http://docs.xfce.org/apps/terminal/usage search on token.

Had a hell of a time getting this to work for me due to the unusual requirement of a space between options and their string component

eg: -T"foo foo" breaks things in neat ways...

-T"foo foo" stuff -e "bash -l"
  results in a realized command like: 
-T stuff -e "bash -l"
Comment 12 Igor editbugs 2017-06-06 17:37:54 CEST
To handle this, I've added two new options:
  "--dynamic-title-mode=mode ('replace', 'before', 'after', 'none')" allows to set dynamic title behavior, similarly to the option in Preferences;
  "--initial-title=title" allows to set initial title.
Both of these options work on per-tab basis and override global settings.

https://git.xfce.org/apps/xfce4-terminal/commit/?id=494ad2787d6a08d117bd0f02896e6a0f126f8272

Bug #2908

Reported by:
Gerhard Hintermayer
Reported on: 2007-02-14
Last modified on: 2017-06-07

People

CC List:
3 users

Version

Attachments

Additional information