Sunday, May 15, 2022

[FIXED] How to choose a default tab focus in gnome-terminal?

Issue

I have a bash script which opens several tabs inside one window and I want to choose one tabe to be the default focus

for example the below script opens 3 tabs on one window:

gnome-terminal --tab --geometry="100x20" --title="TAB1" -- bash -ic "command1"
gnome-terminal --tab --geometry="100x20" --title="TAB2" -- bash -ic "command2"
gnome-terminal --tab --geometry="100x20" --title="TAB3" -- bash -ic "command3"

So, let's say I want tab2 to be the focus after running the script and openning the window. Is there a way to specify that from the script?


Solution

I highly recommend installing terminator, it's a program which offers flexible management of multiple running gnome terminals. It allows you to choose a tab as the default focus while still viewing any other amount of terminals on the same view. It can be installed via:

$ sudo apt install terminator


Answered By - azure_wolf
Answer Checked By - Pedro (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.