My devmode snap won't start in Xorg, only Wayland

Almost a year ago, I got a devmode snap of the SunRay OVDC client running, with some rough edges. (It had previously run in its original .deb package form under Ubuntu 18.04.) See https://github.com/sdalley137/ovdc-snap .

But now, under Ubuntu Gnome Xorg mode, it stalls on startup. Wayland works fine, but it has the disadvantage that the OVDC desktop can no longer be shared in a Microsoft Teams session as Teams doesn’t share under Wayland. Something broke in the regular Ubuntu updates around October 2021. The same problem occurs in 21.10 and 22.04.

I did strace logs of both cases, which are attached to the issue on github, see https://github.com/sdalley137/ovdc-snap/issues/1#issuecomment-1111534234 . The Xorg run appears to get into trouble around line 14399 when it tries to open /run/user/0/snap.ovdc/pulse/native and fails. This is followed by repeated futex waits and timeouts and EAGAINs.

Would greatly appreciate some expert guidance on what’s gone wrong.

Hi,

Your implementation of desktop-gtk2 is incomplete. Specifically you need to change your apps stanza to this so that your app has the correct setup to access the X11 gui:

apps: 
  snap-peek:
    command: snap-peek.sh
  ovdc: 
    command: usr/bin/ovdc
    command-chain:
      - bin/desktop-launch
    environment:
      # Fallback to XWayland if running under Wayland
      DISABLE_WAYLAND: 1
1 Like

Hello Dani, thank you for your helpful response. My snap now works on the Xorg desktop as well as wayland, yay!

I must say, though, I would never have guessed that from the reference documentation. It seems like a case of “just put this in, and it will work.” Do I take it that bin/desktop-launch performs essential initialization for any desktop gui app and is typically always required to be run at app startup? A pointer to whats-going-on documentation would be appreciated.

regards, Simon

PS: The same ovdc-snap is also having apparently-benign fontconfig errors on startup:

sdall@jewel:~$ ovdc
Gtk-Message: 23:40:03.809: Failed to load module "canberra-gtk-module"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: unknown element "its:translateRule
...

Should I start another post for this?

The desktop-launch script is added by the desktop-gtk2 part that you have in your parts, but you need to manually tell each app to use it. If you were using GTK3 then you would want to replace the two additions (the command-chain entry, and the desktop-gtk2 part) with an extensions: [gnome-3-34] (this is specific to core18 - for core20 there is a different extension called gnome-3-38) which will do all these manual steps for adding the part and command-chain automatically just by referencing the extension in your apps block.