How to take a screenshot while desktop menu is open on Ubuntu

Last updated on November 3, 2020 by Dan Nanni

On Ubuntu Desktop, you can take a screenshot simply by pressing Print Screen key. By default, this key is set to trigger gnome-screenshot program to capture current desktop screen. However, if you attempt to take a screenshot while any Unity menu or X11 application's built-in menu is open, you will notice that Print Screen key will not respond, so you cannot take a screenshot. As of Ubuntu Desktop 12.10, Gnome desktop has a bug, where Gnome desktop does not receive keyboard events while any desktop menu is open.

If you would like to take a screenshot when desktop menu is open, what you can do as a workaround is to take a delayed screenshot. If you launch gnome-screenshot with --delay=X option, it will take a screenshot of desktop screen after X seconds. The delay will give you enough time to open any desktop menu while screenshot is being scheduled to be taken.

In the following, I will show you how to redefine the existing Print Screen key shortcut to launch delayed gnome-screenshot.

Go to System settingsKeyboard, and click on Shortcuts tab.

In order to create a custom shortcut, highlight Custom Shortcuts in the left panel, and click on + button at the bottom of the right panel. This will pop up a custom shortcut configuration window. At the window, fill in the following info.

Once you have created a new custom shortcut, you will see that the shortcut appears in the right panel, but with Disabled status. Click on Disabled, and it will change to New accelerator. At this point, press Print Screen key.

You may see a warning message that says "The shortcut Print is already used." Just go ahead and re-assign it to your new shortcut. You will see the following screen where Disabled has now been changed to Print successfully.

Now you should be able to take a screenshot with any open desktop menu. You first press Print Screen key, and then open the desktop menu that you want within the next five seconds. The desktop screen with open menu will be captured automatically at a scheduled time.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean