Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feasibility of using upstream electron similar to AUR package #151

Closed
anthr76 opened this issue May 17, 2021 · 9 comments
Closed

Feasibility of using upstream electron similar to AUR package #151

anthr76 opened this issue May 17, 2021 · 9 comments
Labels
upstream Issues that we can't fix because they are Discord's waiting Issues waiting for something else to happen

Comments

@anthr76
Copy link

anthr76 commented May 17, 2021

Hello

ArchLinux AUR has seemed to workaround some discord's shortcomings with electron/screen sharing with pipewire etc.

They're using the system's electron. Is it possible we can do something like that with the flatpak?

They unpack the asar

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=discord_arch_electron#n36

  install -d "$pkgdir"/usr/lib/$_pkgname

  # HACKS FOR SYSTEM ELECTRON
  asar e Discord/resources/app.asar Discord/resources/app
  rm Discord/resources/app.asar
  sed -i "s|process.resourcesPath|'/usr/lib/$_pkgname'|" Discord/resources/app/app_bootstrap/buildInfo.js
  sed -i "s|exeDir,|'/usr/share/pixmaps',|" Discord/resources/app/app_bootstrap/autoStart/linux.js
  asar p Discord/resources/app Discord/resources/app.asar --unpack-dir '**'
  rm -rf Discord/resources/app

I have not tested myself but I have read/ and heard doing something like this allows you to use Pipewire and screen share properly

@carlocastoldi
Copy link

As far as I tested discord_arch_electron doesn't make it possible to screenshare using pipewire. If you hope to enable screensharing with this proposal, I highly doubt it will.

P.S. tested with:

❯ cat /usr/bin/discord
#!/bin/sh
exec electron --enable-features=WebRTCPipeWireCapturer --enable-features=UseOzonePlatform --enable-gpu --ozone-platform=wayland /usr/lib/discord/app.asar $@

@lionirdeadman
Copy link
Collaborator

I believe I've said this before but not sure where. Doing this might count as a client modification and I don't want to cross that line.

@SystemlessDev
Copy link

I'm necroposting a bit but doing this would absolutely be considered a client mod. Any modifications to discord, or any of its components, is against their tos.

@anthr76
Copy link
Author

anthr76 commented May 30, 2021

I mean the options Discord gives it's paying Linux customers are abysmal but if upstream has no desire I'm going to go ahead and close the issue.

@anthr76 anthr76 closed this as completed May 30, 2021
@lionirdeadman
Copy link
Collaborator

I still believe that it would be a violation but I'd like to keep this open because I've sent an email about it to Discord to see if this breaks their policies or not.

@lionirdeadman lionirdeadman reopened this May 30, 2021
@anthr76
Copy link
Author

anthr76 commented May 30, 2021

Thanks! I'll keep an eye and would be happy to help if we get a response back.. FWIW I wonder what thier views are on flatpak itself considering it's not officially distrusted by them.

@lionirdeadman
Copy link
Collaborator

We already contacted them previously to allow the distribution of the binary. I recently emailed them about how they handled updates but they said their team and the infra was too small to do the things I wanted (either email me or check flatpak for updates instead of their current prompt)

@thegarlynch

This comment was marked as abuse.

@lionirdeadman lionirdeadman added upstream Issues that we can't fix because they are Discord's waiting Issues waiting for something else to happen labels Apr 29, 2023
@guihkx
Copy link
Collaborator

guihkx commented Oct 2, 2024

In recent times, Discord has greatly improved on this specific scenario.

For instance, Discord 0.0.70 (released yesterday), already includes Electron 32.0.0 (with Chromium 128), which is the most recent stable version of Electron today.

For that reason, my personal opinion is that we don't need this anymore. If any collaborator disagrees, feel free to re-open.

@guihkx guihkx closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Issues that we can't fix because they are Discord's waiting Issues waiting for something else to happen
Projects
None yet
Development

No branches or pull requests

6 participants