Linux – How to save the multiple tabs session in an xfce4-terminal

linuxsessionterminalxfce

So I usually have tons of tabs open in terminal sessions and every time I open a new terminal I have to manually open up all tabs. This is pretty annoying.

I checked man xfce4-terminal but it didn't say anything about saving a session. Is this possible?

Best Answer

You can create a shortcut with pre-defined tabs like this:

Terminal --geometry=100x40 --hide-menubar --hide-toolbars -T "Host1" -e "ssh -t root@host1" --tab -T "Host2" -e "ssh -t root@host2"

But something like that in the Command line of the shortcut editor dialog.

To have each tab have a different working directory you can do it this way:

Terminal --working-directory=$HOME/tmp --tab --working-directory=$HOME/src --tab --working-directory=$HOME/opt

Not that the first one doesn't have a --tab before it, making it associate with the new top-level window. Then two additional tabs with different working directories.

Try to avoid using ~ expansion, as that is a shell feature that may not work in other context (such as custom launchers).

Related Question