A Comprehensive Guide to Installing SuperMemo in Linux (4 Ways)
Introduction
If you take the Wine-based route:
-
Lutris’s one-click installation by Alessivs
-
Alessivs’s supermemo-wine
If you take the VM route:
-
VirtualBox <– This is what I currently use
Honorable mention:
-
PlayOnLinux: doesn’t work for me
-
$60 Crossover: doesn’t work for me
According to ease of installation: Lutris > VirtualBox > supermemo-wine > qemu-kvm
Wine-based route
1. Lutris’s one-click installation by Alessivs
“Lutris is an Open Source gaming platform for Linux. It installs and launches games so you can start playing without the hassle of setting up your games.”
After installing Lutris on your Linux system, go to supermemo-18, click the Install
button and hope for the best:
If the above Lutris solution doesn’t work, you’ll have to investigate and debug. This is what happened to me. The installation was successful but the following error occurred when launching SuperMemo:
After talking to Alessivs, these error messages happen:
when SuperMemo can’t load the mshtml component to display HTML components. Possible causes:
-
Internet Explorer was not installed
-
Internet Explorer was installed in a different prefix (by user mistake)
-
The IE8-provided mshtml.dll was not marked as “native” in the prefix’s Wine configuration.
According to supermemopedia doc, the very likely culprit is Internet Explorer 8. The Element windows in SuperMemo are Internet Explorer under the hood. Regardless of what “gaming wrapper” you use, i.e., Lutris, PlayOnLinux, or Proton, it needs to have a SuperMemo-compatible IE version. If you click the Element windows and there’s no response, or the above error pops up, it’s a problem with the IE under Wine.
Another cause of issue is your Wine version. The Wine version that comes with lutris-6.21-6-x86_64
works for me.
If you encounter other errors, your best resource is SuperMemo for Windows under Wine.
2. Lutris script that works for me
|
|
The above modified script from Alessivs is finally what worked for me. I recommend using the above lutris installer first. If that doesn’t work, then you may try this script.
Copy and paste the above code to a file. Name the file sm18-stable.yaml
. To run it, go to the directory where the sm18-stable.yaml
resides. Open a terminal and execute lutris -i ./sm18-stable.yaml
:
Then wait for it to finish while we pray. If everything goes well, you should see this dialogue:
Clicking Launch
:
Try going through a few repetitions to see if any error dialogue pops up. If not, congratulations you have a working SuperMemo!
The reason for the black background is due to a Lutris’s setting. To disable it:
- Open lutris
- Under
Games
, right-click on SuperMemo, chooseConfigure
- Go to Runner options
- Disable
Windowed (virtual desktop)
- Save
3. Alessivs’s supermemo-wine
supermemo-wine is yet another Alessivs’s work. It installs SuperMemo without the Lutris helper and instead, using only winetricks. I tried this solution early on but the Error showing component 1 object Invalid floating point operation
error occurred. Again, it’s the IE8 problem. According to the discussion in supermemopedia:
You could try this tip provided by James to see if SuperMemo works.
4. PlayOnLinux’s IE doesn’t work
I’ve tried installing SuperMemo through PlayOnLinux (POL):
The IE available in POL are Gecko, which is Wine’s own implementation of IE. This version is not SuperMemo-compatible:
From SuperMemo_for_Windows_under_Wine#Tips:
PlayOnLinux (4 and below) have outdated Internet Explorer install recipes (Internet Explorer being an important dependency)
PlayOnLinux 5 is in development and not yet stable
Virtual-machine route
1. VirtualBox
This is my current solution: using SuperMemo and Balabolka inside VirtualBox. There are some advantages when using VirtualBox over other VM solutions.
1. Customizability
The ability to disable “auto capture keyboard”. I use i3 on my host machine. This means that when I’m inside the VM, and press Super (Win)
key, it’ll be captured by the host machine instead of the guest OS. In other words, pressing Super (Win)
inside VM is no difference than doing it in my host machine. I can just press Super+Return
to bring up my host terminal next to the VM. For VMware, I need to first press host+Key
to escape out of the VM capturing mode, and press, say Super+1
to switch workspace. In this regard, VirtualBox significantly reduces the friction when switching between the host and the guest.
2. Stability
After trying all the solutions mentioned in this article, VirtualBox offers the best stability. WinApps for Linux is still not fit for daily driver (probably because of my tiling window manager); and very disappointingly, I had random freezing issues in VMware; qemu-kvm (with Looking Glass and GPU passthrough) is a very hacky solution and thus many bugs.
2. VMware Workstation 16 Player
Given what I read online, VMware supposedly provides better performance than VirtualBox. However, this is not the case for me (at least no discernable difference), and the random freezes is unbearable. I simply stick to VirtualBox.
3. WinApps for Linux
Initially I opted for WinApps for Linux for better integration with the host Linux machine, since WinApps allows switching between SuperMemo and other Linux apps easily. Looking at the “How It Works”:
WinApps was created as an easy, one command way to include apps running inside a VM (or on any RDP server) directly into GNOME as if they were native applications. WinApps works by:
- Running a Windows RDP server in a background VM container
- Checking the RDP server for installed applications such as Microsoft Office
- If those programs are installed, it creates shortcuts leveraging FreeRDP for both the CLI and the GNOME tray
To install WinApps, follow this excellent winapps#installation.
My experience with WinApps
My experience with WinApps was rather unpleasant. There are issues with WinApps:
Sometimes I’d get a black screen (FreeRDP bug) and have to restart my laptop:
Sometimes I can’t move the windows inside the VM (maybe resolution issue), or I can’t escape out of the VM:
It’s almost impossible to use SuperMemo with a tiling window manager:
I understand that SuperMemo is never meant to be used with a tiling window manager, so I’ve set up an entire workspace to be opened in floating windows. AFAIK, there are many smaller windows that SuperMemo spawns, creating empty windows like below:
The window should be the Knowledge Tree, but it’s not shown properly:
4. qemu/kvm/virt-manager
qemu/kvm provides the best performance. It gives almost bare metal performance if you configure GPU passthrough and do some performance tuning. However, I don’t need the best performance because I’m not using the VM for gaming. And VirtualBox provides good enough performance for me. I value customizability and stability way over performance.
Is using a virtual machine right for you?
Using a virtual machine is guarantee to make SuperMemo work, because SuperMemo is running in its native Windows glory: with the native Windows IE (not through Wine). Everything is Windows as far as SuperMemo is concerned.
With a Windows VM, I can replicate the exact workflow I had with my previous Windows setup. Not only SuperMemo will work perfectly, other auxiliary tools such as Microsoft Edge’s Read Aloud that I depend upon will also work.
I installed Windows 10 on my VM. Having it running in the background takes up roughly 3.8GB RAM. If your computer spec is not powerful enough (less than 8GB RAM), I’d not recommend this VM route.
Spinning up an entire virtual machine just to use SuperMemo and SuperMemoVim may seem excessive and even wasteful. However, my particular workflow depends heavily on AutoHotkey. I need to use my SuperMemoVim, as I’m so used to editing text and controling SuperMemo with Vim keybinding. Also, I have a balabolka ahk script to navigate between SuperMemo and Balabolka.
However, if you don’t need to have Vim-like navigation, then the Lutris solution above offers a great alternative. It saves a lot of system resources and laptop battery.
If you go for this VM-based route, I’d recommend VirtualBox. Please remember to create snapshots to back up your VM often:
Conclusion
I’ve tried many, many solutions to make SuperMemo work in Linux. The process was a frustrating experience beyond imagination. However, it’s not SuperMemo’s fault since it’s never meant to be run in Linux.
If you don’t need to use SuperMemoVim, the Wine-based lutris solution is excellent. If you are like me who want to have the exact same Windows workflow, use VirtualBox. If you’re tech-savvy enough, use qemu-kvm with GPU passthrough. Regardless, if you’re using Linux and want to make SuperMemo work, expect minor trouble before you can make it work.
If you have any questions, feel free to email me and I’m more than happy to help.