Difference between revisions of "Take a screenshot"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
  import -window root desktop.jpg  
+
To take a screenshot via command line and save it as desktop.jpg:
: make a screenshot from the current window and save it as desktop.jpg
+
* install imagemagick, e.g. for Ubuntu Linux:
 +
apt-get install imagemagick
 +
* use the command import to take the screenshot:
 +
  import -window root desktop.jpg
 +
* to find out the ID of a window, call
 +
xprop
 +
: and click on the window
  
  xprop
+
= One-key-screenshot =
: find out the ID of the window you click on. Needed e.g. for the import tool.
+
  import -window root snapshot-$(date +%Y-%m-%d_%H-%M-%S).jpg
 +
 
 +
= See also =
 +
* [[Configure your PAUSE key to lock the screen]] - how to trigger an action on keypress
 +
* [[take a screenshot on Ubuntu]]

Latest revision as of 21:47, 19 April 2020

To take a screenshot via command line and save it as desktop.jpg:

  • install imagemagick, e.g. for Ubuntu Linux:
apt-get install imagemagick
  • use the command import to take the screenshot:
import -window root desktop.jpg
  • to find out the ID of a window, call
xprop
and click on the window

One-key-screenshot

import -window root snapshot-$(date +%Y-%m-%d_%H-%M-%S).jpg

See also