Using zoom on Mageia 7

As lots of people confined in these difficult times, I’m working remotely. And here at home, as when I’m at work, I’m using a Linux machine to perform all my tasks. What else ?!!

Among the interactive tools I can use to interact wih my colleagues, there is Skype Enterprise (no luck on LInux, so using just a phone call, painful), HPE My Room (multi-platform with many features and usable on Mageia 7), Microsoft Teams (which is working nicely on Mageia 7 without issue, and you even have source code access under GPLv3 for an unofficial client), and the fully FLOSS Jitsi.

But some of my recent meeting requests were also using zoom. And while there is indeed a Linux client, due to libraries versions incompatibilities, it refuses to install on Linux, and even when forced to, doesn’t launch.

So I had to create a small Fedora:32 container, and with some suitable parameters, zoom is now working in it. To ease it, I have create a small script to launch the stuff:

#!/bin/bash
# Licensed under the GPLv3 🙂
mkdir -p /tmp/docker-fedora
export LUID=`id -u`
cd /tmp/docker-fedora
if [ ! -f zoom_x86_64.rpm ]; then
    wget https://zoom.us/client/latest/zoom_x86_64.rpm
fi
RD="/home"
WD="$RD/$USER/prj/fedora/"

cat > Dockerfile << EOF
FROM fedora:32
MAINTAINER bcornec@mageia.org
RUN dnf makecache
RUN dnf -y update || true
COPY zoom_x86_64.rpm /
RUN dnf install -y /zoom_x86_64.rpm
RUN dnf install -y pulseaudio pulseaudio-utils libglvnd-gles
RUN useradd $USER -u $LUID  -N -M -d $RD/$USER
RUN usermod -a -G audio $USER
RUN echo "$USER ALL=NOPASSWD:/usr/bin/dnf" >> /etc/sudoers
WORKDIR $WD
USER $USER
CMD zoom
EOF
stat=0
build=0
docker inspect pb:zoombuild 2>&1 > /dev/null
if [ $? -eq 0 ]; then
    if [ "$BASH_ARGV" = "-f" ]; then
        docker rmi pb:zoombuild
         build=1
    fi
else
     build=1
fi
if [ $build -eq 1 ]; then
    docker build --file=Dockerfile -t pb:zoombuild .
    stat=$?
fi
if [ $stat -eq 0 ]; then
    # Priviledge needed for zoom command in ctn
    docker run --device /dev/snd --device /dev/usb --rm -v $RD/$USER:$RD/$USER --cap-add=SYS_ADMIN -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/$LUID/pulse/native:/run/pulse/native -e PULSE_SERVER=/run/pulse/native -e PATH=/usr/bin:$PATH -ti pb:zoombuild
fi

Just run that script and you can join a zoom conf call, benefiting from sound at least (I have no webcam to test the video at the moment).

So now, dear mageians no excuse to stay confined without contacts with your colleagues 😉

Tags: , ,

9 Responses to “Using zoom on Mageia 7”

  1. rmunstarred Says:

    Thanks for this. I was puzzled by some errors until I realised that — was getting pasted into the script incorrectly. I also think that you need to lose the “s around RD=”/home” I was ending up with “/home”/robert in the Dockerfile. I’m currently not seeing the video – checking devices…

    • brunocornec Says:

      I changed the format in wordpress to improve the ” management. Thanks for the feedback.

      I have not used a camera on my side yet, so can’t comment, but you may need to pass more content to the container (sockets, devices, …) Once I got one, I’ll update the instructions with what I find.

  2. Denis Bitouzé Says:

    Thanks for sharing this script. However, it isn’t clear whether it has to be run as root or not. As a normal user, it ends up with the following errors (docker service being active): Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/pb:zoombuild/json: dial unix /var/run/docker.sock: connect: permission denied
    Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=x2zptaf3bhizfbsrebm5hvn83&shmsize=0&t=pb%3Azoombuild&target=&ulimits=null&version=1: dial unix /var/run/docker.sock: connect: permission denied

    • brunocornec Says:

      Right. You have to belong to the docker group to be able to talk to the docker daemon on Mageia. I recommend that rather than being root.

      • Denis Bitouzé Says:

        OK, thanks. For sake of completeness, maybe the necessity to belong to the docker group should be specified somewhere in the post or, better, the script should warn the user if it is not the case.

        But the script still fails with the same error, even though I ran both as root and as normal user:


        ─bitouze@drums-bis ~/bin
        ╰─➤ id
        uid=1000(bitouze) gid=1000(bitouze) groupes=1000(bitouze),10(wheel),81(audio),949(toruser)
        ╭─bitouze@drums-bis ~/bin
        ╰─➤ usermod -a -G docker bitouze
        ╭─bitouze@drums-bis ~/bin
        ╰─➤ groups 1 ↵
        bitouze wheel audio toruser
        ╭─bitouze@drums-bis ~/bin
        ╰─➤ groups bitouze
        bitouze : bitouze wheel audio toruser docker

        Another trouble now (maybe related to https://serverfault.com/a/259845):


        ╭─bitouze@drums-bis ~/bin
        ╰─➤ sh ./run_zoom.sh 127 ↵
        ./run_zoom.sh: ligne 4: UID : variable en lecture seule

    • brunocornec Says:

      I changed the name of the internal variable to avoid the warning you get (UID => LUID)

      Wrt the docker daemon: here is my socket file:

      ls -al /var/run/docker.sock
      srw-rw—- 1 root docker 0 mars 29 17:22 /var/run/docker.sock

      What about yours ?
      If you’re group docker then you can write to it, except if doesn’t look like mine.

  3. Rolf Pedersen Says:

    Hi,
    Looks like a lot of work, thanks!
    I started with a copy/paste of the script in the Planet article but nano complained about some 2 non-printing characters or such, gedit had no complaint, but the smiley that appears after GPLv3 in the second comment line was not detoxed, so I took it out.
    After that, I discovered I had to install docker (not my thing), start it, and run the script as root.
    A lot happened with only one error at the end seemingly to do with user root already existing.
    Now, I just don’t know how to run this “zoom docker” (not my thing)! 😛
    Thanks,
    Rolf

  4. Jason Says:

    Zoom works fine for me on Mageia 7.1 without doing all of this work. I simply installed the RPM file I downloaded from the Zoom website and installed it using the Mageia Center. The only problem I have run into was an error Zoom gave me about not being able to update. I haven’t had a chance to look into it yet but other than that the Zoom client works perfectly for me.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: