how to virtualise discord for muslcels
in this blog i decided to do some community service like the sensible nigger i am, in this case, demonstrating my humility and best intentions for the linux community, i do what nobody does, which is being helpful, this tutorial will help anyone willing to virtualise electron apps like discord or spotify in an easy reproducible way across systems, while this approach appears bloated to the suckless minimalistic shill, there is no simpler way of doing this that doesn’t imply complexity or bloat.
what you get in return?
- the latest version of discord, always (because arch repos are up to date asf), without using arch linux with soystemd
- same setup for all linux systems, bsd systems are not supported because they don’t have linux cgroups, ie no docker
- no retarded daemons necessary, because we are using podman
- the only way to get proprietary garbage to run on musl-based distros
requirements
- distrobox and podman
- a container image registry like docker.io or ghcr.io (edit /etc/containers/registries.conf)
- a working wayland installation (xorg is bloated garbage)
1. install distrobox
use your preferred package manager.
for example, using xbps (void linux):
doas xbps-install -Syu distrobox
2. setup podman and registries
install podman:
doas xbps-install -S podman
then, edit /etc/containers/registries.conf and add some registries if not present:
[[registry]]
location = "docker.io"
[[registry]]
location = "ghcr.io"
[[registry]]
location = "quay.io"
3. create a container
we use arch as the packages are rarely outdated:
distrobox create -n pkg -i archlinux:latest
note: don’t specify a custom home path, it may cause discord’s file dialogs to open in the wrong location.
4. ensure xwayland is present (wayland users only)
if you’re on wayland, make sure you got xwayland installed:
doas xbps-install -S xorg-server-xwayland
without it, dbus might mysteriously break. shout out to the retards who designed dbus
5. enter the container
distrobox enter pkg
this shit might sometimes randomly break, just try it out a few times with different images different names and different setups, might even be worth trying different distros
6. install required stuff
audio:
sudo pacman -Syu pulseaudio pipewire alsa-lib opus
video (e.g: nvidia):
sudo pacman -Syu mesa mesa-dri nouveau
core discord deps:
sudo pacman -Syu glibc alsa-lib gcc-libs dconf libnotify nspr nss libxss libxtst
7. install discord
sudo pacman -Syu discord
easy, innit?
8. bonus: works with spotify too
just install spotify-launcher, it’s pretty much the same.
troubleshooting
- verify elogind is working.
- verify dbus and xwayland are working.
nothing works because you are retarded? email me personally at yehorovye@disroot.org and i’ll try to assist you.
kudos to yuzu, i pretty much stole this blogpost from him. <3