A Mostly Complete Guide to Installing Scrivener on Linux

Hello, everyone. Using the excellent information in the posts above, I’ve written a shell script that automatically attempts to install and configure spell checking for 64-bit Debian-based systems. I’ve run this script successfully on two different machines.

You should have Scrivener working correctly without spell checking in your environment before running this. My own installs were done on systems based on Debian Wheezy and Debian Jessie. On my systems, in order to get Scrivener working correctly, I needed only to install the i386 libgstreamer-plugins-base package (and its dependencies). All other necessary 32-bit libs came pre-installed. My tests were done on recent releases of SolydK and Crunchbang Linux. You may need to consult earlier posts in this thread if you still have 32-bit library issues.

sudo apt-get install libgstreamer-plugins-base0.10-0:i386

You may also need to perform:

sudo apt-get -f install

to fill in any missing dependencies that the gstreamer library doesn’t pull in, depending on your system.

I’ve tested the script when Scrivener is installed both from the .deb and .tar.gz packages. The script is set up to work with the .deb install, but if you install from the .tar.gz package, you can modify the line that starts with “SCRIV_HOME=” to point to the directory where you installed it.

If you installed Scrivener from the .deb package or you installed the .tar.gz package to somewhere you don’t normally have write access to, you’ll need to run this script using sudo so it can have the proper permissions.

The script is extremely conservative when checking for errors and moving files around - it tries to stop immediately if something goes wrong. If it messes up your Scrivener install, it would probably just be easiest for you to uninstall and reinstall Scrivener, so make sure you back up your work first. This is very unlikely, however. Also, if you run the script a second time, you will get “File already exists”-type errors.

On my Crunchbang system, I get a gnome-keyring-pkcs11 error, but this is harmless. An earlier post details how to fix this if it bothers you.

#!/bin/bash

# Modify this variable to point to the directory Scrivener is installed in
SCRIV_HOME="/usr/share/scrivener"

SCRIV_LIB=$SCRIV_HOME/lib
SCRIV_BIN=$SCRIV_HOME/bin
TMP="/tmp/aspell"

ASPELL_DIR="$TMP/aspell"
LIBASPELL_DIR="$TMP/libaspell"
LIBNCURSES_DIR="$TMP/libncurses"
LIBTINFO_DIR="$TMP/libtinfo"

function download() {
  apt-get download $1
  if [ $? -ne 0 ]; then
    echo "Failed to download package: $1"
    exit 1
  fi
}

function unpack() {
  dpkg -x $@
  if [ $? -ne 0 ]; then
    echo "Failed to unpack package: $1"
    exit 1
  fi
}

function make_copy() {
  cp $@
  if [ $? -ne 0 ]; then
    echo "Failed to copy file: cp $@"
    exit 1
  fi
}

function make_link() {
  ln -s $@
  if [ $? -ne 0 ]; then
    echo "Failed to create symlink: $2 -> $1"
    exit 1
  fi
}

# prepare temp directory
if [ -d $TMP ]; then
  rm -rf $TMP
fi
mkdir $TMP
cd $TMP

echo "Downloading and unpacking 32-bit libs..."

# get the needed libraries
download "aspell:i386"
download "libaspell15:i386"
download "libncursesw5:i386"
download "libtinfo5:i386"

# unpack the libraries
unpack $TMP/aspell* $ASPELL_DIR
unpack $TMP/libaspell15* $LIBASPELL_DIR
unpack $TMP/libncursesw5* $LIBNCURSES_DIR
unpack $TMP/libtinfo5* $LIBTINFO_DIR

echo "Setting up aspell libraries..."

