A little while back I ran into a problem in Linux and wanted to take a screenshot of it. In most cases you can simply press the “Print Screen” key on your keyboard and move on.
In other cases its not so simple. Often times, when you want to take a screenshot of a menu, you’ll find that the screenshot tool cannot be called while the menu is open. You can get around this problem in most cases by installing Shutter.
While Shutter is a great tool with some very handy features for screenshots, it also doesn’t always work or is unable to capture some things (as far as I’ve found).
One solution that is very simple to use is a simple command line (link sent to me from a friend). If you hate command line tricks then you can easily make a Gnome button for this as well. 😉
The menu that I was trying to grab a screenshot of was an Opera sub-menu from the O-menu icon (can’t remember which one for sure, but probably the Bookmarks sub-menu). Print Screen wouldn’t work, Shutter complained that it couldn’t detect any open or focused menus, so I resorted to the following:
$ gnome-screenshot --delay=10
Basically, this command calls the same program that is called when you press Print Screen, but since you’re adding a delay (10 seconds in this case) it has already been called before you open the menu..which rules out the problem of your keyboard Print Screen key not working.
While this seems to be a very simple command, which it is, I’ve benefited from it several times already. So if you ever find yourself having trouble capturing a particular screenshot, just pop open a terminal and use this delayed command!
If you’re looking for for an easier method and don’t mind a permanent button in your Gnome panel, just do the following:
- Right click your panel and select “Add to Panel…”
- “Custom Application Launcher” should be the first option in the list that comes up. Select it and click the “Add” button at the bottom.
- Leave the “Type” as Application.
- You can name this launcher anything you wish, maybe something like “10s Delayed Print Screen”.
- Copy the command that I mentioned above into the field labeled “Command”. You can change the value from 10 to anything you want or need.
- You can copy the name text into the “Comment” field as well since this is what you will see when you hover the button.
- You could optionally edit the icon if you wanted, but its not necessary. Click close and you’re done.
Enjoy!