Skip to content

Tricking application into thinking I’m on fedora

I know this sucks but... I need to use “Zoom” video conferencing software for work and the screen share feature only says it works in Gnome on Wayland for specific distributions like Fedora 27, etc.

I like running Wayland. I like running gnome on Wayland. And it should go without saying but I really don’t want to run anything but Arch. Alas, I need to share my screen using this crap software.

Is there any way to trick zoom into thinking I’m on the one of the distributions it wants for screen sharing to be enabled for Gnome on Wayland? Surely if works there (fedoras, etc) it should work here.

I was thinking strace would tell me if it’s just reading /etc/issue or something stupid like that but I wanted to see if anyone here had a more clever solution to “fixing” software that requires certain specific Linux flavors.

Screenshot of error: https://imgur.com/a/a886Ivq

Before you ask:

  • Yes, I'm using the right AUR package
  • Yes, I know screen sharing works in X11

Summary:

  • Zoom works (mostly) -- this has nothing to do with the packaging in the AUR (that all works fine)
  • Screen sharing on x11 works on all distros
  • Screen sharing on Wayland only works in Gnome on certain distros (arbitrarily chosen by zoom)

Edited 6 Jul 2018. We only hold this version.

66 points62 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
66 · 100% up
Kind
Text
ID
8winpp

Author

9
posts
74
comments
0
media
View profile

66 comments

You could try chrooting zoom into a folder, copy the settings necessary, and overwriting the release files to resemble Ubuntu? Create whatever is necessary. I think bubble wrap does that for you (look up on arch wiki).

Or if you're willing to work with docker you can mount wherever you want your settings and shit to be in the vm. Basically make a docker for zoom with wayland (or forward your own wayland session) https://unix.stackexchange.com/questions/330366/how-can-i-run-a-graphical-application-in-a-container-under-wayland.

20 points

I'm a beginner in arch, but I love how this community is full of amazing people :D

2 points

Not to burst your bubble, but generally you will not get quality answers unless you show a motivation to actually learn something or someone is genuinely interested in your problem. The first one requires a certain level of work in your question, and the second requires enough experience to know when you have a unique problem that is worth solving.

If you show an interest in learning, you won't get a solution, but rather an explanation of the problem that will help you solve it. Or they will link you to somewhere with a good explanation.

I hope that helps you.

5 points

Good lord people in this thread have bad reading comprehension skills...unfortunately I dont use gnome or wayland but I'll give you an upvote and hope someone actually reads this post and can help lol

17 points

run the application with strace to see what it's doing.

It probably opens /etc/os-release to see which distro you are running, just edit / symlink / mount that file to the fedora one

14 points

When you said mount / symlink the fedora one is there a way to do that for just one process instead of the entire system?

1 points

Assuming the application uses lsb_release, you can write a custom lsb_release script that returns Fedora or whatever you want, put it in a folder (e.g. ~/somewhere) and then start the application using env PATH=~/somewhere:$PATH thatapplication

11 points

@op I'd start here. I'd also be tempted to dump strace and see if you can discern how it is doing the check.

EDIT: strace hacking eulicidated by /u/Keziollo

8 points

Great idea, will do. I’ll update everyone when I get home.

3 points

I think the most profitable use of your time be to swap some underlying method Zoom is using to get OS data.

You start with what you want your 'hook' to do and what you want to hook. This is a simple hook that just swaps out whatever really is in /etc/os-release with a short string "ZV" by replacing the implementation of open. You need to use the program strace to really figure out how Zoom is doing it.

#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <dlfcn.h>

int open(const char *path, int oflag) {
    if (strcmp(path, "/etc/os-release")) {
        int (*nopen)(const char *path, int oflag);
        nopen = dlsym(RTLD_NEXT, "open");
        return nopen(path, oflag);
    } else {
        int *fildes = calloc(2, sizeof(int));
        pipe(fildes);
        const char *fake = "ZV";
        write(fildes[1], fake, strlen(fake));
        return fildes[0];
    }
}

To use this, you must write out the file you've created from the code above to a file (I've named it fakeread.c) and compile it:

$ gcc -shared -fPIC -ldl -o fakeread.so fakeread.c

Then you just need to call your command with an environment variable that instructs the dynamic linker to preferentially use the symbols exported by your new shared object.

$ LD_PRELOAD=`pwd`/fakeread.so WHATEVER_ZOOM_COMMAND_IS

You can hook other library functions like exec or even system calls like uname with the same principle.

 

incidentally, if you've run strace on the program and you've found it does actually inspect /etc/os-release, you can use the following as an acceptable fake value instead of "ZV" to trick zoom.

