# Using GLFW with wayland

**URL:** <https://discourse.julialang.org/t/using-glfw-with-wayland/119826>\
**Category:** New to Julia\
**Created:** [September 24, 2024, 7:09pm UTC](https://discourse.julialang.org/t/using-glfw-with-wayland/119826 "2024-09-24T19:09:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rightleftspin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rightleftspin/32/212079_2.png) [@rightleftspin](https://discourse.julialang.org/u/rightleftspin)\
**Post date:** [September 24, 2024, 7:09pm UTC](https://discourse.julialang.org/t/using-glfw-with-wayland/119826/1 "2024-09-24T19:09:01Z")

</div>

I’ve been struggling with this for the past few days, hopefully this is the right place to put it. I have a simple piece of code using a library (Sunny) that depends on GLMakie. However, when I run this code, I just get no text or visual output. I’m currently on nixos using wayland with xwayland in accordance with my compositor (niri). I’m struggling because I can’t seem to pop up an interactive window in some code I am trying to use. The code is

```julia
using Sunny, GLMakie

units = Units(:meV, :angstrom);

a = 8.5031 # (Å)
latvecs = lattice_vectors(a, a, a, 90, 90, 90)
positions = [[0, 0, 0]]
cryst = Crystal(latvecs, positions, 227; types=["Co"], setting="1")

view_crystal(cryst)

```

I am getting absolutely no errors, the window just doesn’t pop up in my Xwayland window. I feel I am misunderstanding something crucial, but I can’t figure out what it is. Essentially, I want to know if anyone else has experience using nixos and wayland with GLFW in julia.

---

<div class="post-metadata">

**Author:** ![kbarros](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kbarros/32/7723_2.png) [@kbarros](https://discourse.julialang.org/u/kbarros)\
**Post date:** [September 24, 2024, 7:35pm UTC](https://discourse.julialang.org/t/using-glfw-with-wayland/119826/2 "2024-09-24T19:35:26Z")

</div>

Hi @rightleftspin, I’m not familiar with this problem. As a temporary workaround (for Sunny usage), maybe can you try `using WGLMakie` instead of GLMakie? In the past there were a lot of bugs in the WGLMakie backend, but Makie developers have been making great strides and they’re mostly addressed now.

---

<div class="post-metadata">

**Author:** ![rightleftspin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rightleftspin/32/212079_2.png) [@rightleftspin](https://discourse.julialang.org/u/rightleftspin)\
**Post date:** [September 24, 2024, 8:03pm UTC](https://discourse.julialang.org/t/using-glfw-with-wayland/119826/3 "2024-09-24T20:03:50Z")

</div>

This worked perfectly for Sunny, thank you very much! I’ll leave it up as a problem for now, since I do want to figure out why wayland is having an issue with GLFW in the first place, since I’m pretty sure they should be compatible.
