Need Help Creating Zoom Snap - libX11.so.6 error

Hey,

I’ve been trying to put together a snap for Zoom, the video chat software. I’m having trouble.

Build OS: Ubuntu 18.04
Snapcraft version: 2.43.1+git25.gde1fe27

snap/snapcraft.yaml (removed description to save room):

name: zoom
version: dev
version-script: cat $SNAPCRAFT_STAGE/opt/zoom/version.txt
summary: "Have meetings with clear video, screen sharing, and instant messaging."
grade: stable
#confinement: strict
confinement: devmode
base: core18
#icon: icon.png

parts:
  zoom:
    plugin: dump
    source: https://zoom.us/client/latest/zoom_amd64.deb
    source-type: deb
    override-build: |
      rm usr/bin/zoom
      snapcraftctl build
      DEB_API="https://zoom.us/client/latest/zoom_amd64.deb"
      DEB_URL=$(curl -w "%{url_effective}\n" -I -L -s -S "${DEB_API}" -o /dev/null)
      sed -i 's|Icon=Zoom.png|Icon=/opt/zoom/Zoom\.png|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/Zoom.desktop
    after:
      - desktop-qt5
    build-attributes: [keep-execstack]
    build-packages:
      - dpkg
    stage-packages:
      - libx11-6
      - libxcb-xtest0

apps:
  zoom:
    command: desktop-launch $SNAP/opt/zoom/ZoomLauncher
    desktop: usr/share/applications/Zoom.desktop

The snap is built just fine.

Running zoom --version though returns (main error bolded):

ZoomLauncher started.
cmd line: --version
$HOME = /home/felicianotech/snap/zoom/x1
Can’t load/home/felicianotech/snap/zoom/x1/.config/zoomus.conf
export SSB_HOME=/home/felicianotech/snap/zoom/x1/.zoom; export QSG_INFO=1; export LD_LIBRARY_PATH=/snap/zoom/x1/opt/zoom; /snap/zoom/x1/opt/zoom/zoom "–version "
/snap/zoom/x1/opt/zoom/zoom: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
success to create child process,status is 32512.
zoom exited normally.
Something went wrong while running zoom,exit code is 127.
ZoomLauncher exit.

Pressing the super key and searching for Zoom in the launcher, the icon comes up correctly, with the correct name, but pressing it does nothing.

Lastly, if I run the binary directory, /snap/zoom/current/opt/zoom/ZoomLauncher, it works.

Thoughts?

The problem is because ZoomLauncher is overriding LD_LIBRARY_PATH. You’ll need to edit the launcher or use a different way of starting the application.

First off, thank you for a response.

I don’t believe I can edit ZoomLauncher. It’s a binary and Zoom is closed source.