Closed Peremious closed 1 year ago
betterdiscordctl has you covered.
Hey... I don't see what all the fuss is about and why this has been discussed for years, or even why anyone needs or trusts those "fancy" "betterdiscordctl" or "BetterDiscord-Installer.AppImage" tools anyway. It's literally just 1 little .asar
file that needs to be placed in the Discord folder, and one little config edit. No need for all that hassle or all those bloated applications just to do such a simple little job.
DISC_CONFIG="$HOME/.var/app/com.discordapp.Discord/config/discord" && BD_ASAR=betterdiscord.asar && wget --timestamping -P "${DISC_CONFIG}/../BetterDiscord/data" -- "https://github.com/BetterDiscord/BetterDiscord/releases/latest/download/${BD_ASAR}" && DISC_VER="$(ls --sort=time --time=creation "${DISC_CONFIG}" | grep -E -m 1 '^[0-9]+\.[0-9]+\.[0-9]+$')" && echo -e "require('../../../../BetterDiscord/data/${BD_ASAR}');\nmodule.exports = require('./core.asar');" | tee "${DISC_CONFIG}/${DISC_VER}/modules/discord_desktop_core/index.js" && echo -e "\nBetterDiscord installed. Restart Discord if currently running." || echo -e "\nInstallation failed."
DISC_CONFIG
variable at the start of the line, by only modifying the path that comes after HOME/
..var/app/com.discordapp.Discord/config/discord
.config/discord
.var/app/com.discordapp.DiscordCanary/config/discordcanary
.config/discordcanary
Just run that command, and it will do the following:
betterdiscord.asar
file modification timestamp.betterdiscord.asar
into Discord's loader script for the latest installed Discord version (version is auto-detected).That's it. Just save this command somewhere. Run it once. That's it. Run it again when you want to update BetterDiscord. You can run it as many times as you want, since it won't change anything if BetterDiscord is already installed and up-to-date.
You can even make an alias in your ~/.zshrc
or ~/.bashrc
if you want to easily run this command in your terminal anytime in the future:
alias betterdiscord-update="DISC_CONFIG=\"\$HOME/.var/app/com.discordapp.Discord/config/discord\" && BD_ASAR=betterdiscord.asar && wget --timestamping -P \"\${DISC_CONFIG}/../BetterDiscord/data\" -- \"https://github.com/BetterDiscord/BetterDiscord/releases/latest/download/\${BD_ASAR}\" && DISC_VER=\"\$(ls --sort=time --time=creation \"\${DISC_CONFIG}\" | grep -E -m 1 '^[0-9]+\\.[0-9]+\\.[0-9]+\$')\" && echo -e \"require('../../../../BetterDiscord/data/\${BD_ASAR}');\\nmodule.exports = require('./core.asar');\" | tee \"\${DISC_CONFIG}/\${DISC_VER}/modules/discord_desktop_core/index.js\" && echo -e \"\\nBetterDiscord installed. Restart Discord if currently running.\" || echo -e \"\\nInstallation failed.\""
(Be sure to set your personal DISC_CONFIG
path here if you aren't using the default Flatpak version of Discord.)
Note that GitHub presents oneliners as a very long line. Be sure to copy these correctly, or use the "copy text" button that GitHub provides.
As for long-term usage and updates, it's very simple too: When Discord starts up, BetterDiscord always does a version check and shows a popup screen to let you know when a new version is available.
In some situations, Discord updates will break BetterDiscord so that it doesn't load at all, and in that case you won't see any notification, but you'll easily notice that BetterDiscord isn't working anymore. In that case, simply run my command to update BetterDiscord to the latest version.
In both scenarios, it's literally brainless. You don't have to think at all. You just look at the built-in Discord notification saying that a new BetterDiscord version is available, or you notice that BetterDiscord is suddenly broken, and you do the update.
It's that easy! :star:
Have fun! I hope this helps someone else who just wants a simple, clean and totally safe way to install BetterDiscord for Linux Flatpaks and Native alike, while also helping you effortlessly install BD regardless of whether you use Discord or the Discord CANARY client! This is important since CANARY isn't supported by any of the other installation tools. :beach_umbrella:
In fact, if you're using the Flatpak version of Discord together with my installation method, then you will be totally protected along every step of the way, for both the installation of BetterDiscord itself (there's no malicous code in my script, which is super easy to audit), and you'll also be protected for the usage of all 3rd party plugins inside BetterDiscord itself (since they will run inside the Flatpak sandbox and won't be able to steal all your personal files). That's the installation method that I would recommend to people! :heart_decoration:
Hey! Thanks for that! Got BetterDiscord now!
@Peremious Awesome. You're welcome! That was a quick reply! It's nice to have this clean installation method, so that you don't have to trust 3rd party installers.
With this you're able to install it totally safely, and then the Flatpak Discord sandbox takes care of the rest by ensuring that BetterDiscord and its plugins can't do anything malicious while they're running either.
Flatpak and this little script is really the safest way to install and run BetterDiscord. Sure, I saw the other solution ("betterdiscordctl"), but it relied on running some random person's super messy, over-engineered and self-updating code which I'm never gonna do unless the people behind it are extremely trustworthy. ;)
Anyway, have a great day and take care! :) Remember to join the official discord at https://betterdiscord.app/ if you need help with anything.
how about dont leave an (ironically) bloated response to something with a command that might as well be as unverifiable as betterdiscordctl that youre criticising, and the appimage exists because it's a linux port of the installer (which is what this repo is for in the first place).
Moving all discussion to #157
Is your feature request related to a problem? Please describe. I can't install Better Discord with the Flatpak version of Discord installed.
Describe the solution you'd like I'd like to have integration for the Flatpak version of Discord. A lot of linux apps are already moving to Flatpak, as it is more secure because it is set in its own sandbox.
Describe alternatives you've considered N/A
Additional context N/A