# How do I get screen resolution in Julia?

**URL:** <https://discourse.julialang.org/t/how-do-i-get-screen-resolution-in-julia/59087>\
**Category:** New to Julia\
**Tags:** display\
**Created:** [April 12, 2021, 10:23am UTC](https://discourse.julialang.org/t/how-do-i-get-screen-resolution-in-julia/59087 "2021-04-12T10:23:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Lei](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thomas_lei/32/20372_2.png) [@Thomas\_Lei](https://discourse.julialang.org/u/Thomas_Lei)\
**Post date:** [April 12, 2021, 10:23am UTC](https://discourse.julialang.org/t/how-do-i-get-screen-resolution-in-julia/59087/1 "2021-04-12T10:23:13Z")

</div>

I couln’t get `displaysize()` to return my monitor resolution.

I know I can get it with the help of e.g. [Gtk.jl](https://github.com/JuliaGraphics/Gtk.jl), but I’d prefer avoiding using an external package. Is there a way in Julia `Base` to obtain the screen resolution ?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 12, 2021, 11:57am UTC](https://discourse.julialang.org/t/how-do-i-get-screen-resolution-in-julia/59087/2 "2021-04-12T11:57:58Z")

</div>

Julia (the core language and the standard libraries) does not know anything about graphical output, so you will have to rely on a package for that.

For a specific OS, you may be able to formulate a command line query though (eg from the output of `xdpyinfo` on X).

---

<div class="post-metadata">

**Author:** ![Thomas\_Lei](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thomas_lei/32/20372_2.png) [@Thomas\_Lei](https://discourse.julialang.org/u/Thomas_Lei)\
**Post date:** [April 12, 2021, 8:51pm UTC](https://discourse.julialang.org/t/how-do-i-get-screen-resolution-in-julia/59087/3 "2021-04-12T20:51:35Z")

</div>

Thanks ! Got it done with Glfw.jl.
