I’m a hard-core terminal guy. I do all with it. As such, I hate to open again and again the same group of terminals, give them names, and so on. So, is there any fast way to save and restore tabs of terminals? It turns out that no, there isn’t. If I type on my CentOS 7.6
# > gnome-terminal --version # GNOME Terminal 3.28.2 using VTE 0.52.2 +GNUTLS # > gnome-terminal --save-config=/tmp/test # Option “--save-config” is no longer supported in this version of gnome-terminal.
So the nice load-config and save-config are no more. What now? I looked for an alternative, like terminal emulators. Some of them can be installed via yum, and they allow profile management, like ROXTerm. My problem? I run on different computers, and I don’t want to be installing, even via yum, something everywhere just to save 5 minutes. It’s like killing a fly with a canyon. I mostly just want to ssh to different clients, and rename the tab afterwards.
Let’s say I want to open 3 tab in addition to the one I am to client1, client2, and client3. I create an open_clients.sh executable file (chmod 777) with this content:
#!/bin/bash gnome-terminal \ --tab -t client1 -e 'sh -c "ssh -Y client1"' \ --tab -t client2 -e 'sh -c "ssh -Y client2"' \ --tab -t client3 -e 'sh -c "ssh -Y client3"'
I open a new shell, run the open_clients.sh and see how 3 additional tabs are opened with my ssh connections established. Note that on the one I run the script I get this deprecation message, but I can keep working on it, so so far so good 🙂
BTW, if you try to correct the “-e” the way they suggest, you will end up with this other error. This script I can copy around, have it in my home folder, or even in my email as a draft, so small it is. And I can have as many as I like, let’s say open_webservers.sh, open_dataservers.sh, etc. My problem is solved, and my day gone, therefore, have a nice weekend !