Running a Desktop Environment inside a PVH-VM

I’m rather new on QubesOS and one of my use cases requires publicly displaying running VMs next to each other in a presentation.

I have two HVMs. One of them being a Windows VM displaying the login screen and then the Windows Desktop. The second one is a Linux HVM. For several reasons I would like to use the Linux VM in PVH-mode instead. As you know in PVH-mode there is no DE. Therefore I tried to create a script starting a DE:

#! /bin/bash
export DISPLAY=:0
Xnest :1 -geometry 1920x1080+0+0 -ac -name desktop &

export DISPLAY=:1
openbox &

This is a starting point but the problem I’m facing looks like this:

No matter what kind of desktop I install with pacman (I’m using arch, btw :wink:) there seems to be no meta-package installing an entire desktop environment with a modern look&feel. All distros nowadays deliver init scripts, setups, icons, backgrounds, screen-saver and -locker during their install. If one wants to install the DE later these are missing.

Anyone having an idea how to address this? Openbox does not have to be the desktop of choice. It looks like PVHs on Qubes are performant enough to run a KDE or a Gnome environment as well.

Edit: it looks like only openbox needs to be setup by hand. Plasma and Cinnamon bring along most of their own stuff.

You can use VNC if you just need the DE:

Interesting approach and thank you for sharing. Give me some time to study the entire thread. My first impression is that

-xstartup /usr/bin/gnome-session

is the crucial part of the tigervncserver invocation and I might be able to use that with Xnest :1 similarly. That would remove the vnc overhead.

There isnt a great overhead.

Or you can:
pacman -S xorg-xserver-xephyr
pacman -S plasma-desktop

#! /bin/bash
Xephyr -br -ac -noreset -screen 1024x768 :1 &
sleep 3
DISPLAY=:1 startplasma-x11 &

I never presume to speak for the Qubes team. When I comment in the Forum I speak for myself.
2 Likes

Awesome. Thank you.

Using Cinnamon with Xnest threw a lot of errors, but KDE and Cinnamon run out of the box with Xephyr.

As explained in this article installing and especially running different DEs can break stuff:

For instance Gnome on a Xephyr display crashed my entire VM - maybe because I ran one of the other aforementioned alternatives beforehand.