I am trying to write a bash script to automate running some commands. However some of these commands should be running in their own terminal tab. So I use the following in my bash script to open a new tab:
xdotool key ctrl+shift+t
this does the job, but the next commands in my bash script are still executed in the previous terminal tab. How can I make the new opened terminal tab active and run the next commands in this tab?
What Terminal Emulator are you using? It strongly depends on this.
In general, you could write the commands you want to execute in a shell script and tell your terminal emulator to execute the script once it has started.
Example with
xterm
:EDIT: I just saw that u asked for a way to achieve this with
xdotool
. So this answer might be invalid. Please tell me if so - then i'll delete it.