# Wayland Desktop Kiosk?

**URL:** <https://forums.balena.io/t/wayland-desktop-kiosk/38289>\
**Category:** balenaOS\
**Created:** [October 22, 2019, 2:25am UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289 "2019-10-22T02:25:41Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthewcroughan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/matthewcroughan/32/9424_2.png) [@matthewcroughan](https://forums.balena.io/u/matthewcroughan)\
**Post date:** [October 22, 2019, 2:25am UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/1 "2019-10-22T02:25:41Z")

</div>

> **[Running a full desktop in a container](https://www.balena.io/blog/running-a-desktop-manager-with-balena/)**
>
> While building your next Internet-of-things (IoT) project, sometimes you get to a point where you need to run applications that are made to run on a screen, we call them graphical user interface (GUI) applications. After multiple requests from our...

There is little to no discussion of how to use Wayland with BalenaOS to set up something like Sway, KDE, Enlightenment, Wayfire, etc. Is there something I’m missing, or do I have to try and figure this out on my own? I appreciate any help on this! Thank you.

---

<div class="post-metadata">

**Author:** ![sradevski](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/sradevski/32/1609_2.png) [@sradevski](https://forums.balena.io/u/sradevski)\
**Post date:** [October 22, 2019, 8:59am UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/2 "2019-10-22T08:59:05Z")

</div>

Hi there,  
What device are you trying Wayland on? There is a playground project that uses Wayland [here](https://github.com/balena-io-playground/balena-wayland), I think that would be a good starting point. There is also a discussion on using Wayland on a Jetson nano device [here](https://forums.balena.io/t/weston-wayland-balenaos-for-jetson-nano/11828), in case that provides you any additional information. Let me know how that goes, and maybe we can put a sample project together.

---

<div class="post-metadata">

**Author:** ![matthewcroughan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/matthewcroughan/32/9424_2.png) [@matthewcroughan](https://forums.balena.io/u/matthewcroughan)\
**Post date:** [October 22, 2019, 9:09am UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/3 "2019-10-22T09:09:08Z")

</div>

The devices I’m interesting in using are Pi-like arm SOCs. Let’s just say the Raspberry Pi 1, 2 and or 3 for now.

> <https://twitter.com/MatthewCroughan/status/1186566920952274944>

I’d love to try and get gnome working inside a Balena environment, the use case here is for appliances like vinyl cutters, 3d printers, cnc machines, etc.

> **[Raspberry Pi with KDE Window Manager, Wayland ver](https://forums.maslowcnc.com/t/raspberry-pi-with-kde-window-manager-wayland-ver/2213/7)**
>
> Optional - Running GroundControl inside the LXQt Desktop environment Good news, if you feel more comfortable in a Desktop environment or just like the option to view PDFs, browse the web, etc, in your shop, there is a light WM named LXQt that can run...

This thread from the Maslow cnc forums is where I got a lot of info from in regards to running KDE in Wayland. It’s relatively buggy and not ready, but from what I see it looks like Gnome is entirely ready for it.

---

<div class="post-metadata">

**Author:** ![sradevski](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/sradevski/32/1609_2.png) [@sradevski](https://forums.balena.io/u/sradevski)\
**Post date:** [October 22, 2019, 10:09am UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/6 "2019-10-22T10:09:45Z")

</div>

It’s seems that you managed to get a working project, that sounds great! Did you using balenaOS for it? I had a conversation with a teammate and he said GPU acceleration on a raspberry PI using Wayland would likely not work and you won’t probably get great performance, so you should keep that in mind.  
It would be great, if you don’t mind, sharing a link to your project in this thread, so others can also benefit from it.  
Cheers!

---

<div class="post-metadata">

**Author:** ![matthewcroughan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/matthewcroughan/32/9424_2.png) [@matthewcroughan](https://forums.balena.io/u/matthewcroughan)\
**Post date:** [October 22, 2019, 5:38pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/8 "2019-10-22T17:38:49Z")

</div>

No, I’ve not yet used Balena for this task, since that would require a different set of knowledge. I’m just trying to get all this stuff working on the Pi on Raspbian first.

I’d also like to say that I don’t think your teammate is correct considering the precedents that exist. Could you go into more detail as to why he thinks this? Take a look at:

---

<div class="post-metadata">

**Author:** ![matthewcroughan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/matthewcroughan/32/9424_2.png) [@matthewcroughan](https://forums.balena.io/u/matthewcroughan)\
**Post date:** [October 26, 2019, 4:33am UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/11 "2019-10-26T04:33:44Z")

</div>

I’ve managed to get XFCE working really well in a project I’ll later put up on github as balena-xfce-base, but am now having trouble with Wayland as it can’t seem to find a tty in /dev/, Will go into more detail when I fully understand what’s happening.

---

<div class="post-metadata">

**Author:** ![bbinet](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bbinet](https://forums.balena.io/u/bbinet)\
**Post date:** [January 21, 2020, 2:35pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/12 "2020-01-21T14:35:35Z")

</div>

Have you published the balena-xfce-base project on github yet?  
I would also be interested to run xfce in a container in balena os.

---

<div class="post-metadata">

**Author:** ![sngehl](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sngehl](https://forums.balena.io/u/sngehl)\
**Post date:** [July 13, 2020, 6:52pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/13 "2020-07-13T18:52:15Z")

</div>

Have you posted this yet? I can’t find the project either.

---

<div class="post-metadata">

**Author:** ![matthewcroughan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/matthewcroughan/32/9424_2.png) [@matthewcroughan](https://forums.balena.io/u/matthewcroughan)\
**Post date:** [July 13, 2020, 7:32pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/14 "2020-07-13T19:32:09Z")

</div>

@sngehl @bbinet The stuff I did with X11 was based on this project, it’s just adding to what this file already has. [https://github.com/balenalabs-incubator/x11-window-manager](https://github.com/balenalabs-incubator/x11-window-manager)

---

<div class="post-metadata">

**Author:** ![steffend](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/steffend/32/4853_2.png) [@steffend](https://forums.balena.io/u/steffend)\
**Post date:** [November 3, 2020, 9:42pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/15 "2020-11-03T21:42:20Z")

</div>

I’ve recently created a Wayland kiosk using Sway + WPE for a raspberry pi 4. A simplified version of the source code is available on gitlab for testing purposes: [https://gitlab.com/steffend/balena-performance-test](https://gitlab.com/steffend/balena-performance-test)  
Maybe this is useful for somebody.

---

<div class="post-metadata">

**Author:** ![ngmartins\_FF](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@ngmartins\_FF](https://forums.balena.io/u/ngmartins_FF)\
**Post date:** [March 7, 2022, 6:04pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/16 "2022-03-07T18:04:56Z")

</div>

Hello @steffend,

I’m trying to use your example to run my electron application on an Intel NUC. I have both containers (Wayland and electron) running without errors but the screen is solid blue. Because of this, I think the Wayland is OK but the problem is to access the screen output from the electron container.  
(I am a noob on those subjects - so apologies if I am missing some important technical aspects on this).  
I am pretty confident on my electron dockerfile since I was use it on previous PoCs.  
However, I don’t have sure about my init.sh script.

```auto
#!/bin/sh

echo "hello from cr-electron"

#udevd &
/lib/systemd/systemd-udevd --debug &
udevadm trigger

# link displayserver sockets to shared volume
ln -s /tmp/displayserver/.X11-unix/ /tmp/
ln -s /tmp/displayserver/.wayland/ /tmp/

export XDG_RUNTIME_DIR=/tmp/.wayland
export WAYLAND_DISPLAY=wayland-0

node_modules/.bin/electron --no-sandbox index.js

```

any idea on this?  
thanks in advance,

---

<div class="post-metadata">

**Author:** ![steffend](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/steffend/32/4853_2.png) [@steffend](https://forums.balena.io/u/steffend)\
**Post date:** [March 7, 2022, 6:29pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/17 "2022-03-07T18:29:53Z")

</div>

Hi there. Try to look into the `/tmp/displayserver` directory in the container and specifically in `/tmp/displayserver/.wayland`. I’ve sometimes seen the wayland display created as `wayland-1` instead of `wayland-0`. You should be able to see this in the directory. Changing the `WAYLAND_DISPLAY` variable accordingly should help in this case.

You are correct that the blue screen means that wayland (specifically sway in this case) is running.

---

<div class="post-metadata">

**Author:** ![ngmartins\_FF](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@ngmartins\_FF](https://forums.balena.io/u/ngmartins_FF)\
**Post date:** [March 9, 2022, 4:18pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/18 "2022-03-09T16:18:01Z")

</div>

> [@steffend](#):
>
> able accordingly should help in this case.

Hello. Thanks for the answer.  
I have a `wayland-0` so I would say it is something else.

---

<div class="post-metadata">

**Author:** ![ngmartins\_FF](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@ngmartins\_FF](https://forums.balena.io/u/ngmartins_FF)\
**Post date:** [March 9, 2022, 4:27pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/19 "2022-03-09T16:27:07Z")

</div>

Should the env var `XDG_RUNTIME_DIR` be:  
`=/tmp/displayserver.wayland`  
instead of  
`=/tmp/.wayland`  
?

---

<div class="post-metadata">

**Author:** ![steffend](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/steffend/32/4853_2.png) [@steffend](https://forums.balena.io/u/steffend)\
**Post date:** [March 9, 2022, 7:55pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/20 "2022-03-09T19:55:59Z")

</div>

Try this: [GitHub - SteffenDE/balena-wayland-electron: A demo application running Electron on Balena using Wayland](https://github.com/SteffenDE/balena-wayland-electron)

Note that this uses Electron 16, as Electron 17 seems to crash under Wayland for me.

---

<div class="post-metadata">

**Author:** ![ngmartins\_FF](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@ngmartins\_FF](https://forums.balena.io/u/ngmartins_FF)\
**Post date:** [March 22, 2022, 10:27am UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/21 "2022-03-22T10:27:57Z")

</div>

> [@steffend](#):
>
> t this uses Electron 16, as Electron 17 seems to crash under Wayland for me.

Hello.  
I finally managed to run the sample you provided to me but was just able to do it so using electron 17.

Despite I am using an HDMI display the dmr in use is now the card0-DP-1. Does it make sense?  
I was trying to force a specific output’s resolution/framerate.  
By running: `sudo swaymsg -t get_inputs`  
I get: `[swaymsg/main.c:417] Unable to retrieve socket path`

Looking into the env vars the var `SWAYSOCK` is not defined.  
According to my research, it should exist under `/run/user/` but it doesn’t. Any advice on this?

---

<div class="post-metadata">

**Author:** ![steffend](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/steffend/32/4853_2.png) [@steffend](https://forums.balena.io/u/steffend)\
**Post date:** [March 22, 2022, 1:09pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/22 "2022-03-22T13:09:28Z")

</div>

Interesting, for me it did not work with Electron 17, only 16. Electron and Wayland seem to be a bit flaky…

The sway IPC socket is in the `XDG_RUNTIME_DIR`. I’ve [updated the code](https://github.com/SteffenDE/balena-wayland-electron/commit/d47949b7aed40b1e219fcb1ddca62b0ff5de882a) to set the environment variable for the Electron app accordingly.

> [@ngmartins\_FF](#):
>
> Despite I am using an HDMI display the dmr in use is now the card0-DP-1. Does it make sense?

Yes, I’ve seen this before. I think this indicates that despite having an HDMI port, internally the NUC uses Displayport.

---

<div class="post-metadata">

**Author:** ![bal](https://avatars.discourse-cdn.com/v4/letter/b/91b2a8/32.png) [@bal](https://forums.balena.io/u/bal)\
**Post date:** [November 6, 2023, 3:42pm UTC](https://forums.balena.io/t/wayland-desktop-kiosk/38289/24 "2023-11-06T15:42:54Z")

</div>

Has anyone had any success running river?

> **[GitHub - riverwm/river: A dynamic tiling Wayland compositor](https://github.com/riverwm/river)**
>
> A dynamic tiling Wayland compositor. Contribute to riverwm/river development by creating an account on GitHub.
