The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 2,981     Votes:  3 
Tags: bash   ubuntu   gnome-terminal   xdotool   wmctrl  
Link: 🔍 See Original Answer on Stack Overflow ⧉ 🔗

URL: https://stackoverflow.com/q/55762022
Title: How to Switch Focus to a Gnome Terminal Tab via Script or Shell Command
ID: /2019/04/19/How-to-Switch-Focus-to-a-Gnome-Terminal-Tab-via-Script-or-Shell-Command
Created: April 19, 2019
Upload: April 8, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


In order to send the signal from Bash Shell use xdotool:

sudo apt install xdotool

In your script issue this command:

xdotool key Control+Page_Up
⇧ Shell Script : Focus already open terminal tab from second terminal tab Turning screen off when running in without window manager running  ⇩