Thanks @huyizheng, I've gone ahead and tested it and it worked fine for me, I've pushed 0.0.12-4 to incorporate this.
Search Criteria
Package Details: discord_arch_electron 0.0.54-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/discord_arch_electron.git (read-only, click to copy) |
---|---|
Package Base: | discord_arch_electron |
Description: | Discord (popular voice + video app) using the system provided electron for increased security and performance |
Upstream URL: | https://discord.com |
Keywords: | chat discord discord-stable discordapp electron video voice |
Licenses: | custom |
Conflicts: | discord |
Provides: | discord |
Submitter: | johnnyapol |
Maintainer: | Zoddo (Thaodan, SunRed) |
Last Packager: | Zoddo |
Votes: | 189 |
Popularity: | 4.07 |
First Submitted: | 2020-05-19 23:51 (UTC) |
Last Updated: | 2024-05-13 22:36 (UTC) |
Dependencies (5)
- electron29 (electron29-binAUR)
- libxss
- asar (make)
- libpulse (pulseaudio-dummyAUR, libpulse-gitAUR) (optional) – Pulseaudio support
- xdg-utils (busking-gitAUR, xdg-utils-slockAUR, mimiAUR, mimi-gitAUR, xdg-utils-handlrAUR, openerAUR, xdg-utils-betterlockscreenAUR, xdg-utils-mimeoAUR, mimejs-gitAUR) (optional) – Open files
Required by (22)
- beautiful-discord-git (requires discord)
- cia-accesa (requires discord)
- clonehero-ptb (requires discord) (optional)
- devbook-bin (requires discord)
- discord-update-skip-git (requires discord)
- discordrpc (requires discord) (optional)
- discordupdater (requires discord)
- horizonxi-launcher-bin (requires discord) (optional)
- jfcord-appimage (requires discord) (optional)
- mbcord-appimage (requires discord) (optional)
- open-hexagon-git (requires discord) (optional)
- openasar-bin (requires discord) (optional)
- openasar-git (requires discord) (optional)
- openasar-install (requires discord)
- plasticity-bin (requires discord) (optional)
- plasticity-bin-unstable (requires discord) (optional)
- premid (requires discord) (optional)
- premid-git (requires discord) (optional)
- premid-nightly (requires discord) (optional)
- remoteit-desktop-bin (requires discord)
- Show 2 more...
Sources (4)
Latest Comments
« First ‹ Previous 1 .. 29 30 31 32 33 34 35 Next › Last »
johnnyapol commented on 2020-11-19 14:36 (UTC)
huyz commented on 2020-11-19 06:07 (UTC)
Well, after I extract Discord's app.asar
, I found that the file build_info.json
and discord.png
is only used once. So instead of hacking these files into system electron's directory, perhaps it's better to just hack Discord's app.asar
itself to point these files to Discord's directory.
This hack is easy, just run asar e app.asar app
to extract app.asar
, then modify app_bootstrap/buildInfo.js
and app_bootstrap/autoStart/linux.js
and change the path of these two files.
Here's my new PKGBUILD
that applies this hack:
# Maintained by johnnyapol (arch@johnnyapol.me)
# Based off the discord community repo PKGBUILD by Filipe Laíns (FFY00) <lains@archlinux.org>
pkgname=discord_arch_electron
_pkgname=discord
pkgver=0.0.12
pkgrel=3
pkgdesc="Discord (popular voice + video app) using the system provided electron for increased security and performance"
arch=('x86_64')
provides=('discord')
conflicts=('discord')
url='https://discordapp.com'
license=('custom')
depends=('electron')
makedepends=('asar')
optdepends=('libpulse: Pulseaudio support'
'xdg-utils: Open files')
source=("https://dl.discordapp.net/apps/linux/$pkgver/$_pkgname-$pkgver.tar.gz"
'LICENSE.html::https://discordapp.com/terms'
'OSS-LICENSES.html::https://discordapp.com/licenses')
sha512sums=('c5009e022cac0b76d39cc125a98b9dd3d7a5827dd7d733c5578237b99b746aeccc1cd253aafa99e2a237bd82ef71ee42011f864059aa5ee62812488dbd82f511'
SKIP
SKIP)
prepare() {
cd Discord
sed -i "s|Exec=.*|Exec=/usr/bin/$_pkgname|" $_pkgname.desktop
echo 'Path=/usr/bin' >> $_pkgname.desktop
}
package() {
# Install the app
install -d "$pkgdir"/usr/lib/$_pkgname
# HACKS FOR SYSTEM ELECTRON
asar e Discord/resources/app.asar Discord/resources/app
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
# Copy Relevanat data
cp -r Discord/resources/* "$pkgdir"/usr/lib/$_pkgname/
rm "$pkgdir"/usr/lib/$_pkgname/app.asar
# Create starter script for discord
echo "#!/bin/sh" >> "$srcdir"/$_pkgname
echo "exec electron /usr/lib/$_pkgname/app \$@" >> "$srcdir"/$_pkgname
install -d "$pkgdir"/usr/{bin,share/{pixmaps,applications}}
install -Dm 755 $_pkgname "$pkgdir"/usr/bin/$_pkgname
cp Discord/discord.png "$pkgdir"/usr/share/pixmaps/$_pkgname.png
cp Discord/discord.desktop "$pkgdir"/usr/share/applications/$_pkgname.desktop
# Licenses
install -Dm 644 LICENSE.html "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.html
install -Dm 644 OSS-LICENSES.html "$pkgdir"/usr/share/licenses/$pkgname/OSS-LICENSES.html
}
Sukid commented on 2020-11-12 05:47 (UTC)
Thank you so much for this. Combined with electron-ozone Discord is working better than it ever has on any platform for me!
IS it possible to get other electron apps running this way? Would love it for lbry in particular.
LiveLM commented on 2020-10-31 21:48 (UTC)
Thanks for making this! For some reason, the regular Discord package is very laggy for me. This performs way better.
johnnyapol commented on 2020-10-22 14:04 (UTC)
Hey @codicodi, version discord_arch_electron-0.1.12-3 has that now. Thanks for the suggestion!
codicodi commented on 2020-10-22 12:00 (UTC)
It would be nice if the shell wrapper (/usr/bin/discord) had an exec electron ...
. The way it is now, shell process stays up for no reason until discord is closed.
Hanabishi commented on 2020-10-22 11:36 (UTC)
The day when this package shine has come :)
Because Electron included in the official client doesn't work anymore.
Kodehawa commented on 2020-10-21 19:17 (UTC)
I agree with @aviallon in regards to the unconventional name. I think discord-system-electron-bin or discord-electron-bin will fit better :)
aviallon commented on 2020-10-13 11:35 (UTC)
Nice package! However, I think that the package name is a bit weird and doesn't follow conventional package naming. I think you should rename it to discord-electron
, as there it is already used by some packages, and you do not need to remind AUR users that this is an Arch package.
This is just my two cents, but I do think it would make more sense.
PS: For renaming a package, ask a TU.
johnnyapol commented on 2020-09-10 20:21 (UTC) (edited on 2020-09-10 20:24 (UTC) by johnnyapol)
Hi EggheadCammy, update has been pushed. EDIT: Please use 0.0.12-2. The sha512 fails in 0.0.12-1
Pinned Comments
Zoddo commented on 2022-09-15 17:54 (UTC) (edited on 2023-03-31 17:24 (UTC) by Zoddo)
Starting with 0.0.26-1 (2023-03-31):
Starting with 0.0.20-1 (2022-09-15):
$XDG_CONFIG_HOME/discord-flags.conf
: this works likeelectron-flags.conf
, you can set in this file the command line flags you want to pass to electron when running Discord (there are some useful flags in the wiki, especially if you are experiencing lag in the Discord UI).FAQ
Discord requires an update, but this package isn't yet updated
Check the wiki.
The Discord UI is lagging
Try to add the flags recommended in the wiki in
$XDG_CONFIG_HOME/discord-flags.conf
.Krisp not working
This is an issue that will likely never be fixed for this package. The Krisp module checks if Discord binaries are signed by Discord, which is not the case with this package.
See this comment and this GitHub issue for more details and possibles workarounds.