36

Whenever I try to take a screen-shot (in my Ubuntu 12.04 box ) with the global menu, context menu for any window/file, it doesn't work. I don't seem to be able to take snapshots with menu dropped down. How do I get this fixed?

PS. The problem is in both Unity and Gnome3 environments.

2
  • 1
    I have this problem in bionic, and none of the linked answers helps. I use a delay, but neither the command line version or invoking the Screenshot tool in the launcher bar works. Using gimp works, as does hitting PrtSc, though with both of those I have to crop the result. Bizarre that even though I see it take a snapshot with the popup window visible, the screenshot doesn't have it. This happens with the added-on popup menu at openlinkprofiler.org/r/…
    – nealmcb
    Jul 26, 2018 at 14:47
  • 1
    2021 here, still not fixed.
    – Bersan
    Jan 19, 2021 at 11:18

5 Answers 5

31

As a workaround you can take a screenshot with a delay for example:

gnome-screenshot --delay=7

or

xfce4-screenshooter -d 5

It seems that this issue of print screen not working in menu context has been around for a while… as can be seen with this bug report

2
  • will be using the workaround until that's fixed... hope, soon... thanks for the help... +1
    – rusty
    Dec 20, 2013 at 16:41
  • I used gnome-screenshot -d 8 That seemed to work just fine. See answer below.. it is better, but this is just the same. Aug 16, 2016 at 10:30
16

Lazy answer

(for independent fast learners)

There's controversy regarding this situation.

Fast answer / workaround

(for advanced ubuntu users)

  • Add a custom shortcut to the following command:
    gnome-screenshot --delay=numIntValueInSecs
    for example
    gnome-screenshot --delay=3
  • Add another one to take active window screenshots:
    gnome-screenshot -w --delay=3

    That's it, but I'd also recommend setting 2 others that would give you more time to navigate deeper in menus.

    • gnome-screenshot --delay=10
    • gnome-screenshot -w --delay=10

    enter image description here

Elaborate answer

(novice to hacker)

Intro:

Whenever you press PrntScr, all Ubuntu does is calling gnome-screenshot which is usually located on the /usr/bin/ path and available from the "terminal" (teletype, tty, cli, command line/prompt), so you can use it in all sorts of ways to fit your funky purposes.

The gnome-screenshot little program accepts optional parameters, you can see all options by passing the standard parameter to ask for help, you know the one (-h)

enter image description here

If you're still not sure how to use this, you can always read a more detailed help, just ask for the manual typing man gnome-screenshot

enter image description here

The more you read full manuals, hacking ubuntu to fit your needs will become intuitive and you won't need other people to give you step by step instructions. Maybe by this point you even know how to make this workaround by yourself, if you're still lost (hopefully not), just keep reading...

Instructions:

  • Step Zero: Open Ubuntu's system settings and navigate to the Keyboard option:

enter image description here

Now

  1. Navigate to Shortcuts tab.
  2. Select Custom Shortcuts
  3. Hit the + button to add your new custom shortcut.
  4. Give a name and a command.
    (just like described on the "Fast Answer" above)
    4½. Assign the key combination you'd like.
  5. Close this window or it wont work.

enter image description here

*presto!
You just took one further step to be an ubuntu master, I hope this answer was helpful *

1
  • Thanks.. downloaded shutter and tried "screenshot" this worked with the command line. (used for helping on askubuntu too) Aug 16, 2016 at 10:25
3

This is not a "problem". You'll get the exact same kind of issue with another operating system like Windows.

To take snapshots with menu dropped down you have to use a specialized tool such as Shutter. You'll find this free and open-source tool in Ubuntu Software Center. There is a special option in Shutter to make screenshots of menus/sub-menus which performs a delayed capture of the screen.

Of course, you can use it with Unity and Gnome 3.

6
  • 1
    what strange logic "Windows has the same so it's no issue".
    – sehe
    Nov 12, 2017 at 14:57
  • 1
    @sehe This is not exactly what I've written... Maybe I should have said that it was the way most UI were designed (without going into details) instead of giving an example... Unity and Gnome 3 are two different Window Managers which have a similar behaviour ("issue") with dropped down menus and screenshots even if they have nothing in common with Windows UI...
    – Golboth
    Nov 12, 2017 at 15:53
  • 1
    I guess my surprise was more with "This is not a "problem"" :) I think most people intuitively grasp that anything related to (mouse)focus can be hard to observe without interfering. Understanding the problem doesn't remove it
    – sehe
    Nov 12, 2017 at 18:06
  • 1
    In fairness, I just used Shutter because the delayed-screenshot approach with gnome3 doesn't actually work (at least not in the application I tried to capture). +1
    – sehe
    Nov 12, 2017 at 18:07
  • 1
    The comment about windows is false. Perhaps it used to be true (don't think so), but today I regularly take screenshots on windows with menus/popups open. Jun 18, 2020 at 15:40
1

I use Flameshot program for it

  1. Install Flameshot
  2. Open launcher from Flameshot menu screen1
  3. Choose delay and press Take new screenshot screen2
1

The answers with gnome-screenshot --delay ... don't seem to work (anymore?) to capture an open menu. At least not in Ubuntu 20.04 with a FileZilla window/menu. It does capture the window after the delay, but not the open menu.

shutter doesn't seem to be in the repos for 20.04.

But scrot works. ( apt install scrot )

scrot -ud 8

Will take a screenshot of the active window in 8 seconds, and save it to the current directory.

-d, --delay NUM
       Wait NUM seconds before taking a shot.

-u, --focused
       Use the currently focused window.

man scrot for more options.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .