# Disable display

**URL:** <https://discourse.processing.org/t/disable-display/38236>\
**Category:** Coding Questions\
**Created:** [August 5, 2022, 10:26am UTC](https://discourse.processing.org/t/disable-display/38236 "2022-08-05T10:26:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mothsa](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mothsa](https://discourse.processing.org/u/mothsa)\
**Post date:** [August 5, 2022, 10:26am UTC](https://discourse.processing.org/t/disable-display/38236/1 "2022-08-05T10:26:36Z")

</div>

Hi everyone,

This is my first time using processing, and I’d like to generate png files when running processing code from command-line. This part works fine, but I’m having trouble disabling previews. I saw this tutorial on github [Running without a Display · processing/processing Wiki · GitHub](https://github.com/processing/processing/wiki/Running-without-a-Display)  
but I’m having trouble making this work on Mac OSX. I’m using a M1 MBPro

Thanks a lot !!

---

<div class="post-metadata">

**Author:** ![jeremym](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremym/32/16749_2.png) [@jeremym](https://discourse.processing.org/u/jeremym)\
**Post date:** [August 5, 2022, 3:25pm UTC](https://discourse.processing.org/t/disable-display/38236/2 "2022-08-05T15:25:21Z")

</div>

An easier way to do this would be to create a PGraphics object, do all your drawing on it, then use its save() method. It’s not strictly headless, but you won’t be drawing to the screen.
