Porting Notion Desktop to Linux

Posted on

TL;DR: I ported the Notion Windows app to Linux! You can see the build script and installation instructions, or see the latest release.

Update 2021: Releases are now distributed via package manager repositories, supporting Ubuntu/Debian and other apt-based distributions, Fedora/CentOS and other dnf-based distributions, and openSUSE and other zypper-based distributions.

To install on Ubuntu, Debian or Linux Mint:

wget https://notion.davidbailey.codes/notion-linux.list
sudo mv notion-linux.list /etc/apt/sources.list.d/notion-linux.list
sudo apt update && sudo apt install notion-desktop

To install on Fedora or CentOS:

wget https://notion.davidbailey.codes/notion-linux.repo
sudo mv notion-linux.repo /etc/yum.repos.d/notion-linux.repo
sudo dnf install notion-desktop

To install on openSUSE:

wget https://notion.davidbailey.codes/notion-linux.repo
sudo mv notion-linux.repo /etc/zypp/repos.d/notion-linux.repo
sudo zypper install notion-desktop

Recently, I found myself wanting a small, portable laptop, and in the end decided on getting myself a ThinkPad T450. I had planned on creating a Hackintosh, though while macOS seemed to initially work on the laptop, it failed to boot up after I switched to what I thought was a macOS-compatible Wi-Fi card.

I ended up installing Linux instead – Pop!_OS to be specific – and to my surprise, found myself loving it more than ever. When I was younger, I tried out a variety of Linux distributions, or “distros” as they’re often called, but later ended up using macOS more for a number of reasons:

Firstly, I got a company MacBook to work on from Memiah, so I was already using macOS for half my professional work. And secondly, while I was using Linux at the time for my Gatsby work, I found most Linux desktop environments’ support for multiple monitors was mediocre at best.

In the end, I built a desktop Hackintosh for my Gatsby work, as well as personal use, and ended up loving it. As such, I was a bit disappointed at first when it seemed that macOS wouldn’t run on the ThinkPad. But I found that I loved using Linux again, and since I wasn’t hooking up the ThinkPad to external monitors, the problems I had faced previously didn’t become an issue.

One thing I missed, though, was the Notion desktop app. Notion can run in a web browser, though the app also provides offline support, as well as having that nice, satisfying feeling of being a “real” desktop app… or maybe that’s just me?

Some Linux clients for Notion already exist, such as Lotion, or the aptly named notion-app, though these are 3rd party wrappers rather than direct ports. I wanted my app to be as close as possible to the official app, so I directly the extracted resources from the Notion Windows to make this happen.

Notion, like many desktop apps such as Discord and Slack, is an Electron app, meaning that it’s built using cross-platform web technology. After extracting the app contents from the Windows installer, I was able to repack the app into a DEB package using Electron Packager along with Electron Installer Debian.

Eventually, I put together a build script to allow automated creation of DEB packages, compatible with Linux distros like Ubuntu, Linux Mint and Debian. Some things were missing from the Windows counterpart - spellchecking doesn’t work, and logging in with Google fails since the notion: protocol isn’t understood on Linux. But apart from those things, it works great!

Update 2021: Spellchecking and logging in with Google/Apple now work. Also, RPM packages are now available.

I invite you to check out the code on GitHub, or you can see the latest release.