const char *fake = "NAME=Fedora\n"
    "VERSION=\"28 (Workstation Edition)\"\n"
    "ID=fedora\n"
    "VERSION_ID=28\n"
    "PLATFORM_ID=\"platform:f28\"\n"
    "PRETTY_NAME=\"Fedora 28 (Workstation Edition)\"\n"
    "ANSI_COLOR=\"0;34\"\n"
    "CPE_NAME=\"cpe:/o:fedoraproject:fedora:28\"\n"
    "HOME_URL=\"https://fedoraproject.org/\"\n"
    "SUPPORT_URL=\"https://fedoraproject.org/wiki/Communicating_and_getting_help\"\n"
    "BUG_REPORT_URL=\"https://bugzilla.redhat.com/\"\n"
    "REDHAT_BUGZILLA_PRODUCT=\"Fedora\"\n"
    "REDHAT_BUGZILLA_PRODUCT_VERSION=28\n"
    "REDHAT_SUPPORT_PRODUCT=\"Fedora\"\n"
    "REDHAT_SUPPORT_PRODUCT_VERSION=28\n"
    "PRIVACY_POLICY_URL=\"https://fedoraproject.org/wiki/Legal:PrivacyPolicy\"\n"
    "VARIANT=\"Workstation Edition\"\n"
    "VARIANT_ID=workstation\n";
6 points

tbh, in your situation i would just run the bloatware in a virtualbox. unless you need specific opengl extensions, it should work perfectly.

5 points

Did you check if any open source screen recording programs work on Gnome Wayland? It’s possible that the error message is just badly written, and only appears when it already failed to start the screen sharing session

3 points

Tricking Zoom to work on Arch was easy. I copied Fedoras /usr/lib/os-release ontop of the Arch one. Of course this broke things and had to be put back straight after using Zoom.

Whilst pretending to be Fedora, Zoom worked perfectly even on Wayland.

I raised a ticket with Zoom support to remove the check and sure enough in the latest version Arch is fully working with Wayland (no need to trick Zoom anymore)

2 points

Not sure if you found a fix, but I tried zoom every which way possible with Linux to no avail. The screenshare would sometimes work, glitch, not start. The whiteboard also. My wife needed it for work and we run Arch. I also tried a dual boot with Mint and Fedora, but ultimately had to install windows for her to utilize zoom correctly. If you found a fix please share cause she hates dual booting.

1 points

It works just fine using x11 for me. Did you try using x11?

1 points

I did the problem was how the screen share worked when typing onto PDFs and the way the whiteboard cleared when she needed more space Often times it would disconnect the students she was sharing with and just kind of lock up after.

1 points

It's a long shot, but maybe edit the source and remove that check if it's redundant in your case.

1 points

If it was open source, this wouldn't be a problem in the first place.

The AUR package just downloads prebuilt binaries from Zoom. There's no source to compile.

7 points

I use zoom on xfce without issue. I'm not using Wayland mind you though.

1 points

Ok, thanks for this but like I’ve said, it works fine on X11. I’m not unsure that it works on x11 for every distro and DE. It does.

1 points
unknown author

Deleted before we saved it.

1 points
unknown author

Deleted before we saved it.

1 points

idk what you're talking about, aur ftw

-18 points

I'm using the AUR package, please read the post, this is about a particular feature of Zoom that does not work in Arch because they have a check in there like this:

if (runningWayland && runningGnome && runningSupportedDistro) { allowScreenSharing = true; }

3 points

the most obvious way to check is:

on Ubuntu:

root@ubuntu:~# ls /etc/*release*

/etc/lsb-release /etc/os-release

root@ubuntu:~# cat /etc/os-release

NAME="Ubuntu"

VERSION="16.04.4 LTS (Xenial Xerus)"

ID=ubuntu ID_LIKE=debian

PRETTY_NAME="Ubuntu 16.04.4 LTS"

VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/"

SUPPORT_URL="http://help.ubuntu.com/"

BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial

on arch:

[ai@arch ~]$ ls /etc/*release*

/etc/arch-release /etc/os-release

[ai@arch ~]$ cat /etc/os-release

NAME="Arch Linux" PRETTY_NAME="Arch Linux"

ID=arch ID_LIKE=archlinux ANSI_COLOR="0;36"

HOME_URL="https://www.archlinux.org/"

SUPPORT_URL="https://bbs.archlinux.org/"

BUG_REPORT_URL="https://bugs.archlinux.org/"

second guess is kernel release: uname -r

there's plenty of ways to check which distro are you running. these are most obvious ones.

p.s. also adding a bunch of text to your post and then complaining a didn't read it is kinda funny don't you think?

-5 points

Its in the AUR...

https://aur.archlinux.org/packages/zoom/

Just install via yoaurt.

yaourt -S zoom

-41 points

Ok, obviously... I’m using that AUR package. If you actually had read my post you’d see it’s the “screen sharing on Wayland” feature that only works on Gnome in fedora and a couple other distributions.

The error message literally says this. I’ll get a screen shot.

To summarize:

  • Zoom works (mostly)
  • screen sharing on x11 works on all distros
  • screen sharing on Wayland only works in Gnome on certain distros (arbitrarily chosen by zoom)
12 points
unknown author11 hidden

Don't use yaourt

11 points

I'm not usually "that guy", but today I'm going to be "that guy". If you're going to tell people not to use a particular tool, at least give them the information about why its a bad idea and how to find an alternative. All it takes is a quick search on the Arch Wiki, which I'm sure you know how to do, since you most likely run Arch.

For those asking why Yoaurt is a bad idea. The short answer is that it's insecure and has the possibility of running shell commands as root without your knowledge. The long answer can be found here: https://wiki.archlinux.org/index.php/AUR_helpers#Discontinued_or_problematic

Alternatives can be found here (I personally use Yay and like it): https://wiki.archlinux.org/index.php/AUR_helpers#Active

13 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.