You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The window or tab title only show the current directory. For me is not possible to see, which user use this terminal (user or root). Some commands like emerge, apt-get or pacman need to change the title to see the progress.
Proposal
Please add a dynamic title like username@hostname:currentdirectory. If i am the user which start the terminal the nicer way should be to see only username@hostname:~/Downloads in the title. If i switch so root the full path should be shown like root@hostname:/home/username/Downloads
Some commands like emerge or pacman should be allow to change the title dynamic. So i am able the progress of this commands.
Please take a look to the mate-terminal.
Just chiming in to say that although my .bashrc is set up to make the tab/window title the current running command, it hasn't done this since I updated to Odin.
In OS7.1 and 8 at least, the headerbar title shows the window title property of the Vte.Terminal widget which for me is the same as the prompt i.e. the user@computername:current_dir. After #830 the name of the app will also be shown in multi-tasking view.
I am not sure what is meant by "changeable" in this context - changeable by the user, the foreground process, or according to the current directory?
I thought it used to automatically show things like username and host. I set up oh-my-posh with the config "console_title_template": "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}" and now I at least have the window title working, even if the tabs are all the same.
I've just seen that in a fresh install of Elementary8-rc in a VM, Terminal does indeed behave differently from OS7.1 even when both are compiled from the same source. Not sure why this is but I would note that Xterm also behaves differently. Either one of the libraries differs or a system config file I guess. Both only show the current directory in the header even though the prompt contains the user and host names as well as the path to the current directory. I'll investigate further and try to restore the previous behaviour.
Looks like the cause of this is that the ~/.bashrc file shipped with elementary8-rc is substantially different from the one with elementary7.1. In particular, the following lines are missing:
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
If these are replaced after the lines that initially set PS:
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W\$ '
fi
unset color_prompt force_color_prompt
In OS7.1 and 8 at least, the headerbar title shows the window title property of the Vte.Terminal widget which for me is the same as the prompt i.e. the user@computername:current_dir. After #830 the name of the app will also be shown in multi-tasking view.
I am not sure what is meant by "changeable" in this context - changeable by the user, the foreground process, or according to the current directory?
The foreground process, I think? E. g. I have this in my .bashrc, but neither the tab title, headerbar title, nor window title in Multitasking view show the current/last command. Is that the intended behaviour?
The linked script makes uses of the bash-preexec script for working. If you don't have it sourced in your bashrc file, then this part of the script will do nothing.
Activity
GammaGames commentedon Sep 9, 2021
Are you on odin? I remember tabs showing the previous commands and directories in 5.1, it was a lot easier to remember which tab was which that way.
jeremypw commentedon Sep 9, 2021
This recent commit may fix this: #602
puvi7722 commentedon Sep 20, 2021
Is this fix #602 working for any one?
GammaGames commentedon Sep 20, 2021
Haven't tested, the package hasn't been updated since July.
nevillepark commentedon Sep 27, 2021
Just chiming in to say that although my .bashrc is set up to make the tab/window title the current running command, it hasn't done this since I updated to Odin.
GammaGames commentedon Dec 11, 2024
Would be nice to have this back
nevillepark commentedon Dec 19, 2024
feel like pure shit just want
herchangeable window and tab titles backjeremypw commentedon Dec 19, 2024
In OS7.1 and 8 at least, the headerbar title shows the window title property of the Vte.Terminal widget which for me is the same as the prompt i.e. the user@computername:current_dir. After #830 the name of the app will also be shown in multi-tasking view.
I am not sure what is meant by "changeable" in this context - changeable by the user, the foreground process, or according to the current directory?
GammaGames commentedon Dec 19, 2024
I thought it used to automatically show things like username and host. I set up oh-my-posh with the config
"console_title_template": "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}"and now I at least have the window title working, even if the tabs are all the same.jeremypw commentedon Dec 19, 2024
I've just seen that in a fresh install of Elementary8-rc in a VM, Terminal does indeed behave differently from OS7.1 even when both are compiled from the same source. Not sure why this is but I would note that
Xtermalso behaves differently. Either one of the libraries differs or a system config file I guess. Both only show the current directory in the header even though the prompt contains the user and host names as well as the path to the current directory. I'll investigate further and try to restore the previous behaviour.jeremypw commentedon Dec 19, 2024
Even Mate Terminal does the same, i.e. shows only the current folder name in the headerbar.
jeremypw commentedon Dec 19, 2024
Looks like the cause of this is that the
~/.bashrcfile shipped with elementary8-rc is substantially different from the one with elementary7.1. In particular, the following lines are missing:If these are replaced after the lines that initially set
PS:then the OS7.1 title format is restored.
nevillepark commentedon Dec 19, 2024
The foreground process, I think? E. g. I have this in my .bashrc, but neither the tab title, headerbar title, nor window title in Multitasking view show the current/last command. Is that the intended behaviour?
(Terminal 6.3.0, elementary 7.1.)
Marukesu commentedon Dec 19, 2024
The linked script makes uses of the bash-preexec script for working. If you don't have it sourced in your bashrc file, then this part of the script will do nothing.
nevillepark commentedon Dec 20, 2024
Thank you so much!!
jeremypw commentedon Dec 20, 2024
I notice that on OS8 the shipped
~/.bashrcchanges the window title to the name of the running command.