1 Building and Installing
liquibyte edited this page 2026-11-19 16:23:32 -06:00

Building and Installing

How to build Skein from its source, what it needs, how to run it from the source folder, and which files to copy where to install it, since its Makefile has no install target.

1. What you need

Skein is one program with no other projects to install first: the toolkit that draws its window (xtk) is in the src/ folder and is compiled straight into it. To build it you need a C compiler that understands -std=gnu17 (GCC; the Makefile calls gcc), make, pkg-config, and the development files of SQLite and of these X11 libraries: X11, Xrender, Xft, fontconfig, freetype, Xcursor, Xext and Xpm. On Debian and Ubuntu, for example:

sudo apt install build-essential pkg-config libsqlite3-dev libx11-dev libxrender-dev \
    libxft-dev libfontconfig-dev libfreetype-dev libxcursor-dev libxext-dev libxpm-dev

SQLite must have its full-text search module (FTS5), as the SQLite of most distributions has.

To run, Skein needs an X11 display with a window manager (any that follows the usual ICCCM and EWMH conventions), at least one font that fontconfig finds, and, to open web links, xdg-open (from xdg-utils). Pictures are shown only on Linux 5.13 or later on x86-64 or ARM64; see Safety.

2. Building

Command What it does
make Builds the program ./skein in the source folder. The build treats every warning as an error. It removes the object files when the program is linked, so each make compiles every file again.
make clean Removes the object files and the program.

3. Running from the source folder

./skein [project-file]

Run from the source folder, Skein finds its icons in the icons/ folder beside the program. See Projects and Saving for what the project name does, and the home page for the first run.

4. Installing

The Makefile has no install target, so you copy the files yourself. For an installation in /usr/local:

File Where it goes Why
skein /usr/local/bin/skein The program.
icons/ (with its outline/ and filled/ folders) /usr/local/share/skein/icons/ Skein looks for its icons in icons/ beside the program and, failing that, in ../share/skein/icons/ from the program's folder. Without them it draws no icons.
fonts/latinmodern-math.otf ~/.local/share/fonts/ or /usr/local/share/fonts/, then run fc-cache The math font of the equations (Settings > Editor > LaTeX math font). Skein asks fontconfig for it by name and does not read the fonts/ folder itself. Its license is in fonts/LATIN-MODERN-MATH-LICENSE.txt.
skein.desktop ~/.local/share/applications/ or /usr/local/share/applications/ Puts Skein in your desktop's application menu, under Office.
artwork/skein-icon-48.png (and the other sizes) Your icon theme, as skein.png, for example ~/.local/share/icons/hicolor/48x48/apps/skein.png The icon of the desktop file. The window's own icon is built into the program.

For another place, keep the same layout: the program in prefix/bin and the icons in prefix/share/skein/icons.

Skein keeps nothing else outside your home folder. Its settings, themes and the state of Markdown folders are in ~/.config/skein, made at the first run (the themes are in $XDG_CONFIG_HOME/skein/themes when XDG_CONFIG_HOME is set to a full path, one that starts with /). The backups of a project and SQLite's working files lie beside the project file.