Crosspost: How To Play Team Fortress 2 on Fedora Linux

[this guide was originally posted in the Team Fortess 2 workshop page on steam by us on September 9th, 2023. it currently works on our fedora device but will be updated if this changes/this article needs updating!]

this fix is based on this guide, which has been marked as broken. following these instructions should allow you to play tf2 on your fedora device


Installing Steam

update your system before installing anything!

you can use the flatpak or RPM version of steam for this fix to work.

Installing Packages

here is what you need to put into the terminal:

	       
sudo dnf install gperftools gperftools-devel gperftools-libs.i686
	       
	   

this will install some necessary packages

Fixing Audio

next, input:

	       
sudo dnf copr enable kylegospo/hl2linux-selinux
	           
sudo dnf install hl2linux-selinux
	       
	   

after doing this, i continued having issues hearing voice lines (more specifically, tf2 was unable to create decoders for the voice line mp3 files). in order to fix this, input:

	       
sudo setsebool -P selinuxuser_execheap 1
	       
	   

Installing Team Fortress 2

then install tf2. make sure you are using the linux version, and not the proton version (which will crash upon loading into multiplayer). steam will sometimes autoupdate tf2 and replace the linux files with proton files, which can be solved by going into properties -> compatabiliy -> force the use of steam compatability tool and checking and unchecking the box. this will reinstall linux tf2, so you will have to re-add the symlink in the next step

Adding Symlink

access the tf2 files through manage -> browse local files, go into the bin folder, and delete libtcmalloc_minimal.so.4. open the terminal in the bin folder, and enter:

	       
ln -s /lib/libtcmalloc_minimal.so.4
	       
	   

Yayy! You Did It!

after this you should be set! this fix should allow you to play tf2, and play multiplayer if you wish!