Time delayed screenshot via shell

For the previous post Add a place to Places in Nautilus for time saving I needed a screenshot of the dialog opened. This is only possible, after one click with the mouse on the listbox. For a screenshot you need to go to Applications -> Accessories -> Take Screenshot which closes the dialog.

I needed a solution to get a screenshot after I clicked on the dialog. I thougt a time delay would be the easiest way to do this. So I open the bash and typed in: ping -c 2 localhost;gnome-screenshot which gives me a time of two seconds to navigate to my dialog.

InformationEasier way (thanks to acadavid): gnome-screenshot –delay 5

Explanation:

  • ping -c 2 localhost pings the own computer twice. One ping last approximately one second. The c stands for count so you can type ping -c 10 localhost to ping the own host ten times and get ten seconds to do what ever you want.
  • ;gnome-screenshot: The semicolon sepearates the two commands, so that the gnome-screenshot is called after the ping command finished. The gnome-screenshot is the program which is called if you click Applications -> Accessories -> Take Screenshot. To get the name of such an application right click on Applications -> Edit Menus. Right click the entry you want the command for and choose Properties.

So you see: Everybody needs bash 😉

Advertisements

3 Responses to “Time delayed screenshot via shell”


  1. 1 acadavid July 3, 2007 at 1:39 am

    Another way to do that is just to add a launcher with this command or put it on the shell..

    gnome-screenshot –delay 5

    That’s it

  2. 2 guoshuang July 4, 2007 at 4:37 am

    sleep 5;gnome-panel-screenshot

    or

    scrot -d 5 /tmp/1.jpeg

  3. 3 Anonymous October 9, 2012 at 12:03 pm

    also this should be –delay, minusminusdelay, not –delay


Comments are currently closed.




%d bloggers like this: