Introduction to Gcr

The Gcr package contains libraries used for displaying certificates and accessing key stores. It also provides the viewer for crypto files on the GNOME Desktop.



Development versions of BLFS may not build or run some packages properly if dependencies have been updated since the most recent stable versions of the book.

Package Information

Gcr Dependencies


GLib-2.74.5, libgcrypt-1.10.1, and p11-kit-0.24.1



Gi-DocGen-2023.1 and Valgrind-3.20.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gcr

Installation of Gcr



Both gcr-3 and gcr-4 are coinstallable. This version of the package is used to support GTK-4 applications, such as gnome-shell-43.2.

Install Gcr by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release -Dgtk_doc=false .. &&

To test the results, issue: ninja test. The tests must be run from an X Terminal or similar.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dgtk=false: Use this switch if you haven't installed GTK-4.8.3. Note that gcr-viewer will not be installed if this is passed to meson.

-Dgtk_doc=true: Use this switch if you wish to generate the API reference documentation. Note that you must have Gi-DocGen-2023.1 installed, and use the following command to fix an issue in the build system before running cd build:

sed -e "/install_dir/s@,\$@ / 'gcr-4.0.0'&@" \
    -e "/fatal-warnings/d" -i docs/*/meson.build


Installed Program: gcr-viewer-gtk4
Installed Libraries: libgck-2.so, libgcr-4.so
Installed Directories: /usr/include/gck-2, /usr/include/gcr-4, and /usr/share/gtk-doc/html/{gcr,gck}

Short Descriptions


is used to view certificates and key files


contains GObject bindings for PKCS#11


contains functions for accessing key stores and displaying certificates