52
10
Is there a way, in bash command line, to give focus to a specific window of a running process. Assume I know the process' name, number, and anything else I need.
For instance, if I have a single instance of Firefox running, but it's minimized (or there's some other window on top of it). I need a bash command that brings up and gives focus to the Firefox window, by making it the active window.
6Nice to see someone is reading and I'm not just rambling to myself. =) – Malabarba – 2010-05-20T14:59:07.313
This is awesome for setting focus back to gdb (debugger) when it launches a debugger target with a window that steals focus, like kvm. Use gdb command
shell wmctrl -a something
, where something is something in your debugger terminal title. – doug65536 – 2016-10-25T03:46:06.500Thanks so much, this is pure gold, I was afraid I lost all of my pending work in some Chrome window that just disappeared in the background somehow, it worked! – Osmar – 2019-01-15T21:45:07.077
1
Also try xdotool.
– Andres Riofrio – 2012-04-25T07:04:46.347