Debdeep Bhattacharya

View My GitHub Profile

Installing xournal from source and adding useful patches

15 Feb 2019

Xournal is an excellent lightweight software for note-taking with active stylus. However, the development is slow and many community-developed features are not always a part of the main release.

Comment: I would recommend checking out Xournalpp, which is a re-write of xournal in C++.

So, in Ubuntu, apt-get install doesn’t give you the latest version (e.g. now it is the 2.8.2016 version) or the patches the community developed. Here are the steps.

To install the development dependencies, do

sudo apt-get build-dep xournal

Download the latest tarball, extract it with

tar -xf xournal.**.tar.gz
cd xournal.**

Details of patching can be found here: Here is the summary:

Patch the source code with the download patch file

patch -p1 < patchfile.patch

Note: if the patchfile is a tar file, extract and then -p1 should be changed to -p2 or the required number of depth of path.

Compile and install this modified source file, following this link. The steps for this can be summarized by:

So far, I have used the following patches: various improvements, linewidth-patch, vi-style scrolling

Caution: If you use the linewidth-patch, older versions of xournal will not be able to open the files saved by the patched version. Chances are, this patch will not end up in the official version in future, making all the files created with the patched version useless.

To log the input events, add the following line at the top of the file src/xo-callbacks.c:

#define INPUT_DEBUG 1

This will return all the input events from xinput list to the terminal window from which which launch xournal.

Then, compile and run from terminal to see all the input events popping up at the terminal.