Installing 32 bit Scrivener on 64 bit Ubuntu/Kubuntu

ub
ubersoft
Posts: 133
Joined: Sun Nov 14, 2010 3:54 am
Platform: Linux

Fri Jul 12, 2013 10:50 pm Post

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

Code: Select all

sudo apt-get install debootstrap


Code: Select all

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:

Code: Select all

sudo nano /etc/schroot/schroot.conf


Go to the end of the file, and add the following entry:

Code: Select all

[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

Code: Select all

directory=/srv/chroot/quantal-i386
with

Code: Select all

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:

Code: Select all

sudo mkdir -p /srv/chroot/quantal-i386


Now make the chroot:

Code: Select all

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:

Code: Select all

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:

Code: Select all

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.

Code: Select all

apt-get install nano


Now modify sources.list:

Code: Select all

nano /etc/apt/sources.list


edit the file so it contains the following:

Code: Select all

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:

Code: Select all

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:

Code: Select all

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:

Code: Select all

export DISPLAY=:0.0


Then open up a terminal window (a normal terminal window), OUTSIDE of schroot:

Code: Select all

xhost +


At this point you should be able to run Scrivener.

Step Seven: Run Scrivener

From a terminal window (NOT in schroot):

Code: Select all

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!

Ja
James Wilde
Posts: 42
Joined: Thu Jun 03, 2010 7:42 pm

Wed Aug 07, 2013 9:15 am Post

I don't know the advantages and disadvantages of running a 32 bit linux in a 64 bit sandbox, but on a 64 bit Ubuntu 13-04 Dingiswayo's solution for Mint worked for me. At least so far. Haven't tested much yet.

I installed the ia32-libs package and then reinstalled the scrivener deb file thus:

sudo apt-get -i --force-architecture scrivener-xxxx.deb

Anyone with comments on the preferred route?

ub
ubersoft
Posts: 133
Joined: Sun Nov 14, 2010 3:54 am
Platform: Linux

Wed Aug 07, 2013 5:38 pm Post

The problem I have with Dingiswayo's solution is there is a "last mile" gap in functionality. No matter what I do, I cannot get the damn spellchecker to recognize vocabulary. It winds up underlining correctly spelled words, and when I right-click on the options it usually just gives me that word, because it's spelled correctly.

Some people really don't mind that, but I really need a working spellchecker.

Scrivener works just fine in every other respect, but the only way I can get complete spellcheck functionality is to put it in a sandbox. I really wish that wasn't the case, because setting this up is overkill. It does, however, provide a 100% functional spellchecker.

Gr
Granitel
Posts: 7
Joined: Thu Nov 14, 2013 4:59 am
Platform: Linux

Fri Nov 15, 2013 12:46 am Post

OMG. I admire the OP for coming up with the heroics to install Scrivener on the latest 640bit Ubuntu, but, geez Louise, if it's that complicated (that we have to actually install an entire additional operating system), we may as well give up.

There must be some easier way.
At the moment, I don't know what that is though...
- Ubuntu 13.10 install of Scrivener fails on libstdc++.so.6

User avatar
garpu
Posts: 2085
Joined: Mon Oct 25, 2010 9:38 pm
Platform: Linux

Fri Nov 15, 2013 1:51 pm Post

OMG. I admire the OP for coming up with the heroics to install Scrivener on the latest 640bit Ubuntu, but, geez Louise, if it's that complicated (that we have to actually install an entire additional operating system), we may as well give up.


Er, no, actually, that's what you need to do in order to have a multilib (i.e. run 32-bit programs) system. And, for the record, you shouldn't need to install everything, just a version of gcc that cross-compiles, all the associated glibc libraries, and a few other graphical libraries. Scrivener also needs 32-bit gstreamer and gst-base.
Slackware-current 64-bit, XFCE

ub
ubersoft
Posts: 133
Joined: Sun Nov 14, 2010 3:54 am
Platform: Linux

Mon Nov 18, 2013 3:59 am Post

Again, the beef I ahve with running scrivener on 64 bit is definitely not a "it wont' run" problem, but a "last mile" problem -- getting the damn spell checking functionality to work.

A 70% solution to that has been found, but even that is a) tricky and b) not 100% effective, since apparently in order for it to work you must launch it from a terminal window in order for it to access the right libraries. Creating the schroot to run Scrivener in is still the most seamless solution I've found.

And yeah, I'm well aware it's ridiculous overkill.