You are not logged in.
Hi,
I am sorry, if this is stupid question, but I couldn't find the answer anywhere else.
I am working a lot with xfce4-terminal (Xubuntu 12.10) and I use to have open 3-4 tabs simultaneously. I want to set - automatically - the title of each tab according to CWD. (I can do a right-click on the tab and set the title manually with "%D".) The title of the tab changes automatically when I connect with a SSH to a server, thus I think it must be possible.
Pls, suggest, how to do that.
Thank you.
Offline
Why not use the keyboard shortcut: Shift Ctrl s
If instead you want to set tab titles at start-up, then consider scripting the directory. It can be a bash script arg, or hard-coded into the bash one-liner,
e.g,
xfce4-terminal --geometry=100x40 --tab --title="~/Downloads" --working-directory="~/Downloads"
If you run this script from a shell there will be a first tab at the CWD. If you just want a fresh xfce4-terminal with One Tab, the script could be,
#!/bin/bash
xfce4-terminal --geometry=100x40 --title="~/Downloads" --working-directory="~/Downloads"
I am not yet sure how to automatically set titles for new tabs opened with Ctrl Shift t but I think that is a bash prompt issue, maybe? So look into ~/.bashrc settings and whatnot.
If you want to save tabs like a session, you can again use that script, just add as many "--tab" cmdl args as you want. You can also open ssh remote sessions with the args,
--tab "Host1" -e "ssh -t user@host1"
which will passwd promt you if you haven't set-up the ssh keys.
Last edited by SmithWillSuffice (2022-11-21 10:10:52)
Offline
noticing long ago that titles were changed through SSH i ran it in the script program to save the output to a file to see how it did it.
Offline
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 521.45 KiB (Peak: 524.3 KiB) ]