# Screenshots with package or cmd tool

**URL:** https://discourse.julialang.org/t/screenshots-with-package-or-cmd-tool/46158
**Category:** General Usage
**Tags:** question, linux, cmd, io
**Created:** [September 6, 2020, 7:17pm UTC](https://discourse.julialang.org/t/screenshots-with-package-or-cmd-tool/46158 "2020-09-06T19:17:22Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![noroskir](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@noroskir](https://discourse.julialang.org/u/noroskir)
#### Post date: [September 7, 2020, 9:57am UTC](https://discourse.julialang.org/t/screenshots-with-package-or-cmd-tool/46158/2 "2020-09-07T09:57:38Z")

</div>

If anyone else needs to know, this works under linux with the xwd tool:

```julia
using ImageMagick

function screenshot()
    data = read(pipeline(`xwd -root`, `convert xwd:- png:-`))
    im = ImageMagick.load_(data)
end

```

---

_[View the full topic](https://discourse.julialang.org/t/screenshots-with-package-or-cmd-tool/46158)._
