From e71315525b97d594f75486ebaf23843e105d0b1a Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Mon, 12 Aug 2024 09:41:48 +0200 Subject: Screenshots with ImageMagick --- source/desktop/desktop_environment/index.rst | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'source') diff --git a/source/desktop/desktop_environment/index.rst b/source/desktop/desktop_environment/index.rst index a200f5c..35bc84c 100644 --- a/source/desktop/desktop_environment/index.rst +++ b/source/desktop/desktop_environment/index.rst @@ -35,6 +35,38 @@ primary (which can be basted with a middle mouse click):: xclip -o -selection clipboard | xclip -i +Screenshots +=========== + +With ImageMagick +---------------- + +The default behaviour of import is to take a custom rectangular portion +of the screen; just launch:: + + import $FILENAME + +and drag the cursor to select the area you are interested into. + +To get a screenshot of the full screen (the root window):: + + import -window root $FILENAME + +To get a screenshot of one specific window:: + + import -window `xwininfo | awk '/.*Window id:.*/ {print $4}'` $FILENAME + +and then click on the window you are interested in; to also include the +window borders the command is:: + + import -border -window `xwininfo | awk '/.*Window id:.*/ {print $4}'` \ + $FILENAME + +To take a screenshot of a running screensaver, login remotely to the +computer e.g. via ssh, with the same user that is running the X session, +and then:: + + DISPLAY=:0 import -window root $FILENAME XDG === @@ -61,6 +93,8 @@ See Also * `The old version of this article on my old website `_ +* `Another article from my old website that has been added here + `_ .. vim: set filetype=rst: -- cgit v1.2.3