XCB Utils

#### Gaming Linux® From Scratch - Version 13.0

### Chapter 8. Basic X11 Software

- Prev

  libxcvt-0.1.3

- Next

  D-Bus-1.16.2

- Up
- Home

# XCB Utils

## Introduction to XCB Utils

The XCB collection of utilities provide useful libraries for developers to use for X window manager and Wayland compositor development. The installed packages below should be good enough for most packages.

- Download: https://xorg.freedesktop.org/archive/individual/lib/

### XCB Utils Dependencies

Required
libxcb-1.17.0 and xcb-proto-1.17.0

### BLFS Equivalent Packages

This combined page installs what would be in BLFS:

- xcb-util

- XCB Utilities

## Downloading XCB Utils

First, create a list of files to be downloaded:

    cat > xcb-utils-list << "EOF"
    xcb-util-0.4.1.tar.xz
    xcb-util-image-0.4.1.tar.xz
    xcb-util-keysyms-0.4.1.tar.xz
    xcb-util-renderutil-0.3.10.tar.xz
    xcb-util-wm-0.4.2.tar.xz
    xcb-util-cursor-0.1.6.tar.xz
    EOF

To download the needed files using Wget-1.25.0, use the following commands:

    mkdir xcb-utils &&
    cd xcb-utils &&
    grep -v '^#' ../xcb-utils-list | wget -i- -c \
        -B https://xorg.freedesktop.org/archive/individual/lib/

## Installation of XCB Utils

### Note

When installing multiple packages in a script, the installation needs to be done as the root user. There are three general options that can be used to do this:

1. Run the entire script as the root user (not recommended).

2. Use the sudo command from the sudo package.

3. Use su -c "command arguments" (quotes required) which will ask for the root password for every iteration of the loop.

One way to handle this situation is to create a short bash function that automatically selects the appropriate method. Once the command is set in the environment, it does not need to be set again.

    as_root()
    {
      if   [ $EUID = 0 ];        then $*
      elif [ -x /usr/bin/sudo ]; then sudo $*
      else                            su -c \\"$*\\"
      fi
    }

    export -f as_root

First, start a subshell that will exit on error:

    bash -e

Install all of the packages by running the following commands:

    for package in $(grep -v '^#' ../xcb-utils-list)
    do
      packagedir=${package%.tar.?z*}
      tar -xf $package
      pushd $packagedir
         ./configure $XORG_CONFIG
         make
         as_root make install
      popd
      rm -rf $packagedir
    done

Finally, exit the shell that was started earlier:

    exit

## Contents

Installed Programs: None
Installed Libraries: libxcb-util, libxcb-image, libxcb-keysyms, libxcb-render-util, libxcb-ewmh, libxcb-icccm, and libxcb-cursor
Installed Directories: None

### Short Descriptions

`libxcb-util` | provides utility functions for other XCB utilities
`libxcb-image` | is a port of Xlib's XImage and XShmImage functions
`libxcb-keysyms` | provides the standard X key constants and API functions for conversion to/from keycodes
`libxcb-render-util` | provides convenience functions for the Render extension
`libxcb-ewmh` | provides the client and window-manager helpers for EWMH
`libxcb-icccm` | provides the client and window-manager helpers for ICCCM
`libxcb-cursor` | is a port of Xlib's libXcursor functions

- Prev

  libxcvt-0.1.3

- Next

  D-Bus-1.16.2

- Up
- Home