Alexander Zeitler

Alexander Zeitler

Resizung a Linux (Ubuntu/Xubuntu/Kubuntu) application window exactly

Published on Monday, June 20, 2022

Photo by Adeolu Eletu on Unsplash

Sometimes you need a screenshot of an application window with specific dimensions.

On Linux, you can use the xdotool commandline tool, which is a fake keyboard/mouse input and window management tool for x11.

Using xdotool, resizing a Firefox window to 1024 x 768 pixels is as easy as this command:

xdotool search "Mozilla Firefox" windowsize 1024 768

However, knowing the right window name might fail you, there's a even better solution:

xdotool selectwindow windowsize 1024 768

Now you can just run the command, click a window - and 💥 - the selected window is resized.

⚠️ Note: If you are using Wayland, please be aware this software will not work correctly. ⚠️

What are your thoughts about "Resizung a Linux (Ubuntu/Xubuntu/Kubuntu) application window exactly"?
Drop me a line - I'm looking forward to your feedback!
Imprint | Privacy