1 Installing
liquibyte edited this page 2026-11-19 16:23:31 -06:00

Installing

How to build Gamut from its source, what the build makes, how to run it from the source folder or install it for the whole system, and what Gamut writes the first time it starts.

1. What you need

Gamut runs on Linux with an X11 display. It is built from source with make, so you need a C compiler that understands -std=gnu17 (the Makefile calls gcc), make, pkg-config, and the development files of these libraries:

Libraries What Gamut uses them for
X11, Xext, Xrender, Xrandr, Xfixes, Xdamage, Xcomposite, Xft, Xpm and Xtst The windows, the text, the screen capture of the picker and the overlay, and the keys the overlay sees through the XRecord extension (part of Xtst).
OpenGL (GL), EGL and GLES 2 The measurement overlay draws through OpenGL. EGL and GLES 2 are used by Gamut's own backend for WPE WebKit.
fontconfig and FreeType Fonts.
Little CMS 2 Exact conversions between color spaces.
WPE WebKit 2.0, libwpe 1.0 (and GLib and libsoup 3, which they bring) The web page in the Design window.

On Debian, Devuan or Ubuntu, for example:

sudo apt install build-essential pkg-config \
    libx11-dev libxext-dev libxrender-dev libxrandr-dev libxfixes-dev \
    libxdamage-dev libxcomposite-dev libxft-dev libxpm-dev libxtst-dev \
    libgl-dev libegl-dev libgles-dev \
    libfontconfig-dev libfreetype-dev liblcms2-dev \
    libglib2.0-dev libwpewebkit-2.0-dev libwpe-1.0-dev libsoup-3.0-dev

On other distributions, install the development packages of the same libraries. Gamut needs no GTK or Qt: its windows are drawn by Xtk, its own widget toolkit, which is part of the source tree.

2. Getting the source and building

git clone https://gitlab.com/liquibyte/gamut.git
cd gamut
make

The build treats every compiler warning as an error. It makes two files in the source folder:

File What it is
gamut The program.
libWPEBackend-gamut.so Gamut's own small backend for WPE WebKit, which draws the Design window's page. The program looks for it beside itself, and for an installed program in ../lib/gamut beside its bin folder.

make clean removes both files and every object file, so that the next make builds everything again.

3. Running Gamut

./gamut

Gamut runs straight from the folder it was built in; you do not have to install it. It has no command-line options. Its main window opens at once, and the Design window's browser engine is started just after the main window has appeared, so that you see the window at once. Gamut writes nothing into the source folder: everything it keeps goes into your home folder (see section 5).

4. Installing for the whole system

sudo make install

make install refuses to run when gamut or libWPEBackend-gamut.so has not been built yet, and says which one is missing. It installs:

What Where
The program /usr/bin/gamut
The WPE WebKit backend /usr/lib/gamut/libWPEBackend-gamut.so
The menu entry (Graphics, "Gamut", "Color Picker") /usr/share/applications/gamut.desktop
The icon, in seven sizes from 16 to 256 pixels, and as SVG /usr/share/icons/hicolor/SIZExSIZE/apps/gamut.png and /usr/share/icons/hicolor/scalable/apps/gamut.svg
The manual page (man gamut) /usr/share/man/man1/gamut.1

PREFIX changes /usr, for example sudo make install PREFIX=/usr/local. For a package, make install DESTDIR=folder puts the same files under that folder instead of the real root. sudo make uninstall (with the same PREFIX and DESTDIR) removes the installed files. Your settings in your home folder stay.

The application icon and the pictures of the help pages are built into the program, so an installed Gamut needs no other files.

5. The first run

The first time it starts, Gamut makes its folder, ~/.config/gamut/, and fills it. When $XDG_CONFIG_HOME is set to a full path (one that starts with /), the folder is $XDG_CONFIG_HOME/gamut/ instead; everything below is then in that folder.

In ~/.config/gamut What it is
themes/ The 14 built-in themes as theme files, yours to change (see Settings and Themes). A built-in theme that is missing from it is written again at every start.
editor_theme/ One file for each of the ten editor themes of the Settings tab, with that theme's colors.
help/ Gamut's built-in help pages, which the Design window shows. They are written again at every start.
gamut.conf The names of the chosen main theme and editor theme. The first one is Dark, for both. And Gamut's icon theme (icon-theme=), empty at first: as every xtk program.
~/.config/xtk/icons.conf The icon theme of every xtk program that does not choose its own; desktop at first. Unryu, Hanshi and Skein set it in their Preferences.

Other files appear as you use Gamut: state.dat (everything Gamut remembers between runs, written when it closes), zoom.xpm (the magnifier's last picture), file_dialog.txt (what the Open CSS File dialog remembers), and the files of the measurement overlay in measure/. The complete list is in Tips and Troubleshooting.

To put Gamut back to how it was at its first start, close it and delete or rename Gamut's folder. The themes, the editor themes and the help pages are written again at the next start. (Earlier versions kept the measurement overlay's files in ~/.local/share/measure/; Gamut reads them from there while its own are missing, so delete that folder too if it is still there.)

Next: First Steps, a tour of the main window.