Skip to main content

Discord

Discord is a proprietary, cross-platform, all-in-one voice and text chat application.

Install Discord from the repositories:

pacman -S discord 

Or the official Flatpak app:

flatpak install com.discordapp.Discord

ScreensharingRich onPresence Waylandwith Flatpak

Currently,Discord it'sprovides nota possibleUnix socket file that games and applications use in order to reliablyshow sharewhat yourgame screenor duringmedia is currently being played.

The Flatpak version creates this socket in a calldifferent location than the repo package version. In order for games and apps to still be able to communicate with the Discord onapp, Wayland.a Thesymbolic currentlink betaneeds buildsto havebe supportcreated for native screensharing, but sharing audio only works with pulseaudio asin the primaryusual soundplace, server.pointing to the location of the socket file of the Flatpak version.

An alternative client, called Vesktop, has full native support for screen sharing with Discord on Wayland with audio. Itsystemd-tmpfiles can be used insteadto automatically create this link upon logging into the desktop session.

Create the directory user-tmpfiles.d in your user's .config directory:

mkdir -p ~/.config/user-tmpfiles.d

In the newly created directory, create a new config file:

nano discord-ipc.conf

systemd-tmpfiles uses the information in the config file to create temporary files as long as the user is logged in and remove them once the user logs out.

The fields in this file are space separated. The fields are as follows:

Field Description Type The type of file to create. L = symbolic link, d = directory, f = regular file. Path Path where to create the object. %t = signifier for user-specific temporary directory. Mode File permissions in octal notation. - means keep the default. Owner User who will own the file. - means keep the default. Group Group who will own the file. - means keep the default. Time Expiration time of the officialfile, e.g. 2h deletes the files after 2 hours. - means no expiration time. Options Parameters specific to the type used in the type field. When L, it's the target the link will point to.

In order for the link to point to the Discord app.

socket

Install it fromof the AUR:Flatpak version, the resulting config file looks like this:

yayL %t/discord-ipc-0 -S vesktop- - - app/com.discordapp.Discord/discord-ipc-0

This will create a symbolic link at /run/user/1000/discord-ipc-0 pointing to the actual socket file at /run/user/1000/app/app/com.discordapp.Discord/discord-ipc-0 where the Flatpak version of Discord is listening on incoming connections from other apps and games.

systemd-tmpfiles will not automatically pick up on the new config file automatically. Either log out and log back in to trigger the systemd-tmpfiles user unit, or run systemd-tmpfiles --user --create manually to have systemd-tmpfiles create the link.