The Cookie Machine - Click here to drag window

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

Views: 2,312     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: November 24, 2022    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  ⇩