Taking a screenshot of a menu under GNOME


Probably, you have noticed that I rarely include images in my posts. There are times though that a screenshot is required in order to avoid lengthy descriptions. A picture is like one thousand words…

In my previous post about the Tab Links Epiphany plugin, I needed to include a screenshot of a menu in Epiphany. As I am not a screenshot guru, the fact that there is no direct way to capture an image of an object, like a menu, suprised me. I expected that such a capability would exist in a flexible graphical toolkit like GTK.

Also, I should mention that it was impossible to screen capture the menu by using the Print Screen keyboard button or the Alt-Pring Screen button combination. Moreover, I didn’t find a way to accomplish the task with the GIMP‘s aquire feature, even by using the “delay” functionality. The menu would not be visible!

Anyway, the method I used was the following:

First, I issued the following command in a terminal:

$ gnome-screenshot --delay=10

This takes a screenshot of the whole desktop after waiting for 10 seconds. In the meantime I had raised Epiphany’s window and kept the mouse cursor over the menu I wanted to take a screenshot of.

After the 10 seconds had passed, the image was ready and the menu was visible. So, I loaded it in GIMP, cropped it and finally saved it.

If you happen to know of a better (quicker) way to take a screenshot of a menu, please drop me a line.

Taking a screenshot of a menu under GNOME by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2007 - Some Rights Reserved

George Notaras avatar

About George Notaras

George Notaras is the editor of the G-Loaded Journal, a technical blog about Free and Open-Source Software. George, among other things, is an enthusiast self-taught GNU/Linux system administrator. He has created this web site to share the IT knowledge and experience he has gained over the years with other people. George primarily uses CentOS and Fedora. He has also developed some open-source software projects in his spare time.

6 responses on “Taking a screenshot of a menu under GNOME

  1. stavrosg Permalink →

    I’ve hit the same wall a couple of times in the past, and my solution was essentially the same, but with scrot instead of gnome-screenshot:
    $ scrot -d 5
    Then make the neccesary arrangements and wait for the shoot.
    It is a design limitation, if I can recall correctly from a thread discussing something similar in xfce4-dev. If I find some time, I’ll try to dig it up and see.

  2. George Notaras Post authorPermalink →

    I’ve found this page which contains info about various ways of taking screenshots, but it has nothing about advanced screen capturing like screenshots of menus or screenshots of webpages that are longer than the screen height.

    I’d be glad to know of any solution you might come up with. Thankis for your feedback :)

  3. mysurface Permalink →

    To capture object’s screenshot i like to use image magick’s import
    import gaim.png

    It turns into a cross, you can click on objects or just drag your mouse to select a block to snapshot.
    some examples here

  4. George Notaras Post authorPermalink →

    Hi, I just tried to take a screenshot of a menu with import and it is still impossible.

    When the mouse pointer turns into a cross, it is impossible to select any windows or objects. Even if you set the preference to select windows when the mouse pointer moves over them, the window focus does not change after the import command has been issued.

    This clearly shows that noone in the GNOME community has considered taking screenshots of objects and even screenshots of areas, which are bigger than the computer screen and therefore capturing them in their entirety requires scrolling down, is very much important to someone, who in an effort to show off the desktop features, wastes valuable time in cropping images.

    Thanks for your feedback. import seems to be just another alternative, but of the same capabilities as the forementioned tools.