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.

XCB Utils Dependencies

Required

libxcb-1.17.0 and xcb-proto-1.17.0

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.5.tar.xz
xcb-util-errors-1.0.1.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://xcb.freedesktop.org/dist/

Installation of XCB Utils

[Note]

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.so, libxcb-image.so, libxcb-keysyms.so, libxcb-render-util.so, libxcb-ewmh.so, libxcb-icccm.so, libxcb-cursor.so, and libxcb-errors.so
Installed Directories: None

Short Descriptions

libxcb-util.so

provides utility functions for other XCB utilities

libxcb-image.so

is a port of Xlib's XImage and XShmImage functions

libxcb-keysyms.so

provides the standard X key constants and API functions for conversion to/from keycodes

libxcb-render-util.so

provides convenience functions for the Render extension

libxcb-ewmh.so

provides the client and window-manager helpers for EWMH

libxcb-icccm.so

provides the client and window-manager helpers for ICCCM

libxcb-cursor.so

is a port of Xlib's libXcursor functions

libxcb-errors.so

gives human-readable errors and codes