diff --git a/dangerzone/cli.py b/dangerzone/cli.py index 60926931e..1d31c05e2 100644 --- a/dangerzone/cli.py +++ b/dangerzone/cli.py @@ -6,9 +6,11 @@ from colorama import Back, Fore, Style from . import args, errors +from .conversion.common import running_on_qubes from .document import ARCHIVE_SUBDIR, SAFE_EXTENSION from .isolation_provider.container import Container from .isolation_provider.dummy import Dummy +from .isolation_provider.qubes import Qubes from .logic import DangerzoneCore from .util import get_version @@ -63,6 +65,8 @@ def cli_main( if getattr(sys, "dangerzone_dev", False) and dummy_conversion: dangerzone = DangerzoneCore(Dummy()) + elif running_on_qubes(): + dangerzone = DangerzoneCore(Qubes()) else: dangerzone = DangerzoneCore(Container(enable_timeouts=enable_timeouts)) diff --git a/dangerzone/gui/__init__.py b/dangerzone/gui/__init__.py index a40a7e4de..255f119e7 100644 --- a/dangerzone/gui/__init__.py +++ b/dangerzone/gui/__init__.py @@ -21,9 +21,11 @@ from PySide2 import QtCore, QtGui, QtWidgets from .. import args, errors +from ..conversion.common import running_on_qubes from ..document import Document from ..isolation_provider.container import Container from ..isolation_provider.dummy import Dummy +from ..isolation_provider.qubes import Qubes from ..util import get_resource_path, get_version from .logic import DangerzoneGui from .main_window import MainWindow @@ -100,6 +102,9 @@ def gui_main( if getattr(sys, "dangerzone_dev", False) and dummy_conversion: dummy = Dummy() dangerzone = DangerzoneGui(app, isolation_provider=dummy) + elif running_on_qubes(): + qubes = Qubes() + dangerzone = DangerzoneGui(app, isolation_provider=qubes) else: container = Container(enable_timeouts=enable_timeouts) dangerzone = DangerzoneGui(app, isolation_provider=container) diff --git a/dangerzone/gui/main_window.py b/dangerzone/gui/main_window.py index 101f32d08..a4b17866b 100644 --- a/dangerzone/gui/main_window.py +++ b/dangerzone/gui/main_window.py @@ -24,6 +24,7 @@ from ..document import SAFE_EXTENSION, Document from ..isolation_provider.container import Container, NoContainerTechException from ..isolation_provider.dummy import Dummy +from ..isolation_provider.qubes import Qubes from ..util import get_resource_path, get_subprocess_startupinfo, get_version from .logic import Alert, DangerzoneGui @@ -71,8 +72,10 @@ def __init__(self, dangerzone: DangerzoneGui) -> None: self.waiting_widget: WaitingWidget = WaitingWidgetContainer(self.dangerzone) self.waiting_widget.finished.connect(self.waiting_finished) - elif isinstance(self.dangerzone.isolation_provider, Dummy): - # Don't wait with dummy converter + elif isinstance(self.dangerzone.isolation_provider, Dummy) or isinstance( + self.dangerzone.isolation_provider, Qubes + ): + # Don't wait with dummy converter and on Qubes. self.waiting_widget = WaitingWidget() self.dangerzone.is_waiting_finished = True