# copy new aspell files to scriv
make_copy -rf /usr/lib/aspell $SCRIV_LIB
make_copy -if $ASPELL_DIR/usr/bin/* $SCRIV_BIN
make_copy -rf $LIBASPELL_DIR/usr/lib/aspell/* $SCRIV_LIB/aspell/
make_copy $LIBASPELL_DIR/usr/lib/libaspell.so.15.2.0 $LIBASPELL_DIR/usr/lib/libpspell.so.15.2.0 $SCRIV_LIB
make_copy $LIBNCURSES_DIR/lib/i386-linux-gnu/libncursesw.so.5.9 $SCRIV_LIB
make_copy $LIBTINFO_DIR/lib/i386-linux-gnu/libtinfo.so.5.9 $SCRIV_LIB

# create symlinks in scrivener lib dir
make_link $SCRIV_LIB/libaspell.so.15.2.0 $SCRIV_LIB/libaspell.so
make_link $SCRIV_LIB/libaspell.so.15.2.0 $SCRIV_LIB/libaspell.so.15
make_link $SCRIV_LIB/libpspell.so.15.2.0 $SCRIV_LIB/libpspell.so
make_link $SCRIV_LIB/libpspell.so.15.2.0 $SCRIV_LIB/libpspell.so.15
make_link $SCRIV_LIB/libncursesw.so.5.9 $SCRIV_LIB/libncursesw.so
make_link $SCRIV_LIB/libncursesw.so.5.9 $SCRIV_LIB/libncursesw.so.5
make_link $SCRIV_LIB/libtinfo.so.5.9 $SCRIV_LIB/libtinfo.so
make_link $SCRIV_LIB/libtinfo.so.5.9 $SCRIV_LIB/libtinfo.so.5

# replace symlinks with real files
rm $SCRIV_LIB/aspell/*.rws
cp /var/lib/aspell/*.rws $SCRIV_LIB/aspell/
if [ $? -ne 0 ]; then
  echo "Failed to copy aspell dictionary files (aspell not installed?)"
  exit 1
fi

# set up env vars
ASPELL_CONF="prefix $SCRIV_HOME"
PATH="$SCRIV_HOME/bin:$PATH"
LD_LIBRARY_PATH="$SCRIV_HOME/lib:$LD_LIBRARY_PATH"
AC_CONF="$SCRIV_HOME"
export ASPELL_CONF PATH LD_LIBRARY_PATH

# check to ensure the new aspell binary is going to work
ldd $SCRIV_BIN/aspell | grep "not found" > /dev/null
if [ $? -eq 0 ]; then
  echo "There are missing dependencies for the aspell program $SCRIV_BIN/aspell"
  echo "These dependencies are:"
  ldd $SCRIV_BIN/aspell
  echo "These dependencies must be resolved or spell checking will not work"
  exit 1
fi

echo "Generating new dictionary files..."

# generate new dictionary files
RWS_FILES="/usr/share/aspell/*.cwl.gz"
for RWS_FILE in $RWS_FILES; do
  BASE=`basename $RWS_FILE`
  NAME=`echo $BASE | cut -d'.' -f1`
  zcat $RWS_FILE | precat | aspell --per-conf=/dev/null --dont-validate-affixes --local-data-dir=$SCRIV_LIB/aspell --lang=en create master $SCRIV_LIB/aspell/$NAME.rws
done

# backup scrivener launch script
SCRIV_TMP=$TMP/scrivener.sh
cp $SCRIV_BIN/scrivener.sh $SCRIV_TMP

echo "Modifying scrivener startup script..."

# modify env variables in temp scrivener launch script
NEW_SCRIV_TMP=$TMP/scrivener_new.sh
sed "1 a\
ASPELL_CONF=\"prefix $SCRIV_HOME\"\\n\
PATH=\"$SCRIV_HOME/bin:\$PATH\"\\n\
export ASPELL_CONF PATH" $SCRIV_TMP > $NEW_SCRIV_TMP

# replace the original scrivener.sh with the modified one
cp $NEW_SCRIV_TMP $SCRIV_BIN/scrivener.sh

# clean up
rm -rf $TMP

echo "Done."

Kudos to the previous posters. I would never have figured out all the steps to get aspell working without their help.

Good luck!

Maybe things have changed for the better since this guide was written, but I have just installed Scrivener on my opensuse 13.1 distro and I found it to be very simple. Everything seems to be working although I haven’t tested the installation in depth.

This is how you can install Scrivener:

  1. Get the tar.gz archive and unpack it somewhere.
  2. Move the Scrivener folder in to your home directory.
  3. Edit the Application menu (right click the opensuse icon bottom left of the desktop) and add the application Scrivener where you want it to appear. Point the menu entry to the scrivener.sh script that is in the Scrivener/bin directory
  4. Fire up The Gimp and open the icon.ico file that is to be found under Scrivener/bin/resources and export it again as a .png file. Add this file as an icon for your menu entry.
    5 Save and then start Scrivener from the application menu.

This worked for me. No glitches sofar.

Marc

I had a little struggle this morning getting Scrivener loaded on a new laptop running on Trusty Tahr, and I thought I’d pass on what I found.

Installation of the deb file failed using both gdebi and the Ubuntu Software Center. Trying to install the files directly from the tar ball resulted in the same error that Kona reported earlier where the scrivener.sh file can’t find the Scrivener executable sitting right next to it.

Following Kona’s instructions I tried to download the ia32-libs from the Ubuntu Software Center and found that they are gone. Trying to use apt-get instead gave me a message that they have been replaced by the packages lib32z1, lib32ncurses5, and lib32bz2-1.0. But they don’t solve the problem. They enable gdebi to install the deb package but the package won’t run.

To make this short, I finally found the ia32-libs at packages.ubuntu.com/raring/amd64 
 s/download. You have to add a mirror from this page to your /etc/apt/sources.list, and then you can install ia32-libs using apt-get.

After that, gdebi installed the deb without problems and Scrivener seems to be running fine.

Just installed scrivener on Ubuntu 14.04, 64-bit following askubuntu.com/questions/352717/g 
 2-libs-gtk

It seems to start ok, but when I try to open a .scriv file made on a Mac, that file appears as a folder and when opened it appears to be empty, and the scrivx file inside the package can’t be seen or opened.

What I CAN do is backup+zip a project on my Mac, unzip it in Ubuntu and open it.

However, then I have different (diverging) version under Mac and Ubuntu, which is a pain at best

Quick guide for installing on 64-bit Fedora 20:

  1. Download and unpack the binary tarball.
  2. ‘cd’ into ‘Scriverner/bin’/
  3. Type ‘./scrivener.sh’. You’ll see an error message for a missing library.
  4. Copy the library name with the mouse.
  5. Type 'sudo yum install ’ and paste the library name. Then press ‘Enter’.
  6. yum will figure out the package name and the dependencies for you! When it asks you if you want to install, say ‘Y’.
  7. Repeat steps 3 - 6 until Scrivener starts!

I just followed this guide to install Scrivener 1.7.2.1 on 64 bit PCLOS KDE. Simple and worked immediately. Thank you very much. :smiley:

Now I can stop using my licensed Windoze version running (like a three-legged dog) in VirtualBox. Still need to work out how to get spelling to work (above guides don’t translate to PCLOS).

Spelling now working after installing lib64aspell-devel :smiley:

Spelling working on Ubuntu Utopic (14.10), once I installed libaspell-dev (the lib64aspell-devel library is probably the name of the same package on Fedora-like systems).

The rest of Scrivener seems to work fine, though I’ve only just started exploring it.

I have been using Scrivener on Mac osx and ios for a few years now. Awesome piece of software. I recently set up a linux laptop and was psyched to see a port available. Thanks!
I followed the install for the .deb file. I ran into an issue and thought it might help someone to post here.
I just installed Ubuntu 16.04.
The application installed all lowercase so when you call “which Scrivener” as the docs say it comes back with nothing. “which scrivener” will return “/usr/bin/scrivener”. Minor thing but unless you are used to troubleshooting Linux apps it might throw people off.
The bigger issue was an error

“/usr/share/scrivener/bin/Scrivener: error while loading shared libraries: libgstapp-0.10.so.0: cannot open shared object file: No such file or directory”

I fixed this by installing libgstreamer as so.

“sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev”

Once I ran that I ran it and have not had an issue. Hope this helps and thanks again to everyone who make this possible.

Hi! I got Scrivener up and running on Ubuntu 16.10 with some of the same troubles middletwig had.

First, I was missing “libpng12.so.0” so I had to install that–I found the right package on this page.

Then, I had the same trouble with the “libgstapp-0.10.so.0” dependency. However, the command middletwig had no longer works because those packages aren’t available anymore.

I did some digging and found a workaround that user Spurlos used when trying to get a different program to run, but was missing the same dependency:

wget http://fr.archive.ubuntu.com/ubuntu/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-1_amd64.deb
wget http://fr.archive.ubuntu.com/ubuntu/pool/universe/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5ubuntu1_amd64.deb
sudo dpkg -i libgstreamer*.deb

After doing both of these things, Scrivener is running on my machine. And it only took 90 minutes of Googling! I hope this helps someone else in the future.

OMG that is beautiful! Thank you so much!

THANK YOU THANK YOU THANK YOU!!!
I’m new to Ubuntu (Using 16.04 LTS) and learning new technology for everything- this system, Scrivener, etc. Just discovered I was eligible for a half price code from NaNoWriMo 2016, but I use two systems in two locations and wanted the application on both- the description of the application sounds exactly like my existing PAPER process, which currently involves carrying about 60 tons of gear with me to the different areas and locations where I work, when counting a huge laptop, three paper copies of alpha reader manuscript notations, my own paper notes, my Alphasmart, and and and
 I recently bought a small lightweight computer for travel, and am trying to coordinate all my technology to minimize hauling things to write
 I could not figure out the install issues in Ubuntu until I found your post. It worked like a charm.

Now to import the manuscript and get working on revisions!!

THANKS!

-A.

I bought an Asus Chromebook with an Arm71 chip. I installed Ubunto 3.14.0 with Crouton and then installed Scrivener 1.9.0.1. I found the executable in my /usr/share/scrivener/bin folder. However, when I try to run the executable I get the error: “Scrivener: command not found”. All the fixes for this involve running on a 64bit chip. This is 32bit. One comment said that Scrivener will not run on an Arm chip. I really hope that is not the case. Any ideas? Thanks!

Good evening, I’m “in the mood!”.
I use Scrivener from time to time and I’m happy!
Finally I worked under ubuntu 17.04 and everything went well 

I just passed in 17.10 (complete reinstallation by caution)
So, after installing Artful, I wanted to install Scrivener.
I was downloading the deb, no problem;
I do dpkg -i no problem;
so everything is fine, except that when I click on the icon, nothing happens 

After reviewing the log, I notice that I do not have permission to run, yet I took the precaution of positioning owner and permissions in /usr/bin and /usr/share.
Is there a new safeguard mechanism that needs to be taken into account?
Thanks

After much experimentation, research and exchange, I believe that this problem is intrinsic to Wayland, which is unavoidable.
I was even told that : “the easiest and most restless to use software designed for Wayland and polkit (the system operations manager).” !!!
The policy of all linux distributions is of course to switch to Wayland, much more modern and better built than the very old X11. But at the same time there have been added security considerations, conceivable in network, but which are not generally the environment of the writer rather solitary.
So I worry about the future of Scrivener under Linux 


Victory !!! :smiley:
I got to install correctly scrivener on ubuntu 17.10 from the downloaded package
In fact, I just used pkcon with the install-local [files] option
(just type pkcon in the terminal and we have all the man 
)
for me:

pkcon install-local scrivener-1.9.0.1-amd64.deb Installation des fichiers [=========================] Test des changements [=========================] Terminé [=========================] Installation des fichiers [=========================] rre/.local/shaAttente de l'authentification [=========================] Démarrage [=========================] Chargement du cache [=========================] Téléchargement des paquets [=========================] Exécution [=========================] Installation des paquets [=========================] Terminé [ ] (0%) (pkcon:12135): GLib-CRITICAL [=========================] attempting to Téléchargé scrivener-1.9.0.1.amd64 (local) Scrivener is a powerful content-generation tool for writers designed for composing and structuring long and difficult documents. While it gives you complete control of the formatting, its focus is on getting you to the end of that awkward first draft. Compose your text in any order and in pieces as large or small as you like. View the components of your draft individually or as a whole. Import and refer to research files such as images and PDFs alongside your writing. Whether you prefer to outline first, hammer out your first draft and restructure later, Scrivener's corkboard and outliner tools are completely integrated with the text, so working with an overview of your draft is just a click away. Scrivener's users include best-selling novelists, screenwriters, students, academics, lawyers, journalists and translators. It won't presume to tell you how to write - it just provides an array of flexible tools that allow you to do things your way, no matter what kind of writing you do. Installé scrivener-1.9.0.1.amd64 (local)


so on

So it’s a lot simpler than I opens and in addition we do not have the security problems, Wayland taking care during installation 


Phew!

Sorry but I still face problems while trying to install Scrivener into Ubuntu 17.04.

I have tried with gdebi and pkcon with no success.

I think the problem is related to Ubuntu 17.04 not providing the versions for some libraries like libpng12 ( I have found libpng16 installed on my system ) 


Is there any way to bypass all these errors?

Thanks in advance for you time .

What steps did you follow and what were the results?

I’m up & running.

I’m running Ubuntu Studio 16.04 on Asus with Intel Centrino. I installed scrivener-1.9.0.1-i386.deb with the Software Install and faced all the problems above. I tried all the solutions, above. I finally installed scrivener-1.9.0.1-amd64.deb on top of the 32-bit install without deinstalling anything, and now I’m running Scrivener. The app crashes a couple of times a week but I never loose any work.

I’m loving Scrivener on Linux and being very productive - even with such an old version of Scrivener. I do wish I had some of the newer features, like the corkboard display that can show timelines of same color label items along a colored line.

Huge thanks to Acerock7 – these instructions got Scrivener up and running on my Xubuntu 18.04 system.

wget http://fr.archive.ubuntu.com/ubuntu/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-1_amd64.deb
wget http://fr.archive.ubuntu.com/ubuntu/pool/universe/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5ubuntu1_amd64.deb
sudo dpkg -i libgstreamer*.deb

The 18.04 is an upgrade from 16.04, and there just may be settings I had there that were transferred, but the main issue was collecting the libgstreamer extras. If in doubt, download copies and archive them.

Thanks again, it is a lifesaver.