diff --git a/dangerzone/gui/__init__.py b/dangerzone/gui/__init__.py
index 65ccddd..a0c2a45 100644
--- a/dangerzone/gui/__init__.py
+++ b/dangerzone/gui/__init__.py
@@ -71,18 +71,6 @@ def gui_main(custom_container, filename):
# Allow Ctrl-C to smoothly quit the program instead of throwing an exception
signal.signal(signal.SIGINT, signal.SIG_DFL)
- # If we're using Linux and docker, see if we need to add the user to the docker group or if the user prefers typing their password
- if platform.system() == "Linux":
- if not gui_common.ensure_docker_group_preference():
- return
- try:
- if not gui_common.ensure_docker_service_is_started():
- click.echo("Failed to start docker service")
- return
- except AuthorizationFailed:
- click.echo("Authorization failed")
- return
-
# See if we need to install Docker...
if (platform.system() == "Darwin" or platform.system() == "Windows") and (
not is_docker_installed() or not is_docker_ready(global_common)
diff --git a/dangerzone/gui/common.py b/dangerzone/gui/common.py
index b6478c4..4ee9bd2 100644
--- a/dangerzone/gui/common.py
+++ b/dangerzone/gui/common.py
@@ -142,95 +142,6 @@ class GuiCommon(object):
return pdf_viewers
- def ensure_docker_group_preference(self):
- # If the user prefers typing their password
- if self.global_common.settings.get("linux_prefers_typing_password") == True:
- return True
-
- # Get the docker group
- try:
- groupinfo = grp.getgrnam("docker")
- except:
- # Ignore if group is not found
- return True
-
- # See if the user is in the group
- username = getpass.getuser()
- if username not in groupinfo.gr_mem:
- # User is not in the docker group, ask if they prefer typing their password
- message = "Dangerzone requires Docker
In order to use Docker, your user must be in the 'docker' group or you'll need to type your password each time you run dangerzone.
Adding your user to the 'docker' group is more convenient but less secure, and will require just typing your password once. Which do you prefer?"
- return_code = Alert(
- self,
- self.global_common,
- message,
- ok_text="I'll type my password each time",
- extra_button_text="Add my user to the 'docker' group",
- ).launch()
- if return_code == QtWidgets.QDialog.Accepted:
- # Prefers typing password
- self.global_common.settings.set("linux_prefers_typing_password", True)
- self.global_common.settings.save()
- return True
- elif return_code == 2:
- # Prefers being in the docker group
- self.global_common.settings.set("linux_prefers_typing_password", False)
- self.global_common.settings.save()
-
- # Add user to the docker group
- p = subprocess.run(
- [
- "/usr/bin/pkexec",
- "/usr/sbin/usermod",
- "-a",
- "-G",
- "docker",
- username,
- ]
- )
- if p.returncode == 0:
- message = "Great! Now you must log out of your computer and log back in, and then you can use Dangerzone."
- Alert(self, self.global_common, message).launch()
- else:
- message = "Failed to add your user to the 'docker' group, quitting."
- Alert(self, self.global_common, message).launch()
-
- return False
- else:
- # Cancel
- return False
-
- return True
-
- def ensure_docker_service_is_started(self):
- if not is_docker_ready(self.global_common):
- message = "Dangerzone requires Docker
Docker should be installed, but it looks like it's not running in the background.
Click Ok to try starting the docker service. You will have to type your login password."
- if (
- Alert(self, self.global_common, message).launch()
- == QtWidgets.QDialog.Accepted
- ):
- p = subprocess.run(
- [
- "/usr/bin/pkexec",
- self.global_common.get_resource_path(
- "enable_docker_service.sh"
- ),
- ]
- )
- if p.returncode == 0:
- # Make sure docker is now ready
- if is_docker_ready(self.global_common):
- return True
- else:
- message = "Restarting docker appeared to work, but the service still isn't responding, quitting."
- Alert(self, self.global_common, message).launch()
- else:
- message = "Failed to start the docker service, quitting."
- Alert(self, self.global_common, message).launch()
-
- return False
-
- return True
-
class Alert(QtWidgets.QDialog):
def __init__(
diff --git a/install/linux/media.firstlook.dangerzone-container.policy b/install/linux/media.firstlook.dangerzone-container.policy
deleted file mode 100644
index 4e0a847..0000000
--- a/install/linux/media.firstlook.dangerzone-container.policy
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Run Dangerzone Container
- Dangerzone needs you to authenticate to run containers
-
- auth_admin_keep
- auth_admin_keep
- auth_admin_keep
-
- /usr/bin/dangerzone-container
-
-
diff --git a/setup.py b/setup.py
index ce53640..67b8ecc 100644
--- a/setup.py
+++ b/setup.py
@@ -34,10 +34,6 @@ setuptools.setup(
["install/linux/media.firstlook.dangerzone.png"],
),
("share/dangerzone", file_list("share")),
- (
- "share/polkit-1/actions",
- ["install/linux/media.firstlook.dangerzone-container.policy"],
- ),
],
classifiers=[
"Programming Language :: Python",
diff --git a/share/enable_docker_service.sh b/share/enable_docker_service.sh
deleted file mode 100755
index ca0f29d..0000000
--- a/share/enable_docker_service.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-/bin/systemctl restart docker.service
-/bin/systemctl enable docker.service
\ No newline at end of file