Running Scrivener on Linux
December 31, 2021. 1,180 words and a 6 min read.
Scrivener is a desktop and mobile writing app, it provides a powerful and diverse set of tools for writing short or long-form content. It's makers, Literature and Latte, describe it as:
Scrivener is the go-to app for writers of all kinds, used every day by best-selling novelists, screenwriters, non-fiction writers, students, academics, lawyers, journalists, translators and more. Scrivener won't tell you how to write—it simply provides everything you need to start writing and keep writing.
I use Scrivener regularly (primarily on macOS and iOS) and as part of my most recent, masochistic journey to use Linux for everyday computing (is 2022 yet another year of Linux on the desktop?) I had tried and struggled to either find a Linux version or get it running under Wine.
Frustratingly, Scriveners developers used to regularly release a beta Linux build, but it's been long abandoned. Getting even this version running on a new kernel and distro was a difficult experience, and it being a beta of Scrivener 2, it's missing many of the features I'd become used to from Scrivener 3.
As many Linux users will know, these kinds of situations are relatively common and leave us with only one, somewhat dreaded, alternative: Wine. Wine is a fantastic, mature piece of software that allows you to run Windows executables on Linux. It's an incredibly useful tool that is unfortunately very complex to configure, and the resulting configurations are pretty fragile.
But I dove in, based on the rumour that the latest Scrivener Windows builds would only require a small amount of work to configure. In Wine-land we define 'small amount of work' as only three weeks, two animal sacrifices at the altar of Baphomet and a single relapse into alcoholism.
I did eventually get it working. Kind of. There was a lot of trial and error, but eventually the executable would start and would sort of, half-work for a while before crashing. It was a frustrating experience and was very fragile. This was almost certainly due to my ineptitude rather than any fault of the Wine community.
Dear reader, I ended up giving in and going back to the complex hierarchy of Markdown files that those of us who write on Linux know so well. Then I learned about Bottles.
Enter Bottles
Bottles is a project with the aim of making running Windows software on Linux easy. It provides a pretty UI and a set of sane, well-tested configurations to run Windows applications.
The first concept is Windows application-specific environments, it calls them "bottles". These are siloed (even sandboxed) configurations you can build for each Windows application you want to run. This is a powerful idea, as it makes dependency management much simpler than managing your Wine prefixes (in my experience, the main source of Wine “fragility”). It's conceptually similar to Docker, and is useful for the same reasons.
Another great idea in Bottles is that it provides well-tested, mature configurations for running the software. Rather than needing to trial and error and work out exactly which .NET framework you need to install to run a piece of software, Bottles allows you to select one of three options for its environments that work for most applications:
- Gaming, which is (as you might guess) an environment specifically built for running Windows games on Linux (using Proton and other tools to emulate the windows graphics and audio stack)
- Software, which is a catch-all name for basically 'any Windows program that isn't a Game'
- Custom, a way of describing your dependencies for a Bottle and configuring it from scratch, should you wish to
I've used Bottles to run a few Windows applications and the 'Software' environment has worked without configuration every time.
Installing Bottles
Bottles is installable in a few ways, as is everything on Linux, but in my case (running a pretty stock Ubuntu 21.10) I ended up using the Flatpak distribution on Flathub. I've used Flatpak quite a bit to automate the setup of my Linux machines and getting it running is pretty straightforward.
With Flatpak running you just need one command:
$ flatpak install flathub com.usebottles.bottles
This should take a minute or two to install Bottles dependencies and binaries.
Running Bottles and configuring your Scrivener bottle
Bottles can be run a number of ways, and starting it will depend on how you installed it. In my case, having installed it via Flatpak, I start Bottles via the CLI:
$ flatpak run com.usebottles.bottles
Once running, Bottles provides a simple UI for creating a Bottle, but for the sake of completeness I've included a guide for creating a simple 'Software' Bottle:
- Open Bottles
- Click the '+' icon in the top left of the window
- Choose a name for your Bottle (e.g. Scrivener) and select 'Software' as the environment, click 'Create'
- You'll wait a few minutes for Bottles to download and install the necessary dependencies for your environment
Installing and running Scrivener in your bottle
When your bottle is created, you'll need to first 'install' Scrivener into the emulated Windows file system and then run it to use the application.
- Download the latest Windows build form Scrivener. I'm using the 64-bit build of
3.1.1
. This will download Scriveners Windows.exe
installer. - When your Bottle has finished configuring (step 4, above) you'll be presented with a screen like the one below. Click 'Run Executable', navigate to the Windows Installer you just downloaded and select it.
- After a few seconds the Windows installer will appear, follow it as normal. When the installer is complete it will close and you'll be returned to the Bottle settings UI.
- To run Scrivener, you need to click 'Run Executable' again and this time navigate to the location of the installed Scrivener executable in the emulated Windows filesystem. The location of this file may vary by Linux distribution, but on the latest Ubuntu it's located at:
~/.var/app/com.usebottles.bottles/data/bottles/bottles/{name of your bottle, from Step 3 above}/drive_c/Program Files/Scrivener3/Scrivener.exe
- Once selected, Scrivener should start and be fully functional
Notes on saving Scrivener running in a Bottle
The Scrivener version you now have running only has access to the emulated Windows file system inside the Bottle, so that's where it can save files. This is a little annoying to navigate to (see how long the path to the .exe
above is) so I symlinked a directory in the Windows filesystem to somewhere more convenient for access, for example:
$ ln -s /.var/app/com.usebottles.bottles/data/bottles/bottles/Scrivener/drive_c/users/Joe8Bit/Documents/ ~/Documents/Scrivener
I've been using the 'Bottled' version of Scrivener for several weeks without any issues. It's fully functional and hasn't got any mysterious bitrot in the way other Wine-based programs I run have.
Related posts
- 'Founding' technical roles are a signal to not join a business
An open technical role with 'Founding' in the title is bad sign, so try to avoid taking those roles
Published on April 29, 2024 in Tech
- CTO Primer: Technical Due Diligence 1.1
What happens during an investor technical due diligence? What are they looking for? How does it work?
Published on August 17, 2023 in Tech
- The role of regulators in the origin of multi-cloud
Is there any value in a multi-cloud strategy? Why does multi-cloud exist? Do I have to care about it?
Published on July 7, 2023 in Tech