gtk-layer-demo command not found

In this troubleshooting guide we learn how to fix gtk-layer-demo command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

gtk-layer-demo: command not found

or when using sudo you get the following error message

sudo: gtk-layer-demo: command not found

Solutions to gtk-layer-demo: command not found

How To Fix gtk-layer-demo: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu gtk-layer-demo is provided by gtk-layer-shell-examples package.

gtk-layer-shell-examples is:

A library to write GTK applications that use Layer Shell. This library only makes sense on Wayland compositors that support Layer Shell, and will not work on X11. It supports all Layer Shell features including popups and popovers (GTK popups Just Work™). Please open issues for any bugs you come across.

This package contains the example files and a demonstration program.

To fix this problem, we can install more using the command below.

sudo apt-get -y install gtk-layer-shell-examples

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install gtk-layer-shell-examples.

sudo apt -y install gtk-layer-shell-examples

Or if you have aptitude installed you can use the following command.

sudo aptitude install gtk-layer-shell-examples

Summary

In this tutorial we learn how to fix gtk-layer-demo command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.