Skip to content

Instantly share code, notes, and snippets.

@lnoering
Created July 19, 2018 21:55
Show Gist options
  • Save lnoering/e914013e2b8699327ef44b62862e9ac1 to your computer and use it in GitHub Desktop.
Save lnoering/e914013e2b8699327ef44b62862e9ac1 to your computer and use it in GitHub Desktop.
Install discord (for the .tar.gz)
#!/usr/bin/env bash
cd ~/
mkdir -p ~/.local/bin
wget "https://discordapp.com/api/download/canary?platform=linux&format=tar.gz" -O discord.tar.gz
tar -xvf discord.tar.gz -C ~/.local/bin
sudo ln -s ~/.local/bin/DiscordCanary/discord.png /usr/share/icons/discord.png
sudo ln -s ~/.local/bin/DiscordCanary/DiscordCanary /usr/bin
wget https://gist.githubusercontent.com/AdrianKoshka/a12ca0bfe2f334a9f208aff72f8738c3/raw/9d606ad7ce7cc1dd23f6a99993e2396540538a02/discord.desktop -O discord.desktop
mkdir -p ~/.local/share/applications/
mv ~/discord.desktop ~/.local/share/applications/
sudo ln -s ~/.local/share/applications/discord.desktop /usr/share/applications/discord.desktop
@CODERs-LOADER
Copy link

what is the command to run it?

@lnoering
Copy link
Author

lnoering commented Jan 18, 2023

@CODERs-LOADER

what is the command to run it?

1 - Download the file
2 - Use bash to run:
> bash install-discord.bash

@SoftBlade7
Copy link

SoftBlade7 commented Aug 21, 2023

i tried it, it did everything but it doesn't appear in the app list?

edit: i found out that the discord.desktop file is broken for some reason

@lnoering
Copy link
Author

lnoering commented Aug 21, 2023

@Raouferman

It's old, probably the format of discord.desktop need be change.

I can't test this because I'm not using Linux anymore.
If you know more things from linux you can create or get other "application" .desktop and change to see if works.

Good luck, and let me know if you have success.

@CrawKatt
Copy link

CrawKatt commented Sep 5, 2023

I installed it this way in opt

bash script here

#!/bin/bash
cd ~/Downloads
# Replace discord-x.x.x.tar.gz with your Discord downloaded version
sudo tar -xvzf discord-x.x.x.tar.gz -C /opt
sudo ln -sf /opt/Discord/Discord /usr/bin/Discord
sudo nano /opt/Discord/discord.desktop
sudo cp -r /opt/Discord/discord.desktop /usr/share/applications

if anyone has any suggestions for improving the script, do not hesitate to comment.

@Asriel115
Copy link

Why the canary branch? Most people use the regular stable release

@Asriel115
Copy link

Asriel115 commented Mar 7, 2024

what is the command to run it?

make sure it has execution permissions first then cd into the directory where the .sh file is located through the terminal and then do sh ./script-name.sh and it will execute the script

@lnoering
Copy link
Author

@Asriel115

I used that on that time by some reason I don't remember anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment