How to take screenshot of menu?
You have the option to capture the entire screen or the active window.
Entire screen
Install a tool for making screenshots, such as scrot
, gnome-screenshot
or ImageMagick, which provides import
. Then run it with a delay from terminal, using one of these commands:
$ sleep 5; import -window root menu.png
$ scrot -cd 5 menu.png
$ gnome-screenshot -d 5
After running it, quickly open the menu and wait.
Active window
Both gnome-screenshot and scrot support taking a screenshot of the active window:
$ gnome-screenshot -wd 5
$ scrot -ucd 5 menu.png
Note that overlapping menus won't be compensated for but rather cut off:
Capturing menus in open applications is what Shutter screenshot tool is designed to do (in Shutter's preferences, you can set it to take a screenshot after a few seconds, during which you can open the menu). Shutter can capture menus in their parent windows in any application, overlays, etc. as well as being able to capture everything that other screenshot tools can capture including entire screen, active window, selected area and webpage. Shutter is available in the repositories of most popular Linux distributions. In Debian-based distributions Shutter can be installed with this command:
sudo apt-get install shutter
The shutter .deb has been discontinued in Ubuntu 20.04. It is still available as a snap package and can be installed by running sudo snap install shutter
, but Shutter's grab a screenshot of the current window plus one of its menus feature no longer works in the Shutter snap package. Fortunately the default "Screenshot" app in Ubuntu 20.04 has the capability of taking screenshots of menus that Shutter used to have in Ubuntu 18.04. To capture a screenshot of a window together with one of its menus, take a full screen screenshot and then crop it down from a full screen screenshot to a single window in an image editor. The Screenshot app can also grab a screenshot of the current window of a GTK app plus one of its menus.