Discord

提供: ArchWiki
2022年10月22日 (土) 23:13時点におけるAshMyzk (トーク | 投稿記録)による版 (→‎Enabling rich presence on Flatpak: 翻訳)
ナビゲーションに移動 検索に移動

Discord はプロプライエタリで、クロスプラットフォームの、オールインワンなボイス・テキストチャットアプリケーションです。多くのオープンソースコミュニティが公式の Discord サーバを持っています。Discord は、Web ブラウザで使うこともできますし、(Electron で作成されている) デスクトップアプリケーションから使うこともできます。

インストール

以下のパッケージのうちどれかを使って Discord のデスクトップアプリケーションをインストールできます:

警告: サードパーティのクライアントや、Discord クライアントを改造する非公式のパッケージやアプリケーションの使用は、DISCORDサービス利用規約違反となり、あなたのアカウントが Ban される場合があります。そのようなパッケージを使用する際は、あなたがすべての責任を負うことになります。バージョンの古いクライアントや放棄されたクライアントの使用は避けてください。Discord の API のアンチスパムシステムに引っかかり、その結果あなたのアカウントが Ban される可能性があるからです。

グラフィカルなクライアント

公式アプリケーション

システムの electron を使用する公式クライアント

セキュリティ向上と潜在的なパフォーマンス向上のために、システムで提供される electron を使用する公式クライアント:

サードパーティのクライアント

  • Abaddon — C++/gtkmm で作成された代替の Discord クライアント。
https://github.com/uowuo/abaddon || abaddonAUR
  • Fast-Discord — C++ と Qt で作成された新しい Discord クライアント。
https://github.com/EnyoYoen/Fast-Discord || fast-discord-gitAUR
  • gtkcord4 — Go で記述された GTK4 Discord クライアント。
https://github.com/diamondburned/gtkcord4 || gtkcord4-gitAUR
  • Ripcord — Slack と Discord のようなグループ中心型サービスのための、Qt toolkit 上に構築された、軽量のプロプライエタリなデスクトップチャットクライアント。
https://cancel.fm/ripcord/ || ripcordAUR
  • WebCord — Discord ウェブクライアントのラッパ。プライバシーを向上し、Wayland 上でのスクリーン共有を可能にします。
https://github.com/SpacingBat3/WebCord || webcordAUR

コマンドラインのクライアント

CLI ベースのサードパーティ製クライアントが AUR 上 に多数存在しています (GitHub 上にもパッケージングされていないものが存在します)。しかし、それらのうち殆どは非推奨となっているか壊れています。discordo はメンテナンスされており、さらに AUR 上に discordo-gitAUR としてパッケージングされています。

チャットクライアントプラグイン

カスタム CSS & プラグイン

  • BetterDiscord — CSS とプラグインを使えるように Discord を改造するプロジェクトです。
https://betterdiscord.app/ || betterdiscord-installerAUR
  • Discocss — Discord クライアントにカスタムの CSS をインジェクトできるシンプルなスクリプトです。discord-ptbAURdiscord-canary のバージョンに CSS をインジェクトするには、discord フォルダ内の記述をすべて使用するバージョンに置き換えてください。
https://github.com/mlvzk/discocss || discocss-gitAUR
  • Replugged — Powercord のフォーク。軽量の Discord クライアント MOD。シンプリシティとパフォーマンスにフォーカスを置いています。
https://github.com/replugged-org/replugged || replugged-electron-gitAUR

オーバーレイ

Linux クライントでは、Discord はゲーム内オーバーレイをサポートしていません。discover-overlayAUR は、オープンソースの GTK アプリケーションで、そのような機能を提供します。Discover は X11 や wlroots 環境で機能します。

ヒントとテクニック

GNOME top bar icon

If you would like to have the icon on the top bar of GNOME, install the AppIndicator and KStatusNotifierItem Support extension and libappindicator-gtk3.

Discord asks for an update not yet available in the repository

Discord will refuse to launch if there is an update available. If the updated version is not yet available in the official repos, you can build and install the updated package using the Arch Build System.

To disable the update check, add the following to ~/.config/discord/settings.json:

  "SKIP_HOST_UPDATE": true

Or you can cheat. Check for discord's path:

file $(which discord)

and cd to where the symbolic link points. In this directory (probably /opt/discord/) edit the file resources/build_info.json that should look like:

{
  "releaseChannel": "stable", 
  "version": "0.0.xx"
}

You can "upgrade" the version, and trick the launcher. All is reset in a future update.

Start Discord minimized

Discord can be started minimized through the --start-minimized argument.

Microphone noise suppression using pipewire (Krisp replacement)

Although Krisp is not available in Linux, you can achieve similar noise reduction level with PipeWire#Noise suppression for voice.

Getting Krisp

With binary from official website

Krisp is not yet included in the discord repo package but may be obtained by downloading the .zip-archive from the official discord website. Extract the archive and copy the Discord binary into the /opt/discord directory. After restarting Discord the option to enable Krisp will be available.

With flatpak

Install Flatpak , then install Discord from Flathub:

 flatpak install flathub com.discordapp.Discord

