Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install BetterDiscord on Linux

Install BetterDiscord on Linux

This Gist contains simple instructions on how to install, update, and uninstall BetterDiscord on Linux.

For more thorough documentation, take a look at betterdiscordctl's README.

Do NOT submit issues here as I don't check the comments. You should submit them here instead.

Install dependencies

Git

Install using your package manager

Install betterdiscordctl

$ curl -O https://raw.githubusercontent.com/bb010g/betterdiscordctl/master/betterdiscordctl
$ chmod +x betterdiscordctl
$ sudo mv betterdiscordctl /usr/local/bin

You can then keep betterdiscordctl up to date with this command:

$ sudo betterdiscordctl upgrade

Install BetterDiscord

Replace [COMMAND] with install to install BD for the first time, update to update BD to the latest version, reinstall to reinstall BD after a Discord update, or uninstall to uninstall an existing installation.

  • For Stable
$ betterdiscordctl [COMMAND]
  • For PTB
$ betterdiscordctl [COMMAND] -f PTB
  • For Canary
$ betterdiscordctl [COMMAND] -f Canary
  • For Snap
$ betterdiscordctl [COMMAND] --snap
  • For Flatpak
$ betterdiscordctl [COMMAND] --flatpak

Common Issues

Discord intallation not found

Point betterdiscordctl to the correct path with the --scan flag.

Discord modules directory not found or Config directory not found

Discord has to be started at least once to create the necessary directories before using betterdiscordctl.

git : command not found

You don't have git installed. Install it and try again.

Credits

BetterDiscord by Jiiks

Bandaged BD by Zerebos (rauenzi)

betterdiscordctl by bb010g

@YamiYukiSenpai

This comment has been minimized.

Copy link

YamiYukiSenpai commented Feb 11, 2018

Does this work with the Snap version of Discord?
Edit: any plans on making this work with Snap version of Discord?

@ObserverOfTime

This comment has been minimized.

Copy link
Owner Author

ObserverOfTime commented Feb 11, 2018

Updated to work with the Snap version of Discord.

@RemixSlay

This comment has been minimized.

Copy link

RemixSlay commented Feb 15, 2018

Tried to install stable and this happened
Error: Cannot find module './core'
at Module._resolveFilename (module.js:470:15)
at Function.Module._resolveFilename (/usr/share/discord/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/root/.config/discord/0.0.4/modules/discord_desktop_core/index.js:1:173)
at Object. (/root/.config/discord/0.0.4/modules/discord_desktop_core/index.js:2:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)

@ghost

This comment has been minimized.

Copy link

ghost commented Feb 17, 2018

image
I'm getting the same problem when installing into both Discord Canary and Discord. (Ubuntu MATE) That said, I don't know to reverse this either, so I've been using the snap version of Discord without trying to install BetterDiscord.

edit:
You can fix this error by deleting the discordcanary folder in /.config/ and discord-canary in /usr/share, then reinstalling it. I'd imagine you can do the same with the Discord stable as well. Have not been able to get BetterDiscord working though.

edit 2:
Got it to work, but I merely just followed the instructions here again. If all else fails I suggest going to the BetterDiscord2 server and searching "linux in:faq" for answers rather than asking.

@ObserverOfTime

This comment has been minimized.

Copy link
Owner Author

ObserverOfTime commented Feb 18, 2018

@RemixSlay Don't install with sudo.

@RemixSlay

This comment has been minimized.

Copy link

RemixSlay commented Feb 20, 2018

didnt use sudo, im on the root account....

@RemixSlay

This comment has been minimized.

Copy link

RemixSlay commented Feb 20, 2018

i did what @vozycozyx said and i got back into discord

@TheBNK3R

This comment has been minimized.

Copy link

TheBNK3R commented Mar 12, 2018

ERROR: Discord installation not found.

@miakx

This comment has been minimized.

Copy link

miakx commented Mar 13, 2018

I got the same error as Trihash, even on Stable or Snap, the config directory isn't found (though it not exists).

@ObserverOfTime

This comment has been minimized.

Copy link
Owner Author

ObserverOfTime commented Mar 15, 2018

@Trihash You will need to elaborate more on the issue you have sumbitted.
@miakx Please check the same issue and comment there if it remains unsolved for you.

@Shardvex

This comment has been minimized.

Copy link

Shardvex commented May 3, 2018

@Trihash - maybe you got the wrong installation directory. See where discord files are located using the following command:

find / -name discord 2> /dev/null

As it turns out, /opt worked for me.

@PrismaticYT

This comment has been minimized.

Copy link

PrismaticYT commented May 13, 2018

ERROR: Discord installation not found
I tried /usr/bin/discord and /usr/share/discord, neither worked. It's not in /opt (/opt is empty.)

@accoll

This comment has been minimized.

Copy link

accoll commented May 21, 2018

I didn't get any errors, It seems to have installed fine, but, the status says the app is not patched and it doesn't appear to have changed the discord app at all.

@SpencerO7

This comment has been minimized.

Copy link

SpencerO7 commented May 29, 2018

@ObserverOfTime

i put betterdiscordctl install -s /usr/share and this came out
WARN: Config directory not found for (/usr/share/discord, /home/spencer/.config/discord).
ERROR: Discord installation not found.

@jkrx

This comment has been minimized.

Copy link

jkrx commented Aug 20, 2018

Ok people if it says

WARN: Config directory not found for (/usr/share/discord, /home/spencer/.config/discord).
ERROR: Discord installation not found.

Then you are trying to install betterdiscord into the wrong directory. RTFM.

@ghost

This comment has been minimized.

Copy link

ghost commented Aug 27, 2018

Well, i tried to install Better Discord on my Lubuntu 16.04 but...
This happens here, what i should do?

Print is here https://cdn.discordapp.com/attachments/472857389628915723/483767139807789086/DiscordError.png

@atomize

This comment has been minimized.

Copy link

atomize commented Aug 30, 2018

Solved this by using parent of binary root folder as path. With Discord binary @ /usr/bin/discord using betterdiscordctl install -s /usr worked [even though docs say to use path to binary root folder /usr/bin].

On Lubuntu 18.04, fresh discord install which discord returns /usr/bin/discord. I was getting the error ERROR: Discord installation not found when running betterdiscordctl install -s /usr/bin/. Using /usr as the [PATH] instead of the suggested path was successful.

@TacoRaptor67

This comment has been minimized.

Copy link

TacoRaptor67 commented Jan 18, 2019

When I try installing I get:
Class constructor LRUCache cannot be invoked without 'new'
Along with:
/asar.js: No such file or directory
I have node (v8.11.2) and npm (5.8.0) installed. I noticed Common Issues and tried installing asar, but I get:
Class constructor LRUCache cannot be invoked without 'new'
What am I doing wrong?

@UMLAUTaxl

This comment has been minimized.

Copy link

UMLAUTaxl commented Jan 23, 2019

big thanks! works with 0.0.8 in debian stretch (backport: nodejs 8.11.1~dfsg-2~bpo9+ and npm 5.8.0+ds6-2~bpo9+1).

@ProgrammingHider

This comment has been minimized.

Copy link

ProgrammingHider commented Feb 17, 2019

i get every time i try to use betterdiscordctl:

betterdiscordctl: line 1: 404:: comand not found

@Miyazono1

This comment has been minimized.

Copy link

Miyazono1 commented Apr 12, 2019

tried using stable instead of snap or flatpak, and i used -s /usr/share to find the installation, which it detected, but if i ran the install command it still says no discord installation found. i'm on Pop OS 18.10.

@SeikatsuChan

This comment has been minimized.

Copy link

SeikatsuChan commented Apr 22, 2019

Seems to have installed just fine, however there are no changes in my client? (using Canary on Mint 19.1 if it helps at all)

@youwereeatenbyalid

This comment has been minimized.

Copy link

youwereeatenbyalid commented May 14, 2019

In case you don't know already, there's a new injection method needed to prevent some stuff like transparency from breaking.

@ObserverOfTime

This comment has been minimized.

Copy link
Owner Author

ObserverOfTime commented May 16, 2019

@youwereeatenbyalid I suggest you submit an issue on the repo, or a PR to the next branch if possible.

@ogkloo

This comment has been minimized.

Copy link

ogkloo commented May 21, 2019

Solved this by using parent of binary root folder as path. With Discord binary @ /usr/bin/discord using betterdiscordctl install -s /usr worked [even though docs say to use path to binary root folder /usr/bin].

On Lubuntu 18.04, fresh discord install which discord returns /usr/bin/discord. I was getting the error ERROR: Discord installation not found when running betterdiscordctl install -s /usr/bin/. Using /usr as the [PATH] instead of the suggested path was successful.

I tried something very similar to this. which discord returns /usr/bin/discord, however changing it to /usr/bin, /usr/, / doesn't change anything. Will always output Discord installation not found.

@yumenetwork

This comment has been minimized.

Copy link

yumenetwork commented May 30, 2019

Hi,
I've updated betterdiscord and now it doesn't launch with discord. I mean it's installed but doesn't work when I run discord.

Running SolusOS & discord from repo.
It was working but now it's broke.

Could u help me ?

@ObserverOfTime

This comment has been minimized.

Copy link
Owner Author

ObserverOfTime commented May 30, 2019

betterdiscordctl was updated to use BBD's new injection method. Upgrade betterdiscordctl to the latest version (currently 1.6.0) and follow these instructions to reinstall BBD.

P.S. Please do not comment on this gist. Check the issue tracker and submit a new one if you can't find your issue.

@youwereeatenbyalid

This comment has been minimized.

Copy link

youwereeatenbyalid commented May 31, 2019

Can confirm, the issue is fixed. Thank you very much.

@sKirua

This comment has been minimized.

Copy link

sKirua commented Jul 4, 2019

image

@b4rc0z

This comment has been minimized.

Copy link

b4rc0z commented Jul 13, 2019

@sKirua Come on discord to see the problem. ;)

@Vnersack

This comment has been minimized.

Copy link

Vnersack commented Jul 20, 2019

I think I use snap discord(?) (my dad helped me with it) (it's like not the actual discord, we used a different way to install it?) but I can't get the betterdiscordctl --snap command to work at all, on any and every directory I try it with. It doesn't find discord.

I use Fedora 28.

@Joey-png

This comment has been minimized.

Copy link

Joey-png commented Jul 24, 2019

i ended up having to manually create 2 directories then it installed perfectly!

@Joey-png

This comment has been minimized.

Copy link

Joey-png commented Jul 24, 2019

never mind i got the same java error as @sKirua

@anon-alt

This comment has been minimized.

Copy link

anon-alt commented Nov 3, 2019

how do i find my program fiels with flatpak so I can use --scan ?
(sorry if the question is stupid I am a noob)

@justiceserv

This comment has been minimized.

Copy link

justiceserv commented Nov 5, 2019

Betterdiscordctl find my modules file, (when I use betterdiscordctl)however, it would say that modules directory not found when I use command sudo betterdiscordctl install --snap.
Does anybody solved this error?

@HideakiAtsuyo

This comment has been minimized.

Copy link

HideakiAtsuyo commented Nov 30, 2019

What is the directory for --modules?

@dumbeur

This comment has been minimized.

Copy link

dumbeur commented Jan 21, 2020

For @Dany-LF and others looking for the modules directory, it'll be similar to this, if not identical in most cases:

--modules=~/.config/discord/0.0.9/modules

@jul-reb

This comment has been minimized.

Copy link

jul-reb commented Jan 31, 2020

I guess I'll write something of a guide for people who don't know how to identify what options they need or can't find their modules folder.

If you can't find your modules folder, enter the following command in the terminal while discord is running:
lsof | grep discord | grep modules
If the path to modules contains "snap" in it, then you need to use the --snap option next to supplying the --modules <modulesfolder> parameter.
Make sure you aren't running the install command using sudo! It won't work c:

@ZeroOne1337

This comment has been minimized.

Copy link

ZeroOne1337 commented May 7, 2020

I guess I'll write something of a guide for people who don't know how to identify what options they need or can't find their modules folder.

If you can't find your modules folder, enter the following command in the terminal while discord is running:
lsof | grep discord | grep modules
If the path to modules contains "snap" in it, then you need to use the --snap option next to supplying the --modules <modulesfolder> parameter.
Make sure you aren't running the install command using sudo! It won't work c:

this should be added before the "install" instructions, very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.