gtkembedded-linuxwayland

How to properly use WAYLAND_DEBUG


I have written a gtk program using C. The problem I'm currently facing is that the application exits sometimes with the message:
Gdk-Message: 12:47:30.017: Error 71 (Protocol error) dispatching to Wayland display.

I would like to debug some more, but I don't know how. I saw something about a WAYLAND_DEBUG-flag, but I don't know how to implement this in the command line (or if this even is a command line flag?).

The command I'm executing to start the program is su -l weston -c "/usr/local/display /dev/ttySTM2".

How can I implement the WAYLAND_DEBUG-flag to debug further?


Solution

  • I found out how to use the WAYLAND_DEBUG-flag.

    In my case, I need to run:
    su -l weston -c "WAYLAND_DEBUG=1 /usr/local/display /dev/ttySTM2"