Xfce Forum

Sub domains

You are not logged in.

#1 2013-04-22 12:50:50

Registered: 2013-04-22
Posts: 1

xfce4-terminal: Tab title changing automatically


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.


#2 2022-11-21 07:54:52

Registered: 2022-11-21
Posts: 1

Re: xfce4-terminal: Tab title changing automatically

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,

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,

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)


#3 2022-11-21 18:16:12

From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 768

Re: xfce4-terminal: Tab title changing automatically

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.


Board footer

Powered by FluxBB