aclap-dev / vdhcoapp

Companion application for Video DownloadHelper browser add-on
GNU General Public License v2.0
1.8k stars 290 forks source link

Location of binaries #47

Closed mb720 closed 4 years ago

mb720 commented 5 years ago

Hi and thanks a lot for Video DownloadHelper!

The application works fine for me in Firefox 67 on Arch Linux 5.1.2; I was wondering if there's a way to move the application's binaries from ~/net.downloadhelper.coapp-1.2.4 to somewhere like ~/.local/bin/.

Is this possible? I couldn't find a way in the Firefox add-on settings to define a new path to the binaries.

Thanks!

bobafetthotmail commented 5 years ago

I did some investigation because I'm trying to use this extension with firejail's sandboxing.

The application's user install command is just generating a config file in /home/YOUR_USERNAME/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json that points to where the application binary is currently located when you run the command. It does not move the binary application.

So if you place the binary application it to local/bin and then execute the install command again it should update the config file link and it should work fine afterwards.

This should work the same for Firefox/chrome and Windows too.

The paths of this config file for Chrome and the registry entries it adds for Windows installs are in the installer source file https://github.com/mi-g/vdhcoapp/blob/master/app/native-autoinstall.js

mb720 commented 4 years ago

Thanks Alberto, this worked for me, but I didn't have to run the install script again.

I opened the config file at

/home/me/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json

and changed the path of the binary like this:

"path": "/home/me/.local/bin/net.downloadhelper.coapp-1.2.4/bin/net.downloadhelper.coapp-linux-64",

I restarted Firefox and was able to use the companion app at the new path.