Command-Line Gnome-Terminal Productivity – Make Terminal Tabs Persist

command linegnome-terminalproductivity

When I'm developing software I normally have one terminal with various tabs open running different things, as an example one of them is running foo

whilst the other running boo

This is fine until I power down my PC and the layout is lost. This leads me to have a daily fumble around as I try to get to get everything setup. Is there a way to automate this?

Best Answer

Yes, there is a way to automate it via -t and -e flags to gnome-terminal.

For instance, here's a script I've used quite recently for this question:

gnome-terminal --tab -e "bash -c 'printf \"\033]0;TEST1\007\"; sleep 7'" \
               --tab -e "bash -c 'printf \"\033]0;TEST2\007\"; ping -c 4'"

What happens there is that there will be launched gnome-terminal window with two tabs , and each will run its own command. The rest is simple - open Startup Applications and add that script as one of the commands to be launched upon logging-in. Remember to make the script executable and give full path to script as a command.

Related Question