When I start my day in front of my computer, I first have to do the following:
- In workspace 1:
- Open a new terminal window,
ssh loginserver
, thenssh serverA1
andsudo su account00
- Open a new terminal tab,
ssh loginserver
, thenssh serverA2
andsudo su account00
- Open a new terminal tab,
ssh loginserver
, thenssh serverA3
andsudo su account00
- Open a new terminal window,
- In workspace 2:
- Open a new terminal window, 1
ssh loginserver
, thenssh serverB1
andsudo su account00
- Open a new terminal tab,
ssh loginserver
, thenssh serverB2
andsudo su account00
- Open a new terminal tab,
ssh loginserver
, thenssh serverB3
andsudo su account00
- Open a new terminal window, 1
- In workspace 3:
- etc…
Is there a way to automatize the whole process, e.g., having a script that automatically opens each terminal window in its own workspace, all terminal tabs in each window, and all corresponding ssh
/ sudo su
commands? If not, which parts can I automatize?
Best Answer
I would use a bash script for each workspace and add the commands there.
that's the basic idea, then you can add commands like this, where you start a new terminal and run some commands.
and just update your bash file which should be like this filename.sh and mark it executable so you can launch it by just double clicking it.
This could help you launch your commands in a new workspace.