Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Add support for Brave Browser #250

Open
ryanthomas-org opened this issue Nov 16, 2019 · 5 comments · May be fixed by #260
Open

Add support for Brave Browser #250

ryanthomas-org opened this issue Nov 16, 2019 · 5 comments · May be fixed by #260

Comments

@ryanthomas-org
Copy link

ryanthomas-org commented Nov 16, 2019

I managed to get this working in brave by installing from the Chrome Web Store, then adding the following to line 66 (under "def install()" and "locations") of open_with_linux.py:

'brave': os.path.join(home_path, '.config', 'BraveSoftware', 'Brave-Browser-Dev', 'NativeMessagingHosts'),

For a while I was trying to use:
'brave': os.path.join(home_path, '.config', 'brave', 'NativeMessagingHosts'),

For some reason on my system, both ~/.config/brave/NativeMessagingHosts and ~/.config/BraveSoftware/Brave-Browser-Dev/NativeMessagingHosts exist, but it was the latter that worked.

My Brave installation is a bit of a mystery to me these days, in that I generally launch Brave via the binary brave-browser-dev but brave-browser seems to load the same configuration, so it took a while before it even occurred to me to look for an alternate config path. You might want to account for both.

For purposes of adding a searchable paper trail to help others get here, with open_with.json installed in the wrong place, when I pressed Test Installation button in options.html, my Browser Console was yielding

options.html:1 Unchecked runtime.lastError: Specified native messaging host not found.

Anyway, thank you for this awesome tool! I can't wait to tie it to some scripts ;)

addBraveSupport.patch.txt

@noyannus
Copy link

Seconded.
Please add Brave to the auto-detected browsers.

Meanwhile, a workaround is: duplicate another browser's entry, then modify the name and path. For the image, a take manually downloaded picture.

@grahamperrin
Copy link

Orientation

Four files at https://github.com/darktrojan/openwith/tree/master/webextension/native

Collaboration

From #256 (comment):

Optimistically: a single PR at https://github.com/darktrojan/openwith/pulls might add support for both Waterfox Current and Brave.

tl;dr Waterfox Current is based on Firefox ESR 68.

Content of the patch from #250 (comment) above:

--- open_with_linux.bak.py	2019-11-16 15:21:01.764783997 -0600
+++ open_with_linux.py	2019-11-16 15:49:57.092113557 -0600
@@ -63,6 +63,7 @@
 	}
 	locations = {
 		'chrome': os.path.join(home_path, '.config', 'google-chrome', 'NativeMessagingHosts'),
+		'brave': os.path.join(home_path, '.config', 'BraveSoftware', 'Brave-Browser-Dev', 'NativeMessagingHosts'),
 		'chromium': os.path.join(home_path, '.config', 'chromium', 'NativeMessagingHosts'),
 		'firefox': os.path.join(home_path, '.mozilla', 'native-messaging-hosts'),
 	}
@@ -114,6 +115,9 @@
 	apps = [
 		'Chrome',
 		'Chromium',
+		'brave',
+		'brave-browser',
+		'brave-browser-dev',
 		'chromium-browser',
 		'firefox',
 		'Firefox',

grahamperrin added a commit to grahamperrin/openwith that referenced this issue Mar 1, 2020
Aiming to fix darktrojan#250

* focusing first on Linux
@grahamperrin

This comment has been minimized.

@hawkeye116477
Copy link

hawkeye116477 commented Mar 1, 2020

@grahamperrin I'm not sure, but maybe you should also add waterfox-current to Apps array.

@grahamperrin grahamperrin linked a pull request Mar 1, 2020 that will close this issue
grahamperrin added a commit to grahamperrin/openwith that referenced this issue Mar 1, 2020
Addition of `waterfox-current` re: darktrojan#250 (comment)
@sebma
Copy link

sebma commented Mar 14, 2020

@grahamperrin Hi, I tried your modifications from your 7510cb2 commit, but it didn't do anything.

I had to replace Brave-Browser-Dev by Brave-Browser for the script to work :

$ ls -ld ~/.config/BraveSoftware/Brave-Browser-Dev
ls: cannot access /home/abcdxyzt/.config/BraveSoftware/Brave-Browser-Dev: No such file or directory
$ ls -ld ~/.config/BraveSoftware/Brave-Browser
drwx------ 1 abcdxyzt abcdxyzt 1056 mars  14 02:36 /home/abcdxyzt/.config/BraveSoftware/Brave-Browser/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants