The following instructions will help you build Looking Glass from source code. Before attempting this, you should have a basic understanding of how to use the shell.
Visit the Looking Glass Download Page, and download the stable version (recommended). You can also download a bleeding-edge version, or the latest RC version during a Release Candidate cycle.
Developers can clone the source code repo with
git clone --recursive https://github.com/gnif/LookingGlass.git
Please only clone from Git if you’re a developer, and know what you’re doing. Looking Glass requires git submodules that must be setup and updated when building. Source code downloads from the website come bundled with the necessary submodules.
When using the latest bleeding-edge client version, you MUST download and install the corresponding host application.
Installing build dependencies¶
These required libraries and tools should be installed first.
The below list of dependencies is for Debian. A community maintained list of dependencies for other distributions for the current stable version of Looking Glass is maintained on the wiki at: https://looking-glass.io/wiki/Installation_on_other_distributions
May be disabled¶
These dependencies are required by default, but may be omitted if their feature is disabled when running cmake.
cmake -DENABLE_BACKTRACE=no ..
cmake -DENABLE_X11=no ..
cmake -DENABLE_WAYLAND=no ..
cmake -DENABLE_PIPEWIRE=no ..
cmake -DENABLE_PULSEAUDIO=no ..
fonts-dejavu-core(This is the default UI font, but a random font will be chosen if not available).
Fetching with APT¶
You can fetch these dependencies with the following command:
apt-get install binutils-dev cmake fonts-dejavu-core libfontconfig-dev \ gcc g++ pkg-config libegl-dev libgl-dev libgles-dev libspice-protocol-dev \ nettle-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev \ libxpresent-dev libxss-dev libxkbcommon-dev libwayland-dev wayland-protocols \ libpipewire-0.3-dev libpulse-dev libsamplerate0-dev
You may omit some dependencies if you disable the feature which requires them when running cmake. (See May be disabled)
If you’ve downloaded the source code as a zip file, simply unzip and
into the new directory. If you’ve cloned the repo with
into the LookingGlass directory.
mkdir client/build cd client/build cmake ../ make
This will build the
looking-glass-client binary, which is used to display
frames from the guest.
You can then continue installing Looking Glass, or run it directly from the build directory:
For users running GNOME on Wayland, you may want to enable
cmake -DENABLE_LIBDECOR=ON ../
For details, see the FAQ.
The most common compile error is related to backtrace support. Try disabling this when building:
cmake -DENABLE_BACKTRACE=0 ../
If you disable this and need support for a crash, use
gdb to obtain a
These instructions help you build the host yourself from the downloaded source code.
Building the host from source code is not recommended for most purposes, and should only be attempted by users who are prepared to handle issues on their own. Please download the pre-built binary installers from https://looking-glass.io/downloads for stability, and increased support.
The pre-built binaries also include NvFBC support built in, which is only available to current Nvidia SDK license holders, and cannot be enabled when building the host without also having a license.
For Windows on Windows¶
Download and install msys2 x86_64 from http://www.msys2.org/ following the setup instructions provided
Run the MSYS2 shell
Download build dependencies with pacman
pacman -Fy pacman -Sy git make mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake
Change directory to the source tree with
Configure the project and build it
mkdir host/build cd host/build cmake -G "MSYS Makefiles" .. make
For Linux on Linux¶
host/build directory, then run
mkdir host/build cd host/build cmake .. make
For Windows cross compiling on Linux¶
Like For Linux on Linux, but using the mingw64 toolchain to
cross-compile a Windows
mkdir host/build cd host/build cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-mingw64.cmake .. make
Building the Windows installer¶
Build the host on Linux.
apt-get install nsis
makensisto build the installer.
cd host/build/platform/Windows makensis installer.nsi
This will build