Screen sharing with audio

この記事またはセクションは加筆を必要としています。
理由: This looks like a good starting point for PipeWire: https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Virtual-Devices#create-a-sink (議論: トーク:Discord#)

Screen sharing with audio is not supported on Linux. Alternatives include:

Enabling Developer Tools

警告: Code that is pasted into the Console of the developer tools has the ability to steal your credentials and compromise your Discord account. Do not enable this unless you know what you are doing.

After a recent update, devtools were disabled by default on Discord for safety reasons. To re-enable them, add this to ~/.config/discord/settings.json:

  "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true

Enabling Text-to-Speech

By default, Text-to-Speech is disabled in the Discord client. However, it can be enabled using the --enable-speech-dispatcher flag. This utilizes the speech-dispatcher daemon to output the speech.

トラブルシューティング

ギルドをスクロールするときにラグい

ギルドをスクロールするときにラグやカクつきが発生する場合、ハードウェアアクセラレーションが正しく動作していることを確認してください。Chromium ベースのブラウザで chrome://gpu を開くことで、確認することができます。ハードウェアアクセラレーションが動作していない場合、Chromium#ハードウェアビデオアクセラレーション の内容を確認し、いくつか追加のオプションを付けて Discord を実行してみてください:

$ discord --ignore-gpu-blocklist --disable-features=UseOzonePlatform --enable-features=VaapiVideoDecoder --use-gl=desktop --enable-gpu-rasterization --enable-zero-copy

音声通話時に音が割れる

音声通話時に音声が割れる場合、PulseAudio/トラブルシューティング#音ズレ、音飛び、音割れ の記事の手順を試してみてください。

Wayland での画面共有

バージョン 0.0.17 現在、画面共有機能は Wayland 上では動作しません (/usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland を使って Wayland のための Ozone を有効化していたとしてもです)。この Reddit 投稿Discord バグレポート を見てください。

回避策として、Wayland 上での画面共有を完全にサポートする webcordAUR を使うことができます。しかし、Discord の Web バージョンをバンドルしているため、Rich Presence のような機能が不足しています。Web バージョン自体を使うこともできます。

Flatpak 版で Rich Presence を有効化する

Discord の Flatpak 版は、そのままでは Rich Presence が動作しません。動作させるには、$XDG_RUNTIME_DIR/discord-ipc-0 から $XDG_RUNTIME_DIR/app/com.discordapp.Discord/discord-ipc-0 へのシンボリックリンクを作成する必要があります。現在のユーザセッションでそのシンボリックリンクを作成するには、以下を実行してください:

$ ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-0

systemd-tmpfiles を使うことで、このシンボリックリンクを自動的に作成できます。~/.config/user-tmpfiles.d/ 内に拡張子 .conf のファイルを作成し、以下の行を追加してください:

L %t/discord-ipc-0 - - - - app/com.discordapp.Discord/discord-ipc-0

Discord becomes unresponsive during long calls

If Discord becomes unresponsive during long calls, try the --no-sandbox argument. You can also add the following to your .bashrc, or alias file for your shell:

alias discord='discord --no-sandbox'

Discord freezes after getting pinged or messaged

If a message that would trigger a notification (pings, DMs, servers with notifications on, etc) causes the client to freeze, the client is failing to find a notification server. To fix it without installing a notifications server, disable Enable Desktop Notifications in the Notifications options.

Notification sounds do not work with PipeWire

See PipeWire#No notification sounds from Discord.

Emojis are not rendered correctly

If you encounter rendering issues regarding emojis (rendering as rectangles for example), discord-canary-electron-binAUR has the appropriate fonts as optional dependencies. You should install ttf-symbolaAUR, noto-fonts-cjk, and noto-fonts-emoji.

Clicking link does not open the web browser

If clicking a link does not open a tab in your default web browser, you should install the xdg-utils optional dependency.

Sync with computer feature not working

Discord is parsing the following file to find which theme to apply:

$HOME/.config/gtk-3.0/settings.ini

and it is looking for these specific lines:

[Settings]
gtk-theme-name=Adwaita-dark

If you change the theme from Adwaita-dark to Adwaita, then Discord will automatically change to light version and vice-versa.

Note that Discord only supports a few popular themes, so if it does not work for your particular theme (in this example with Materia theme), a "dirty" fix would be to put the following in your settings.ini file:

[Settings]
gtk-theme-name=Adwaita-dark
gtk-theme-name=Materia-dark

The definition order is important because GTK will use the second variable definition so in this case Materia-dark but Discord will still successfully detect that you are using a dark theme by providing Adwaita-dark in the first variable definition of the GTK theme.

Blurry Discord icon in KDE Plasma system tray

You can attempt to fix this issue by installing libappindicator-gtk3 to replace libappindicator-gtk2, which is known to cause this issue.

Discord spams systemd journal

You may find that Discord creates a lot of messages in your journal in a format like:

(device_info_linux.cc:45): NumberOfDevices

To disable the logging that causes this pollution: go to User Settings, select "Voice & Video", scroll to bottom of the screen and disable "Debug Logging".