Installing Discord on Debian testing/bookworm
Mon 14 February 2022 — download

My beloved ThinkPad x230 is dying, so I had to migrate away from it. Amongst the software I had to re-install on my new machine was Discord because we're using it at OpenMW and navidrome. Unfortunately, its package is broken, because it's depending on libappindicator3-1 which isn't required nor packaged in bookworm, so here is a copy-pasteable walk-through on how to install it:

$ wget https://dl.discordapp.net/apps/linux/0.0.17/discord-0.0.17.deb
$ dpkg-deb -x discord-0.0.17.deb unpack
$ dpkg-deb --control discord-0.0.17.deb
$ mv DEBIAN unpack
$ sed -i s/libappindicator[^,]\+,// ./unpack/DEBIAN/control
$ dpkg -b unpack discord-fixed.deb
$ su -
# dpkg -i discord-fixed.deb
Selecting previously unselected package discord.
(Reading database ... 1337 files and directories currently installed.)
Preparing to unpack discord-fixed.deb ...
Unpacking discord (0.0.17) ...
Setting up discord (0.0.17) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for gnome-menus (3.36.0-1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
#^D
$ command -v discord                                     
/usr/bin/discord
$ 

A cleaner alternative would be to use equiv to build a phony libappindicator3-1 package instead.