Add qubes-guivm-session utility

To be used in an xsession file (/usr/share/xsessions).
This commit is contained in:
Paweł Marczewski 2020-07-29 11:40:11 +02:00
parent c6be7ca5cc
commit 624e4e32fb
No known key found for this signature in database
GPG Key ID: DE42EE9B14F96465
3 changed files with 23 additions and 1 deletions

View File

@ -15,6 +15,7 @@ install:
install -m 0644 etc/qvm-start-daemon-kde.desktop $(DESTDIR)/etc/xdg/autostart/
install -d $(DESTDIR)/usr/bin
ln -sf qvm-start-daemon $(DESTDIR)/usr/bin/qvm-start-gui
install -m 0755 scripts/qubes-guivm-session $(DESTDIR)/usr/bin/
clean:
rm -rf test-packages/__pycache__ qubesadmin/__pycache__

View File

@ -634,7 +634,7 @@ class DAEMONLauncher:
continue
if not self.is_watched(vm):
return
continue
power_state = vm.get_power_state()
if power_state == 'Running':

21
scripts/qubes-guivm-session Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash -e
print_usage() {
cat >&2 <<USAGE
Usage: $0 vmname
Starts given VM and runs its associated GUI daemon. Used as X session for the
GUI domain.
USAGE
}
if [ $# -lt 1 ] ; then
print_usage
exit 1
fi
# Start VM, gui-daemon and audio
qvm-start --skip-if-running "$1"
qvm-start-daemon --watch "$1" &
# Run the inner session (Xephyr) and wait until it exits
exec qvm-run -p --no-gui --service "$1" qubes.GuiVMSession