3

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

 2 years ago
source link: https://alexanderzeitler.com/articles/resizing-a-linux-ubuntu-application-window-exactly/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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

Published on Monday, June 20, 2022

Photo by Adeolu Eletu on Unsplash

adeolu-eletu-ohh8ROaQSJg-unsplash.jpg

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. ⚠️


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK