Discord: Difference between revisions
improve the troubleshooting format |
Add infobox application widget for discord |
||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{{Infobox application | |||
| name = Discord | |||
| type = instant messaging and VoIP social platform | |||
| image = Discord-Symbol-Blurple.svg | |||
| developer = Discord Inc. | |||
| website = https://discord.com/ | |||
| platform = Cross-platform (Linux, macOS, Windows, Web) | |||
| github = https://github.com/discord | |||
}} | |||
Discord is an instant messaging and VoIP application with lots of functionality. It provides a web interface, though most users would prefer to use a client for interoperability with their system. | Discord is an instant messaging and VoIP application with lots of functionality. It provides a web interface, though most users would prefer to use a client for interoperability with their system. | ||
== Installation == | == Installation == | ||
{{ | {{tip/unfree}} | ||
=== Official Clients === | === Official Clients === | ||
| Line 55: | Line 65: | ||
==== Vencord<ref>https://vencord.dev/</ref> ==== | ==== Vencord<ref>https://vencord.dev/</ref> ==== | ||
The cutest Discord client mod. | The cutest Discord client mod. The standalone Vencord client can be installed by overriding the official Discord package via <code>withVencord = true</code>. | ||
{ config, lib, pkgs, ... }: { | {{File|3={ config, lib, pkgs, ... }: { | ||
environment.systemPackages = with pkgs; [ | environment.systemPackages = with pkgs; [ | ||
(discord.override { | (discord.override { | ||
# withOpenASAR = true; # can do this here too | # withOpenASAR = true; # can do this here too | ||
| Line 65: | Line 73: | ||
}) | }) | ||
]; | ]; | ||
} | }|name=/etc/nixos/configuration.nix|lang=nix}} | ||
</ | |||
==== Vesktop<ref>https://github.com/Vencord/Vesktop</ref> ==== | |||
As opposed to just Vencord, the same developers also offer an integrated solution which aims to make the Linux experience better. | |||
It can be neatly managed via [[Home Manager]], or just installed as a regular package via <code>pkgs.vesktop</code>. | |||
{{File|3={ config, lib, pkgs, ... }: { | |||
... | |||
programs.vesktop = { | |||
enable = true; | |||
vencord.settings = { | |||
autoUpdate = true; | |||
autoUpdateNotification = true; | |||
notifyAboutUpdates = true; | |||
plugins = { | |||
ClearURLs.enabled = true; | |||
FixYoutubeEmbeds.enabled = true; | |||
}; | |||
}; | |||
}; | |||
... | |||
}|name=home.nix|lang=nix}} | |||
==== Webcord<ref>https://github.com/SpacingBat3/WebCord</ref> ==== | ==== Webcord<ref>https://github.com/SpacingBat3/WebCord</ref> ==== | ||
| Line 79: | Line 109: | ||
== Troubleshooting == | == Troubleshooting == | ||
=== | === Screen sharing on Wayland === | ||
Discord | Since December 2024, Discord Canary supports screen sharing on Wayland. Alternatively, you can use the web version on a browser that supports screen sharing on Wayland, or an [[Discord#Unofficial Clients|unofficial client]] like ''Webcord'' or ''Vesktop'', both of which have fixed this issue in their own ways. | ||
{{Note|Remember to configure an [https://wiki.archlinux.org/title/XDG_Desktop_Portal#List_of_backends_and_interfaces XDG Desktop Portal] with screen cast capabilities!}} | {{Note|Remember to configure an [https://wiki.archlinux.org/title/XDG_Desktop_Portal#List_of_backends_and_interfaces XDG Desktop Portal] with screen cast capabilities!}} | ||
| Line 105: | Line 135: | ||
=== Krisp noise suppression === | === Krisp noise suppression === | ||
The Krisp noise suppression option will not work on NixOS because the Discord binary is patched before installation, and there is a DRM-style integrity check in the Krisp binary which prevents Krisp from working if the Discord binary is modified. See https://github.com/NixOS/nixpkgs/issues/195512 for details. | The Krisp noise suppression option will not work on NixOS because the Discord binary is patched before installation, and there is a DRM-style integrity check in the Krisp binary which prevents Krisp from working if the Discord binary is modified. See https://github.com/NixOS/nixpkgs/issues/195512 for details. | ||
==== Python Script Workaround ==== | |||
{{Warning|The usage of such modifications goes against Discord's [https://discord.com/terms Terms of Service] and Krisp's [https://krisp.ai/terms-of-use/ Terms of Use] and can result in your Discord account being terminated and/or being banned from using Krisp's services!}} | |||
One way to enable Krisp noise suppression is by patching the <code>discord_krisp.node</code> binary to bypass its DRM verification. Below is a Nix configuration that creates a Python script that patches the binary by modifying specific bytes to bypass the license check: <syntaxhighlight lang="nixos">{ pkgs, ... }: | |||
let | |||
krisp-patcher = | |||
pkgs.writers.writePython3Bin "krisp-patcher" | |||
{ | |||
libraries = with pkgs.python3Packages; [ | |||
capstone | |||
pyelftools | |||
]; | |||
flakeIgnore = [ | |||
"E501" # line too long (82 > 79 characters) | |||
"F403" # 'from module import *' used; unable to detect undefined names | |||
"F405" # name may be undefined, or defined from star imports: module | |||
]; | |||
} | |||
( | |||
builtins.readFile ( | |||
pkgs.fetchurl { | |||
url = "https://pastebin.com/raw/8tQDsMVd"; | |||
sha256 = "sha256-IdXv0MfRG1/1pAAwHLS2+1NESFEz2uXrbSdvU9OvdJ8="; | |||
} | |||
) | |||
); | |||
in | |||
{ | |||
environment.systemPackages = [ | |||
krisp-patcher | |||
]; | |||
} | |||
</syntaxhighlight> | |||
{{Note|As of version 0.0.76, the script works. But, future versions of Discord may break the script. Therefore, you should not rely on this script for long-term use. For the latest updates and more details, follow https://github.com/NixOS/nixpkgs/issues/195512.}} | |||
After adding this to your Nix configuration and rebuilding, make sure Discord is completely closed, and then run: | |||
<pre>$ krisp-patcher ~/.config/discord/0.0.76/modules/discord_krisp/discord_krisp.node</pre> | |||
Once you restart Discord and join a VC, you should see a sound wave icon to the left of the hangup icon. | |||
=== Text-to-Speech === | === Text-to-Speech === | ||