From f0de6c5b16ad7bf7674d72739b9372a0849f7b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 13 Nov 2015 05:32:44 +0100 Subject: [PATCH] Implement qubes.InstallUpdatesGUI qrexec service It should be up to the VM what GUI tool is used for installing updates. For now stick with console tools in xterm... Fixes QubesOS/qubes-issues#1249 --- Makefile | 1 + qubes-rpc/qubes.InstallUpdatesGUI | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 qubes-rpc/qubes.InstallUpdatesGUI diff --git a/Makefile b/Makefile index 611bd70..9ad0efe 100644 --- a/Makefile +++ b/Makefile @@ -228,6 +228,7 @@ install-common: install -m 0644 qubes-rpc/qubes.Select{File,Directory} $(DESTDIR)/etc/qubes-rpc install -m 0644 qubes-rpc/qubes.GetImageRGBA $(DESTDIR)/etc/qubes-rpc install -m 0644 qubes-rpc/qubes.SetDateTime $(DESTDIR)/etc/qubes-rpc + install -m 0755 qubes-rpc/qubes.InstallUpdatesGUI $(DESTDIR)/etc/qubes-rpc install -d $(DESTDIR)/usr/share/nautilus-python/extensions install -m 0644 qubes-rpc/*_nautilus.py $(DESTDIR)/usr/share/nautilus-python/extensions diff --git a/qubes-rpc/qubes.InstallUpdatesGUI b/qubes-rpc/qubes.InstallUpdatesGUI new file mode 100755 index 0000000..52a22e1 --- /dev/null +++ b/qubes-rpc/qubes.InstallUpdatesGUI @@ -0,0 +1,15 @@ +#!/bin/sh + +# This script should open some GUI to install updates. +# If you are creating package for other distribution, feel free to replace it +# with distribution-specific script. + +if [ -e /etc/redhat-release ]; then + xterm -title update -e su -l -c 'yum update; echo Done. Press Enter to exit.; read x' +elif [ -e /etc/debian_version ]; then + xterm -title update -e su -l -c 'apt-get update && apt-get -V dist-upgrade; echo Done. Press Enter to exit.; read x' +else + xterm -title update -e su -l -c 'echo Unsupported distribution, install updates manually; bash -i' +fi +# Notify dom0 about installed updates +su -c 'service qubes-update-check start'