Ubuntu: How to force minimize an application when keyboard is hijacked?



Question:

Background: I play one game sometimes on Linux (http://aao25.com). Although it's a very good multiplayer game, there are very few players because it's oldish, so it sometimes requires to join a server and wait for other players to come. Problem is, I can't figure out a way to minimize the game Window, even if I have it in widowed mode (everything else is visible around), the keyboard and mouse is completely hijacked by the game. The only combination that works is to go to tty console by pressing Ctrl + F1 / F5 / F6, but I don't know a way to focus a specific application from there upon return.

Question: Is there any certain way to minimize a currently open application window? Either through tty console or directly.

Just to show you how frustrating this looks, here's a photo of my desktop:


Solution:1

From the tty :

export DISPLAY=:0  

Then get the ID of your application through:

wmctrl -l  

it will list ID of all opened window . e,g: The id of your application is 0x02e00010 , to minimize the window run:

xdotool windowminimize 0x02e00010  

Or :

xdotool getactivewindow windowminimize  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »