diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py
index 07baf7a..f707162 100755
--- a/qubesmanager/settings.py
+++ b/qubesmanager/settings.py
@@ -704,6 +704,11 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
self.seamless_on_button.clicked.connect(self.enable_seamless)
self.seamless_off_button.clicked.connect(self.disable_seamless)
+ if hasattr(self.vm, "template_for_dispvms"):
+ self.dvm_template_checkbox.setChecked(self.vm.template_for_dispvms)
+ else:
+ self.dvm_template_checkbox.setVisible(False)
+
def enable_seamless(self):
self.vm.run_service_for_stdio("qubes.SetGuiMode", input=b'SEAMLESS')
@@ -759,6 +764,18 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
except Exception as ex: # pylint: disable=broad-except
msg.append(str(ex))
+ if getattr(self.vm, "template_for_dispvms", False) != \
+ self.dvm_template_checkbox.isChecked():
+ try:
+ self.vm.template_for_dispvms = \
+ self.dvm_template_checkbox.isChecked()
+ if self.dvm_template_checkbox.isChecked():
+ self.vm.features["appmenus-dispvm"] = True
+ else:
+ del self.vm.features["appmenus-dispvm"]
+ except Exception as ex: # pylint: disable=broad-except
+ msg.append(str(ex))
+
return msg
def include_in_balancing_changed(self, state):
diff --git a/ui/settingsdlg.ui b/ui/settingsdlg.ui
index 833d31e..d7d5d3d 100644
--- a/ui/settingsdlg.ui
+++ b/ui/settingsdlg.ui
@@ -779,7 +779,7 @@ border-width: 1px;
15
- -
+
-
Default DispVM:
@@ -789,17 +789,17 @@ border-width: 1px;
- -
+
-
- -
+
-
Boot qube from CDROM
- -
+
-
-
@@ -825,6 +825,16 @@ The qube must be running to disable seamless mode; this setting is not persisten
+ -
+
+
+
+
+
+ Allow starting DisposableVMs from this qube
+
+
+