First I’m going to take a little time to gripe about this, because it makes me crazy.
64 bit is now the STANDARD HARDWARE ENVIRONMENT for computer hardware. The fact that the current version of Scrivener is only available for 32 bit Linux is, frankly, stupid. I know it’s because it’s developed as 32 bit software on Windows, and Windows is a lot more backwards-compatible than Linux is in this regard, but it’s still stupid.
If you run 32 bit Scrivener in a 64 bit environment you will have a realtively useless spell checker. You can get the spellchecker to work, but you can’t get it to recognize the aspell dictionaries. This qualifies as “relatively useless spell checker” to me. I realize other people will not be as annoyed by this as I am, but boy, oh boy, I am annoyed.
All that said… if you have a 64 bit system, and you want to run native Scrivener, and you want a working spell checker, there is a way, and I have documented that way for you here.
OVERVIEW:
You are going to install a 32 bit version of Linux that will run in your 64 bit environment. It’s going to live in the /srv/chroot directory, and once you install that 32 bit system, you’re going to go into that system and install Scrivener from there. This process is kind of a pain in the ass, but once it’s done Scrivener will run seamlessly in your environment. The only reason you’ll be able to tell that it’s running in a special 32 bit installation inside your 64 bit world is because you will still bear the scars of trying to get it set up.
SPECIAL NOTES:
This procedure is for people runnging 64 bit Ubuntu or Kubuntu. It will probably also work on Debian but I can’t say that for certain because I’m not sure how much drift there is between Ubuntu and Debian. It probably depends on your version of Debian.
This procedure assumes you have downloaded the Scrivener deb install file somewhere in your home directory.
The procedure assumes you are running a relatively modern version of 64 bit Ubuntu or Kubuntu (Natty or greater). This procedure will show you how to install a 32 bit version of Quantal (12.10) on your machine.
This procedure uses nano as the text editor.
OK, with that out the way, here we go.
INSTALLING 32-BIT SCRIVENER ON YOUR 64 BIT (K)UBUNTU USING SCHROOT
Step One: Install debootstrap and schroot
sudo apt-get install debootstrap
sudo apt-get install schroot
The computer will download and install the debootstrap and schroot.
Step Two: Edit the schroot.conf configuration file
Open the configuration file in nano:
sudo nano /etc/schroot/schroot.conf
Go to the end of the file, and add the following entry:
[quantal-i386]
description=Ubuntu 12.10 Quantal for i386
directory=/srv/chroot/quantal-i386
personality=linux32
root-users=[your username]
type=directory
users=[your username]
[your username] should be replaced with your account username. Essentially we are making your local login account an account with root priveleges in 32bitland.
NOTE: If you are running a version of Ubuntu or Kubuntu earlier than Raring, you may need to replace
directory=/srv/chroot/quantal-i386
with
location=/srv/chroot/quantal-i386
– apparently in a recent release they changed that term.
Step Three: create the installation directory and install the 32 bit version of Linux
Create the chroot directory:
sudo mkdir -p /srv/chroot/quantal-i386
Now make the chroot:
sudo debootstrap --variant=buildd --arch=i386 quantal /srv/chroot/quantal-i386 http://archive.ubuntu.com/ubuntu/
Depending on the speed of your internet connection it may take a while to download and install the files.
Once everything has finished, verify the installation:
schroot -l
The terminal should list quantal-i386 as a valid installation.
Step Four: Start and configure the 32 bit chroot
Start your quantal-i386 session:
schroot -c quantal-i386 -u [your username]
schroot allows you to access the account home directory of whatever account is identified by the -u flag (as long as it’s listed in the users key in the entry you created in schroot.conf).
You are now running a terminal running 32 bit linux. Currently that’s all the linux installation is–a terminal environment without any support for X applications. We’re going to have to add more software.
First, install nano.
apt-get install nano
Now modify sources.list:
nano /etc/apt/sources.list
edit the file so it contains the following:
deb http://archive.ubuntu.com/ubuntu quantal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu quantal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu quantal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu quantal-updates main restricted universe multiverse
These are probably more repos than you need, but better safe than sorry.
Now we need to install an x environment. I don’t know how to give you a bare-bones environment, so the rest of this is overkill:
apt-get update
apt-get upgrade
apt-get install kate
apt-get install aspell aspell-en libaspell-dev libaspell15
“kate” is KDE’s text editor. This will install parts of KDE in your 32 bit environment. If you don’t wnat to do that, use gedit or something similar. The point is to install a graphical application, so that it will include all the libraries needed to run graphical apps. Then you install all the aspell components you need to have a happy spellchecker.
Step Five: Install the Scrivener deb
While you are in scroot, install the Scrivener deb file:
dpkg -i scrivener*.deb
Step Six: Get X applications running in schroot
WARNING: This is potentially unsecure. If you know a more secure way of doing this, please note in responses.
While you are inside schroot:
export DISPLAY=:0.0
Then open up a terminal window (a normal terminal window), OUTSIDE of schroot:
xhost +
At this point you should be able to run Scrivener.
Step Seven: Run Scrivener
From a terminal window (NOT in schroot):
schroot -c quantal-i386 -u [your username] -p scrivener
This will load Scrivener. It should load it seamlessly. It should default to accessing your home directory and you should be able to access all your home directory files without difficulty (because you’re using the same account to do it). You can create a program icon that uses that string, and you won’t even have to access a terminal application to launch it.
A Note About Fonts
One thing you will NOT have is access to all the fonts you have installed. The 32 bit linux uses it’s own directory and configuration structure and you will have to install all the fonts you want manually. I recommend using apt-get to install a basic set of fonts and sticking with those.
Hopefully this works for you guys. I’ve been sitting on these procedures until I ran them a few times to make sure it worked in one pass. That said, my setup may not be standard, or yours might not be, and the differences between our systems might be significant enough that this procedure omits steps you’d need to take to get it working for your. With that in mind, Caveat Emptor. And good luck!