Archives For November 30, 1999

This simple tutorial shows how to compile and install the Sigil EPUB ebook editor (2.0.1 so far) from the source code in Ubuntu step by step.

Sigil is a popular free and open-source ePub ebook editor that works in Windows, Linux, and macOS. However, it does not provide official packages for Linux.

While Sigil in Ubuntu system repository is always old, user can easily install the latest version via Flatpak package that runs in sandbox.

In case you neither prefer Flatpak package, nor even trust third-party software sources, it’s not hard to build it from the source tarball! And, here I’m going to show you how.

This tutorial is tested and works in Ubuntu 22.04, Ubuntu 23.04, Ubuntu 23.10 daily build with Sigil 2.0.1. Though things may change depends on software version.

Step 1: Install the Build Dependency libraries

Before getting started, you need to install all the dependency libraries that Sigil required.

1. First, search for and launch “Software & Updates“. KUbuntu user can press Ctrl+Alt+T, then run sudo software-properties-qt instead in konsole.

2. When it opens, enable “Source Code” in the first tab and then close the dialog.

3. Then, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to refresh the system package cache:

sudo apt update

4. Finally, install the build dependencies for Sigil by running command:

sudo apt build-dep sigil

In case you want to free up some disk spaces after compiling Sigil, it’s better to written down (or copy’n’paste) the packages, this command is going to install. All packages end with -dev are safe to remove after following this tutorial.

Step 2: Download & Extract the Sigil Source Tarball

The latest version of Sigil is available to download at its Github project page via the link below:

Select download the source code (zip or tar.gz) from Assets section. Finally, right-click on the tarball and select “Extract” it from your Downloads folder.

Step 3: Compile & install Sigil from Source

In the file manager, right-click on the extracted source folder and select “Open in Terminal“.

In the pop-up terminal window, do the following steps one by one to compile it.

1. First, create a sub-folder for building the source.

mkdir sigil-build

2. Then, navigate to that folder you just created:

cd sigil-build

3. Now, configure the source by running command:

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../

This command will check all the dependency libraries. It will output error if missing some packages or package version mis-match. Though, the 2.0.1 release works great in my case.

4. If the last command done without error, you can now compile it by running command:

make -j4

The command here will start in 4 threads. Depends how many CPU cores you have, you may change the number 4 accordingly.

This command should work without problem, unless there’s a compile bug. In that case, you may report issue to Github page.

5. Finally, install Sigil by running command:

sudo make install

Here sudo is required for permission to install files to /usr/local directories. Also, you may written down all the files it’s installed, in case you want to remove Sigil later.

When done successfully, search for and launch Sigil from start menu or ‘Activities’ overview depends on your DE, and enjoy!

For Sigil 2.0.1, there’s an error launching the software. It output “Embedded Python Error” – “ModuleNotFoundError: No module named ‘lxml'” as the screenshot below shows you.

Which can be easily  fixed by installing python3-lxml package via the command below in terminal:

sudo apt install python3-lxml

Uninstall Sigil

For the Sigil ePub editor installed via the above steps, you may uninstall it by simply removing all the installed files.

To do so, press Ctrl+Alt+T on keyboard to open terminal and run command:

sudo rm -R /usr/local/bin/sigil \
/usr/local/lib/sigil* \
/usr/local/share/sigil* \
/usr/local/share/applications/sigil.desktop \
/usr/local/share/pixmaps/sigil*

NOTE: This is a single command separated into multiple lines via ‘\’. Just copy it and paste into terminal and hit Enter to run.

Got some ePub and/or MOBI books in your PC? Debian / Ubuntu has recently includes a package in their repository for generating thumbnails for these files.

As you may know, Linux Mint 21 was released recently with a thumbnail generators for AppImage, ePub, MP3 and RAW files. Debian/Ubuntu now has similar tool called gnome-epub-thumbnailer, though it’s only for ePub and MOBI books.

With the package installed, the default file manager will no longer display the universal “e” image with green background for all ePub files. Instead, it shows thumbnail book covers.

Don’t know if Ubuntu 22.10 will come with it out-of-the-box, since it’s not released yet. But, user may manually install the package by running the apt command below in terminal.

Open terminal (Ctrl+Alt+T) and run command to install gnome-epub-thumbnailer in Ubuntu 22.10 or Debian Unstable:

sudo apt update && sudo apt install gnome-epub-thumbnailer

NOTE: the package is only for the default GNOME Desktop! Install the Foliate eBook reader from system repository will also install it as recommend dependency package.

Enable EPub / MOBI Thumbnails in Ubuntu 22.04 | 20.04

The package is not available in the current LTS releases. Ubuntu 22.04 user can however download the .deb package directly from the build page:

Click the little triangle for Ubuntu 22.10 (Kinetic Kudu) build to expand, and select download the amd64.deb for modern PC/laptop, arm64/armhf for ARM, or other format depends on your devices.

Finally, double click to open the .deb package via “Software Install” (Ubuntu Software) and install it.

For Ubuntu 20.04 user, I’ve upload the package into this unofficial PPA for 64-bit (amd64) computers support.

To add the PPA and install the package, press Ctrl + Alt +T on keyboard to open terminal and run 3 commands one by one:

sudo add-apt-repository ppa:ubuntuhandbook1/apps
sudo apt update
sudo apt install gnome-epub-thumbnailer

NOTE: The first command will asks for password authentication, though there’s no asterisk feedback. Just type in mind and hit Enter to continue.

Enable EPub / MOBI Thumbnails in Fedora, Arch, SUSE Linux

Most other recent Linux systems have also added the package into their official repositories. If you want to get it, open terminal and run command:

  • For Fedora, use command:
    sudo dnf install gnome-epub-thumbnailer
  • Arch and Manjaro Linux can install it via:
    sudo pacman -S gnome-epub-thumbnailer
  • And, openSUSE user may run command:
    sudo zypper install gnome-epub-thumbnailer

Uninstall the Thumbnails

Thumbnails generate automatically once you installed the package. If somehow you want to get rid of them, open terminal and run command:

sudo apt remove gnome-epub-thumbnailer

Replace apt depends your system. For Arch, use sudo pacman -R gnome-epub-thumbnailer.

Removing the package won’t clear existing thumbnail images, until you removed the content under “~/.cache/thumbnails” either from file manager or by running command:

rm -R ~/.cache/thumbnails/*

Install Sigil Epub Editor 0.9.3 in Ubuntu 15.10

Last updated: February 6, 2016

Sigil EPUB ebook editor has reached the 0.9.3 release recently. Here’s how to install it in Ubuntu 15.10 via PPA.

Sigil-0.9.3 is a major new release that greatly improves Sigil’s ability to work with and generate epub3 ebooks without losing any of its epub2 capabilities. This release also includes a number of bug fixes and stability improvements.

The main bug fixes are:

  • Add a python based updatechecker for Sigil updates to prevent Windows OpenSSL build issues
  • Stop ‘Generate TOC’ from introducing unnecessary spaces in front of class attibute values
  • Use localeAwareCompare to attempt to add Index Entries to build them sorted

……

— for more see the release note.

How to Install Sigil 0.9.3 in Ubuntu:

There’s no official binaries for Linux users. You can install it by either building from the source or using an unofficial PPA.

Here’s a PPA for Ubuntu 15.10 (Ubuntu 16.04 will be support soon). Ubuntu 14.04 is not supported since Sigil requires Qt >= 5.4

1. Add PPA

Open terminal from Unity Dash, App Launcher, or via Ctrl+Alt+T shortcut key. When it opens, paste below command and hit run:

sudo add-apt-repository ppa:ubuntuhandbook1/sigil

Type in your password (no visual feedback just type in mind) when it asks and hit Enter to continue.

2. After that, upgrade the software via Software Updater, or run below commands one by one in terminal:

sudo apt-get update

sudo apt-get install sigil

For those who don’t want to add PPA, grab the .debs for sigil-data and sigil packages at the PPA page.

3. (Optional) After installed the editor, you may disable/remove the PPA by going to System Settings -> Software & Updates -> Other Software.

Sigil Epub Editor Now Is Based on Qt 5.4.0+

Last updated: February 4, 2015

Sigil, a free and open-source EPUB e-books editor, gets a big update recently by releasing version 0.8.3 and 0.8.4 one day after.

One of the big changes is that now Qt 5.4.0 is the minimum required version for building Sigil. Since Qt 5.4.0 fixed the macdeployqt application and even integrated code signing, Mac OS X (>= 10.9.5) users no longer need to disable gatekeeper.

But for Ubuntu, this may not be good news since Ubuntu repositories still provide Qt 5.2 for 14.04 and Qt 5.3 for 14.10 (and 15.04). Users need to manually download & install Qt 5.4.0+ and compile Sigil from the source tarball.

Sigil release notes, binary packages for Windows & Mac, and source code are available at github.com.

For Ubuntu user, besides building the latest Sigil 0.8.4 source code as well as Qt 5.4.0 manually, the old 0.8.2 release can be easily installed from a third-party PPA (run below commands one by one or grab the .deb from link page).

sudo add-apt-repository ppa:i2p.packages/i2p

sudo apt-get update

sudo apt-get install sigil