diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 024a3d5..137a8b1 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -418,6 +418,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow): self.context_menu.addAction(self.action_updatevm) self.context_menu.addAction(self.action_run_command_in_vm) + self.context_menu.addAction(self.action_open_console) self.context_menu.addAction(self.action_resumevm) self.context_menu.addAction(self.action_startvm_tools_install) self.context_menu.addAction(self.action_pausevm) @@ -773,6 +774,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow): or vm.qid == 0) self.action_run_command_in_vm.setEnabled( not vm.get_power_state() == "Paused" and vm.qid != 0) + self.action_open_console.setEnabled( + not vm.get_power_state() == "Paused" and vm.qid != 0) self.action_set_keyboard_layout.setEnabled( vm.qid != 0 and vm.get_power_state() != "Paused" and vm.is_running()) @@ -789,6 +792,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow): self.action_editfwrules.setEnabled(False) self.action_updatevm.setEnabled(False) self.action_run_command_in_vm.setEnabled(False) + self.action_open_console.setEnabled(False) self.action_set_keyboard_layout.setEnabled(False) self.update_logs_menu() @@ -1113,6 +1117,15 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow): thread.finished.connect(self.clear_threads) thread.start() + # noinspection PyArgumentList + @QtCore.pyqtSlot(name='on_action_open_console_triggered') + def action_open_console_triggered(self): + # pylint: disable=invalid-name + + vm = self.get_selected_vm() + subprocess.Popen(['qvm-console-dispvm', vm.name], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + # noinspection PyArgumentList @QtCore.pyqtSlot(name='on_action_set_keyboard_layout_triggered') def action_set_keyboard_layout_triggered(self): diff --git a/ui/qubemanager.ui b/ui/qubemanager.ui index 8f03fd5..2926ace 100644 --- a/ui/qubemanager.ui +++ b/ui/qubemanager.ui @@ -24,8 +24,7 @@ - - + .. @@ -53,7 +52,16 @@ QLayout::SetDefaultConstraint - + + 0 + + + 0 + + + 0 + + 0 @@ -141,10 +149,10 @@ false - + 150 - + 150 @@ -263,7 +271,7 @@ Template 0 0 1100 - 23 + 24 @@ -332,6 +340,7 @@ Template + @@ -385,6 +394,7 @@ Template + @@ -720,8 +730,7 @@ Template - - + .. &Qubes OS @@ -890,6 +899,19 @@ Template Virtualization Mode + + + + :/log.png + :/log.png:/log.png + + + Open console in qube + + + Open a secure Xen console in the qube. Useful chiefly for debugging purposes: for normal operation, use "Run Terminal" from the Domains widget. + +