This guide assumes you have an Ubuntu 22.04 host system running a QEMU VM with Windows. Your system needs two graphics cards: 1 for the Ubuntu host and 1 for the Windows guest. See this blog post for more background information on why and how I use Looking Glass.
.xml
for your VM. Either in the GUI (Virtual Machine Manager) or terminal: virsh edit PCJOEP-WIN11
, and:
<memballoon model="none" />
<shmem name ... />
See https://looking-glass.io/docs/B6/install/#installation for all details.
Download the Windows host binary from the downloads page and install.
Download and install spice-guest-tools-latest.exe to enable clipboard sharing between host and guest. You might need to re-open the Looking glass window. In the current version, B6, I have to re-install these tools often to re-enable the clipboard.
Download the Source archive from the downloads page.
Untar it: tar -xzvf looking-glass-B6.tar.gz
Install build dependencies:
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
Build the application:
cd looking-glass-B6
mkdir build
cd build
cmake ../
make
Move looking-glass-client
to your bin
folder, for example /usr/local/bin/looking-glass-client
.
Create a shell script: nano /home/<user>/scripts/lg-helper.sh
#!/bin/sh
export DISPLAY=:1 # change to your display port if different!
sleep 5 # can change delay depending on host
looking-glass-client win:size=1920x1200 -a yes
Create a service file: sudo nano /etc/systemd/system/looking-glass.service
[Unit]
Description=Looking Glass workaround
After=libvirt.service
Wants=libvirt.service
[Service]
Type=simple
# change to your username and group!
User=joep
Group=joep
# change to your path!
ExecStart=/home/joep/scripts/lg-helper.sh
[Install]
WantedBy=default.target
Open .bashrc
and add alias to start looking-glass service:
#Looking glass
alias looking-glass='sudo systemctl start looking-glass'
looking-glass
and enter your sudo password.