Scribus on Linux and *NIX
From Scribus Documentation Project
Contents |
Installing Scribus
Not only have things come a long way with Scribus over the few years of its history, but simultaneously various Linux distributions have become much more user friendly. Several now have automated or semi-automated repositories for downloading Scribus, along with all of its so-called dependencies or auxiliary components.
Many of the various types of Linux/UNIX available offer graphical user interfaces for the management of binary packages. Please read the documentation of your distribution, if you want to know how to use them. Most Linux distributions are shipped with Scribus these days, and if not, it's available in online repositories. You can also install Scribus packages from the command line. See the instructions in Appendix 1.
If no package is available for your Linux or UNIX version, you will have to follow the build instructions below.
Building Scribus from Source
For some, the task of building or compiling software is daunting, merely because they haven't done it before. Here we would like to try to allay your fears and break this down into an understandable and less frustrating task. Once you have assembled the various tools and ingredients, you may find that building your own up-to-date version of Scribus is very rewarding. For one thing, it allows you to take advantage of various upgrades and bug fixes as they are released yet not quite in the stable official version.
Tools and Ingredients
Let's go over the components you need other than Scribus first.
- You must have a compiler, and a sufficiently up-to-date one. This is the program that transforms those text instructions into machine-readable binaries. For various Linux-like OSes, this is gcc (gcc stands for Gnu Compiler Collection), and at least a 3.x version – current versions are 4.x. Additional versions which may be desirable or necessary are gcc-c++ and gcc-gfortran.
- You must have Qt. For Scribus 1.3.3.x, this will be qt-3.3.x, and importantly, you must also have the header files, the various Qt modules that gcc will need to cross-compile Scribus with Qt. These are likely labeled something like qt-devel-3.3.x, but check with your distro for specifics.
- Other essential ingredients
- Ghostscript: at least 8.15, ideally more advanced, such as 8.60. Ghostscript handles the import of EPS and PostScript files, as well as the print preview.
- Python: at least 2.3 – without Python on your system, the Scripter won't work.
- Freetype: 2.1.7 or higher. This is a library to access font files.
- libxml2: 2.6 or better.
- lcms (Little CMS): 1.17 or higher, and lcms-devel for color management.
- libtiff: 3.6 or higher and libjpeg for image handling.
- cmake: The program that is used to configure your Scribus build. Support for autoconfig has faded in more recent Scribus versions, in favor of cmake.
- Recommended or desirable:
- cups-devel: Many Linux distros now use CUPS for printing, but this does not necessarily include the development libraries.
- Python imaging libraries and tkinter: Required to run some Scribus scripts.
- fontconfig-devel
- openssl-devel
- Subversion: Used for obtaining the most up-to-date versions, with the latest bugfixes and enhancements.
Scribus
Go to http://sourceforge.net/projects/scribus/, click the "Download Scribus" button. This should take you to the download page, where you are presented with a list of file choices. Look under "Scribus SVN" where you should find a link to a file called scribus-1.3.3.1x.tar.bz2 (where "x" is number 2 or higher), and click on this, after which you should begin downloading to the location of your choice in your computer.
| A Note About Security and Not Wasting Your Time |
| Be aware that there have been instances where altered files have been uploaded to legitimate sites. Sometimes there is a glitch in the download and the file is simply broken in the process. These altered files can cause problems or at least a lot of frustration. The way to ensure your downloaded file is legitimate is to run a checksum program on your downloaded file. On the Scribus site, below the link to Sourceforge you should see a label for an md5sum and an sha1sum. These are small programs which generate a unique code based on the actual contents of a file. Most Linux distributions have one or the other, perhaps both.
On Sourceforge, there should also be a file ending in .sig, which is a gpg generated signature for the source. This is a very secure means of authenticating the source files. To verify in a terminal: $gpg --verify ./scribus-1.3.3.x.sig ./scribus-1.3.3.x.tar.bz2 Once you have downloaded your file, you can run sha1sum scribus-1.3.3.12.tar.bz2 in a command line, and this sha1sum checksum will be generated. If it does not match the code on the Scribus site, do not proceed to compile and install – this download is either broken or altered. If you consistently download a file that fails this test, please notify the developers, so this can be fixed. |
What's this ".tar.bz2"?
These are extensions which indicate that the directory of Scribus files has first been tarred (using a program called tar) or converted to a single file, then compressed to shrink its size, using a program called bzip2. You can simply extract it like this:
tar jxvf scribus-1.3.3.x
Then you will have a directory called scribus-1.3.3.x which has the sources.
Inside will be everything you need to compile – except for all the other requirements mentioned above.
Now the Fun Begins
The basic process for compiling involves three commands:
cmake . make make install
CMake
First enter the directory called scribus-1.3.3.x, using the cd command. If you simply wish to compile Scribus with all its basic settings and in the default location (where the binaries and other files will end up after installation), just run
cmake .
Note that this is the command, cmake, followed by a space, then a period. The period ensures that cmake runs using the contents of the directory you are in. CMake is the program Scribus uses to check for necessary components in your distro, and all the requirements mentioned above. Any options present will be noted and adjustments made in how Scribus is compiled – if you lack some optional feature, Scribus will be compiled without that function. You will get a running commentary as cmake finds or doesn't find various things. There may be an error message indicating something is missing, and in the end if something critical is broken or missing, you will get a failure message – one of the things it checks is whether gcc works properly. If the message isn't understandable, the best thing is to go to Scribus list for help, pasting your error(s) into your email.
The output from CMake is a bit cryptic. In general, if it says that something is missing, it usually means it cannot find the header files for compiling. Here is another kind of error message, in which CMake asks you to set variables:
CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: LIBART_LGPL_INCLUDE_DIR LIBXML2_INCLUDE_DIR (ADVANCED) LIBXML2_LIBRARIES (ADVANCED) PYTHON_INCLUDE_PATH PYTHON_LIBRARY
What was needed here (this example from Fedora 8) was the following packages: libart_lgpl-devel, libxml2-devel, and python-devel. Check with your distro or Scribus List to help locate these.
Finally, CMake will generate a number of files needed to actually do the compiling.
Make
If you've gotten this far, things should be getting simpler. Just enter in the command line,
make
which tells gcc to compile Scribus. Compiling Scribus will take some time, how much depends on the speed of your CPU and the amount of memory. Now you should see how complicated it might have been to use gcc manually. As make runs, you will get an indicator at the beginning of lines about the percentage of the job that is completed. Either you will reach 100% or one or more error messages will stop the process – again, go to Scribus list for help if needed.
Installing
Now, finally, you're almost finished. If you are installing in the default location, most likely you need root privileges to install, so either become root with the su command or use sudo.
For the former situation after becoming root, type
make install
for the latter,
sudo make install
Installing should be an automatic and rather quick process. Your Scribus binaries should be located in /usr/local/bin, but watching the messages should confirm this.
Running Scribus
From a command line, type
/usr/local/bin/scribus
after which Scribus should run. Setting up a desktop shortcut or a panel launcher to run this command makes things simpler.
Once Scribus is running, check Help > About Scribus to verify your version and other installed components.
Getting and Using Development Versions
There are several reasons why you may be interested in using a version of Scribus other than the stable, official version.
- There may be one or more bugs impeding some kind of work you need to do, and you know these have been fixed in development versions.
- You may be curious as to what new features have been added beyond the stable, official version.
- You may wish to help in the development of Scribus by looking for and reporting bugs and other problems.
While it is true that if you download a development version and compile and install using default settings, you will replace a previous version, you can actually have more than one operating Scribus version on your system, as will be explained later.
Subversion
Currently, Scribus is using subversion as its version control software. From the users' perspective, subversion represents a way to gain access to the newest versions of rapidly developing software, as Scribus is. You must have this program installed on your system, and it should be available from your package repository if you do not have it. Running man svn will result in the display of its man page if it is installed. Running svn help will tell you which version you have.
Subversion has a host of capabilities, but we will cover just a few here. Let's begin by downloading for the first time the newest development version in the 1.3.3.x series of Scribus.
- cd to the location you wish to download Scribus – you will be creating a new directory with subversion.
- Run this command:
svn co svn://scribus.info/Scribus/branches/Version133x/Scribus Scribus133x
- This creates a directory named
Scribus133x, then downloads the latest development version in the 1.3.3.x series. This will take some time.
Later, if you wish to simply update this downloaded version, cd to this new directory, and then just enter:
svn up
If nothing new is downloaded or updated, you already have the latest update.
CMake Options
If what you want to do is use the default location and other settings for Scribus, simply follow the directions outlined above. Be aware that occasionally an update to fix one problem may create another, and ideally one should uninstall an old version before installing another to the same location, otherwise there may be conflicts.
You may want to install elsewhere for this and other reasons, so what follows are some of those possibilities.
- Let's say your username is bud. After you make sure you don't already have some directory by the following name, you
mkdir /home/bud/scribus133x
Go back to your download directory if you are not already there. This time when you run CMake, type
cmake . -DCMAKE_INSTALL_PREFIX:PATH=/home/bud/scribus133x
This tells CMake to set up the process to install to /home/bud/scribus133x when you later run make install. Another advantage of installing to your home directory is that you do not need to be root, since you have write privileges to that location. In fact, if you do make install as yourself and it works, you cannot possibly have ruined your default Scribus.
You might consider something like this as an alternative:
cmake . -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus133x
the advantage of this being that others using the system can have access to Scribus. This directory /opt is one commonly created for user-added software.
Developmental Version
You can also download and install the developmental version of Scribus, in a way similar to what is described above. Be aware that development versions are not recommended for important, critical work, since depending on the development cycle, they can have a variety of problems, including unexpected failures at times. Also be aware that work saved with a developmental version generally will not be able to be opened in the stable version, since the file format will probably be somewhat different.
Currently, the developmental version is 1.3.5svn. With the advent of 1.3.5svn, there are the additional requirements to also have Qt4 (and Qt4-devel), and cairo (and cairo-devel). Download it with this command:
svn co svn://scribus.info/Scribus/trunk/Scribus Scribus135
Follow the instructions as above to compile. Using the CMake options you can install 1.3.5svn to its own directory, and thus have access to both stable and developmental versions. For instance, to install a parallel version of 1.3.5svn in your Home directory, use:
mkdir /home/bud/scribus135svn
Then:
cmake . -DCMAKE_INSTALL_PREFIX:PATH=/home/bud/scribus135svn
Finally run make and make install as described above.


