Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to take a screenshot of a whole desktop with Applications Menu selection.How to do this?

share|improve this question
add comment

7 Answers

up vote 12 down vote accepted
  • Applications > Accessories > Take Screenshot > Grab the whole desktop > Grab after a delay of : 5 seconds (say)

alt text

  • Do your Applications menu selection. Wait.
share|improve this answer
add comment

Since you were wondering if it was also possible with Shutter...

To do it in Shutter icon Shutter, open it up and select Full Screen from either the toolbar or from File > New > Fullscreen.

Make sure you have a time delay set so you have enough time to open the Applications menu (Edit > Preferences > Main tab; at the bottom, there is an selection box: Capture after a delay of __ seconds).

alt text

share|improve this answer
add comment

Actually, it is possible to do it without the delay, but with some hacks instead. I have written a small script which will allow you to do that without the delay. This is a big hack, but it works and is certainly (for me) more preferable than using the delay.

#!/bin/bash
######################################################################################
# Simple script to enable users to make screenshots of tooltips/menus/etc...         # 
# without timers                                                                     #
######################################################################################

######################################################################################
# Configuration Section (defaults)                                                   #
######################################################################################
SCREENSHOT_COMMAND="shutter -s"

# The keys can be found out using xinput test "keyboard name"
MODIFIER_KEY=133 #The <Super> Key (aka. Meta or Windows Key)f
CANCEL_KEY=54 # C
CAPTURE_KEY=27 # R

DAEMON_MODE="false" # change to true if you want to keep the script running after the screenshot was taken
VERBOSE="true" #Change this to any value if you dont want to have notifications

######################################################################################

######################################################################################
# Command parsing                                                                    #
######################################################################################

function usage {
    echo "$0 [-hemrcdn]"
    echo "-h prints this message"
    echo "-e <command> - execute that command instead of shutter"
    echo "-m <int> - The modifier key to use. Use xinput test <keyboar> to find out what is what"
    echo "-r <int> - The key to use for capture."
    echo "-c <int> - The key used for cancelling (only valid in non daemon mode)"
    echo "-d - daemon mode. Will keep on running after a screenshot was taken. to kill the daemon, use \"killall xinput\""
    echo "-n - disables notifications"
    exit;
}

while getopts "he:m:r:c:dn" flag
do
    if [ "$flag" == "h" ]; then
        usage
    fi
    if [ "$flag" == "e" ]; then
        SCREENSHOT_COMMAND=$OPTARG
    fi
    if [ "$flag" == "m" ]; then
        CAPTURE_KEY=$OPTARG
    fi
    if [ "$flag" == "r" ]; then
        SCREENSHOT_COMMAND=$OPTARG
    fi
    if [ "$flag" == "c" ]; then
        CANCEL_KEY=$OPTARG
    fi
    if [ "$flag" == "d" ]; then
        DAEMON_MODE="true"
    fi
    if [ "$flag" == "n" ]; then
        VERBOSE="false"
    fi
done

######################################################################################

KEYBOARDS=`xinput list | grep "slave" | grep "keyboard" | sed "s/[^a-zA-Z]*\(.*\)id=.*/\1/" | sed "s/[\t ]*$//"`

function run {
    MODIFIER_PRESSED="false"
    while read line;
    do
        COMMAND=`echo $line | awk '{print $2;}'`
        KEY=`echo $line | awk '{print $3;}'`
        if [ "$KEY" == "$MODIFIER_KEY" ]; then
            if [ "$COMMAND" == "press" ]; then
                MODIFIER_PRESSED="true"
            else 
                MODIFIER_PRESSED="false"
            fi
        fi 
        if [ "$KEY" == "$CAPTURE_KEY" -a "$MODIFIER_PRESSED" == "true" -a "$COMMAND" == "press" ]; then
            bash -c $SCREENSHOT_COMMAND
            if [ "$VERBOSE" == "true" ]; then
                notify-send "Taking Screenshot"     
            fi
            if [ "$DAEMON_MODE" == "false" ]; then
                quit
            fi
        fi
        if [ "$KEY" == "$CANCEL_KEY" -a "$MODIFIER_PRESSED" == "true" -a "$COMMAND" == "press" -a "$DAEMON_MODE" == "false" ]; then
            if [ "$VERBOSE" == "true" ]; then   
                notify-send "Canceling Screenshot"
            fi
            quit
        fi
    done;
}

function quit {
    killall -9 xinput
    exit
}

if [ "$VERBOSE" == "true" ]; then
    notify-send "Screenshot script waiting. Press Meta + R to capture the screenshot"
fi
IFS=$'\n'
for i in $KEYBOARDS
do
    unbuffer xinput test "$i" | run & 
done

Before you can actually use the script (on ubuntu), you need to make sure you have xinput and unbuffer. To do that simply do:

sudo apt-get install xinput expect-dev

Then you can run the script. Run it first with the -h option to see the possible configuration options. By default, the script will only work once and you have to restart the script after every screenshot (e.g. by a keyboard shortcut). This is because the script might have a performance inpact. If you want to run it as a "daemon" run it with the -d option.

By default it will also use shutter. If you want to use something else, use the -e option, e.g. script.sh -c "ksnapshot"

By default, the capture button will be Meta + R. you can change that with the configuration options.

share|improve this answer
add comment

Yes. Open screenshot, and set a delay of whatever time you think is necessary to go back and open the menu. Keep it open until the shot is taken.

enter image description here

share|improve this answer
add comment

Use Screenshot (in accesssories) and set 'Grab after a delay of xx seconds'.

Worked for me

share|improve this answer
add comment

I have found a workaround for this, not an actual solution.

Open the Screenshot application, in the opened window, set a time as Grab after a delay of x seconds.

Note: This cannot be used for grabing a specific portion of the window.

Note: Sorry, It is not also possible to take the screenshot of Screenshot application itself as a Window or grabing a specific portion.

share|improve this answer
add comment

I wouldn't say it's a bug. It's possible to use the "Screenshot" tool and set "Grab after a delay of x seconds" to the time you need to get the menu back open.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.