Taking a Screenshot in X11: Difference between revisions

From Leo's Notes
This page was last edited on 14 June 2020, at 22:19.
Created page with "Quick note on taking a screenshot on Linux. == Linux == This method has been used for the remote displays. Ensure {{code|xorg-xwd}} is installed, then run: {{highlight|lang=..."
 
m Leo moved page Screenshot to Taking a Screenshot in X11: more descriptive name
 
(3 intermediate revisions by the same user not shown)
Line 10: Line 10:
}}
}}


The XWD file can then be converted or opened in GIMP.
The XWD file can then be converted by or opened with opened in GIMP. Alternatively, you can convert the file using the Python script at https://github.com/drj11/xwd2png (mirror at https://git.steamr.com/others/xwd2png)
{{highlight|lang=terminal|code=
## Example usage:
$ pip install --user pypng
$ export PYTHONPATH=$(python -c "import site, os; print(os.path.join(site.USER_BASE, 'lib', 'python', 'site-packages'))"):$PYTHONPATH
$ cat ~/bob2.xwd | python ./xwd.py > ~/bob2.png
}}


[[Category:Linux]]
{{Navbox Linux}}[[Category:Linux]]

Latest revision as of 22:19, 14 June 2020

Quick note on taking a screenshot on Linux.

Linux

This method has been used for the remote displays. Ensure xorg-xwd is installed, then run:

# DISPLAY=:0 xwd -silent -root > bob.xwd
# file bob.xwd
bob.xwd: XWD X Window Dump image data, "xwdump", 1824x984x24

The XWD file can then be converted by or opened with opened in GIMP. Alternatively, you can convert the file using the Python script at https://github.com/drj11/xwd2png (mirror at https://git.steamr.com/others/xwd2png)

## Example usage:
$ pip install --user pypng
$ export PYTHONPATH=$(python -c "import site, os; print(os.path.join(site.USER_BASE, 'lib', 'python', 'site-packages'))"):$PYTHONPATH
$ cat ~/bob2.xwd