Resizung a Linux (Ubuntu/Xubuntu/Kubuntu) application window exactly
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.
Resizung a Linux (Ubuntu/Xubuntu/Kubuntu) application window exactly
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. ⚠️
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK