From 72b7d24423635bc43d0f87e5bb1f1ebc010fb5f5 Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Mon, 13 May 2024 10:21:41 +0200 Subject: [PATCH 1/2] Use Browser/start-tor-browser instead of .desktop file This should have no functional consequence but will help with allowing to start the browser with non-default options. --- torbrowser_launcher/common.py | 2 +- torbrowser_launcher/launcher.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/torbrowser_launcher/common.py b/torbrowser_launcher/common.py index e2aa39f..8d1e2f0 100644 --- a/torbrowser_launcher/common.py +++ b/torbrowser_launcher/common.py @@ -155,7 +155,7 @@ def build_paths(self, tbb_version=None): "start": tbb_local + "/tbb/" + self.architecture - + "/tor-browser/start-tor-browser.desktop", + + "/tor-browser/Browser/start-tor-browser", }, } diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py index d339366..8161a68 100644 --- a/torbrowser_launcher/launcher.py +++ b/torbrowser_launcher/launcher.py @@ -478,7 +478,8 @@ def run(self): # Run Tor Browser subprocess.call( - [self.common.paths["tbb"]["start"]], cwd=self.common.paths["tbb"]["dir_tbb"] + [self.common.paths["tbb"]["start"], "--detach"], + cwd=self.common.paths["tbb"]["dir_tbb"], ) sys.exit(0) From 51e7f99ebe01696ceda2e926b546058cf3b6122f Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Mon, 13 May 2024 10:22:16 +0200 Subject: [PATCH 2/2] Properly handle URLs passed from command line Previous, URL arguments passed from the command line were ignored (the "url_list" attribute in Launcher class was unused). We now pass the list to start-tor-browser which will open a tab with each URL. Fix #380. --- torbrowser_launcher/launcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py index 8161a68..2e2e029 100644 --- a/torbrowser_launcher/launcher.py +++ b/torbrowser_launcher/launcher.py @@ -478,7 +478,7 @@ def run(self): # Run Tor Browser subprocess.call( - [self.common.paths["tbb"]["start"], "--detach"], + [self.common.paths["tbb"]["start"], "--detach"] + self.url_list, cwd=self.common.paths["tbb"]["dir_tbb"], ) sys.exit(0)