Updated: November 6, 2020
Before we dig into the tutorial itself, let's clarify something. The purpose of this article is not to discuss the moral or security implications for using TrueCrypt in 2020. If you're thinking: but wait, there's VeraCrypt, that's not the focus of this article. What I want to show you here are the technical details for how to get TrueCrypt running on a modern Linux distro, regardless of why or if you should.
It is possible you won't have any issues - grab the old TrueCrypt archive, extract, install, enjoy. But it is also possible that you've had a working copy of TrueCrypt, and now, come a system upgrade, it no longer works. If that's the case - happened me to when I upgraded my Vivobook Kubuntu Bionic to Focal - and you do not have the luxury to port your existing containers or risk your data, then let me outline the steps you need to have TrueCrypt running again.
Problem in more detail
Once I had the Vivobook upgraded, I noticed that TrueCrypt no longer launches. If you try from the command line, the error you will see is as follows:
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
truecrypt: error while loading shared libraries: libSM.so.6: cannot open shared object file: No such file or directory
Essentially, there are two issues. Two libraries are missing - libgtk3-nocsd and libSM, but while the latter can be satisfied (both in i386 and amd64 architectures), the former is no longer available as a 32-bit package on Focal. However, the library does exist in the 18.04 archives, and this is what we will use for our fix.
Two parts here. First, the easy one, install the missing libSM package:
sudo apt-get install libsm6:i386
Second, download the 32-bit version of the libgtk3-nocsd library from the Bionic archive:
Extract the deb package. There are multiple ways to do this. You can do this via right-click in the file explorer, using ar, tar and xz tools, or via dpkg. The ar tool is part of the binutils package, while xz is part of the xz-utils package. Grab these first if they aren't installed:
sudo apt-get install binutils xz-utils
ar x "filename.deb"
Then, you will see three files - debian-binary, control.tar, and data.tar. The tar archives can also be optionally compressed in different formats, like gz or xz. That shouldn't worry you. We need to extract the last one:
tar xf "data.tar(.gz|xz)"
Alternatively, you can use the dpkg command:
dpkg -x "filename.deb" "output folder"
Inside it, structured in a directory hierarchy, will be the libgtk3-nocsd.so.0 file. Copy it anywhere you like on your system. Now, we need to preload it, before we launch TrueCrypt:
LD_PRELOAD="some location"/libgtk3-nocsd.so.0 truecrypt
And that's it really. TrueCrypt will now run:
At this point, you can create a wrapper script for yourself, which will basically contain the line above, so you can launch TrueCrypt without having to think again about the extra library.
I like to label this kind of tutorials as trivial-complex. On one hand, the fix is relatively simple. On the other, preloading isn't something one should have to think about on a daily basis. Or ever. And yet, if you have valuable data stored in TrueCrypt containers, the last moment you want to be facing software issues is when you need to access that data. If you're a Linux user, and you are still using this program on the more recent crop of distros, this little guide should help you sort it out. And we're done.