Re: Firegpg can't find gpg
Another thing I thought... FireGPG is complaining of an access problem... might it be the permissions?
$ ls -l /usr/bin/gpg
-rwxr-xr-x 1 root root 772112 Jun 6 00:38 /usr/bin/gpg
Are you returning similar?
Forum for the FireGPG's extention. (!Don't post too links or wait we unban your, akismet is very aggressive)
You are not logged in. Please login or register.
Another thing I thought... FireGPG is complaining of an access problem... might it be the permissions?
$ ls -l /usr/bin/gpg
-rwxr-xr-x 1 root root 772112 Jun 6 00:38 /usr/bin/gpg
Are you returning similar?
Definitely *not* permissions. I just confirmed that they are set to ownership root:root and mode 0755 (i.e. -rwxr-xr-x), and besides, I can run both executables and perform operations (encryption, key management, decryption, signing, etc) with them manually anyway.
Had a bit of free time so kept investigating this problem. I don't really understand code but was just following leads where I saw it... maybe this can help someone here at the forums who knows this code:
I trace the error message to the English locale file as: selfTestFailled=
selfTest function found in file cgpg.js line 549
which called subclass initGPGACCESS at line 662 same file
points to function tryToFoundTheRightCommand at line 667 same file
tryToFoundTheRightCommand() function found in cgpgaccess.js line 689
Here's the function that I think is causing the error to return on my system. It's a mess... specifically I can't understand HOW it's deciding if I have gpg or not... One thing I thought it maybe it's looking for gpg_path in my env path... but my distro (gentoo) doesn't have it there. Does anyways else have gpg in their path? (type env at the command line at look for anything gpg related).
Annnnny other leads muchly apprecated...
tryToFoundTheRightCommand: function () {
if(isUnix()) {
//Year, on linux no test, because it's a good Os.
//We only look if the user wants to force the path.
var prefs = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefService);
prefs = prefs.getBranch("extensions.firegpg.");
try {
var force = prefs.getBoolPref("specify_gpg_path");
}
catch (e) {
var force = false;
}
if (force == true)
this.GpgCommand = prefs.getCharPref("gpg_path");
else {
prefs.setCharPref("gpg_path","gpg");
this.GpgCommand = "gpg";
tryToFoundTheRightCommand}
}
else {
//Two choises : 1) The user want to set the path himself, so we use this.
var prefs = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefService);
prefs = prefs.getBranch("extensions.firegpg.");
try {
var force = prefs.getBoolPref("specify_gpg_path");
}
catch (e) {
var force = false;
}
if (force == true)
this.GpgCommand = prefs.getCharPref("gpg_path");
else {
//Or we will try to found a valid path.
//1) If there are allready a path set, he can be valid.
var gpg_path_in_options = prefs.getCharPref("gpg_path","");
if (gpg_path_in_options != "") {
this.GpgCommand = gpg_path_in_options;
if (this.selfTest() == true)
return; //It's work, yourou.
}
//2) We have to guess some path to see if it's work...
//TODO : Yes, it's horrible this copy/paste code...
//GNU ?
var testingcommand = "C:\\Program Files\\GNU\\GnuPG\\gpg.exe";
this.GpgCommand = testingcommand;
if (this.selfTest() == true)
{
//Don't forget to save the information for the nextime !
prefs.setCharPref("gpg_path",testingcommand);
return; //It's work, We're the best.
}
//Windows Privacy Tools ?
var testingcommand = "C:\\Program Files\\Windows Privacy Tools\\GnuPG\\gpg.exe";
this.GpgCommand = testingcommand;
if (this.selfTest() == true)
{
prefs.setCharPref("gpg_path",testingcommand);
//Don't forget to save the information for the nextime !
return; //It's work, mwahaha.
}
//Maybe in the path ?
var testingcommand = "gpg.exe";
this.GpgCommand = testingcommand;
if (this.selfTest() == true)
{
//Don't forget to save the information for the nextime !
prefs.setCharPref("gpg_path",testingcommand);
return; //It's work, hehehe.
}
}
}
}
};
tryToFoundTheRightCommand: function () { if(isUnix()) { //BEGIN TEST FOR LINUX //Year, on linux no test, because it's a good Os. //We only look if the user wants to force the path. var prefs = Components.classes["@mozilla.org/preferences-service;1"]. getService(Components.interfaces.nsIPrefService); prefs = prefs.getBranch("extensions.firegpg."); try { var force = prefs.getBoolPref("specify_gpg_path"); } catch (e) { var force = false; } if (force == true) this.GpgCommand = prefs.getCharPref("gpg_path"); //USE THE PATH SEPCIFIED IN OPTIONS else { prefs.setCharPref("gpg_path","gpg"); //USE 'GPG' AS THE BIN this.GpgCommand = "gpg"; tryToFoundTheRightCommand} } else { //IF USER ON WINDOWS //Two choises : 1) The user want to set the path himself, so we use this. var prefs = Components.classes["@mozilla.org/preferences-service;1"]. getService(Components.interfaces.nsIPrefService); prefs = prefs.getBranch("extensions.firegpg."); try { var force = prefs.getBoolPref("specify_gpg_path"); } catch (e) { var force = false; } if (force == true) this.GpgCommand = prefs.getCharPref("gpg_path"); //USE USER'S PATH IN OPTIONS else { //Or we will try to found a valid path. //1) If there are allready a path set, he can be valid. var gpg_path_in_options = prefs.getCharPref("gpg_path",""); //LOOK IF WE HAVE ALREADY FOND SOMETHINGS'S WORKING if (gpg_path_in_options != "") { this.GpgCommand = gpg_path_in_options; if (this.selfTest() == true) return; //It's work, yourou. //IF THE PATH IS CORRECT, WE RETURN, ALL WORKS } //2) We have to guess some path to see if it's work... //TODO : Yes, it's horrible this copy/paste code... //GNU ? var testingcommand = "C:\\Program Files\\GNU\\GnuPG\\gpg.exe"; //WE TRY THIS EXE. this.GpgCommand = testingcommand; if (this.selfTest() == true) { //Don't forget to save the information for the nextime ! prefs.setCharPref("gpg_path",testingcommand); return; //It's work, We're the best. //IF THE PATH IS CORRECT, WE RETURN, ALL WORKS } //Windows Privacy Tools ? var testingcommand = "C:\\Program Files\\Windows Privacy Tools\\GnuPG\\gpg.exe"; //WE TRY THIS this.GpgCommand = testingcommand; if (this.selfTest() == true) { prefs.setCharPref("gpg_path",testingcommand); //Don't forget to save the information for the nextime ! return; //It's work, mwahaha. //IF THE PATH IS CORRECT, WE RETURN, ALL WORKS } //Maybe in the path ? var testingcommand = "gpg.exe"; //TRY TEH DEFAULTS this.GpgCommand = testingcommand; if (this.selfTest() == true) { //Don't forget to save the information for the nextime ! prefs.setCharPref("gpg_path",testingcommand); return; //It's work, hehehe. //IF THE PATH IS CORRECT, WE RETURN, ALL WORKS } //IF WE'RE HERE, WE DID'nT FOUND A GPG WORDKING EXECUTABLE.... } } } };
I add some comments in maj (I don't cry ), hop it's will help you.
Well, it's been almost a year since I first tried to use fireGPG... it still isn't working for me. Is there anyway I could get some help on this, because I have looked at the code above but can't figure it out.
I am on gentoo, linux. I have gpg2 installed, gpg is in PATH, and /usr/bin/gpg is a symlink to gpg2.
$ which gpg
/usr/bin/gpg
$ ls -l /usr/bin/gpg
lrwxrwxrwx 1 root root 4 Apr 29 01:18 /usr/bin/gpg -> gpg2
The code listed in the last post apparently looks for gpg_path being set in fireGPG config, which I have tried to set, but it's apparently ignored. Failing that it looks for "gpg" in path (if I read the code correctly?) and I clearly have gpg in my path.
So I can't figure out what the problem is here. I wonder if having gpg2 installed is the problem? Does FireGPG support gpg2?
That's for anybody who can give me a hint... and I would be happy to provide any more info about my setup that's needed.
-Doug
Hi,
It's very very strange, and you'r not alone.
What the output of gpg --version ?
And wait for the next release - we change our system, maybe it's will works...
# gpg --version
gpg (GnuPG) 2.0.9
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
Used libraries: gcrypt(1.4.0)
It is strange, huh? OK, I'll wait for the next release and try again
I had an idea and I can't remember if I mentioned this before in an earlier post... but why don't we look at the code that they use in enigmail?? Enigmail is an open source and cross-platform thunderbird extension to handle GPG, so I'm sure they have exactly the code that we need (a function for determining where the gpg executable is). Wouldn't it be just a copy and paste? Or at least something to compare to...
If you don't have time, I'll check it out on Sunday when I have some free time and see if I can port it over to FireGPG, but I suck at coding and it'll take some time, lol...
Yes, the next release will work 'like' enigmail (same techniques, but not the same code)
Ok, then I will just be patient.
Thanks, the_glu.
Fixed?
I was getting "unable to access gpg executable" on Firefox 3 on Mac OS X 10.4
I had set the option "Specify the path of gpg" to /usr/local/bin/gpg
The solution for me was to go to about:config and set extensions.firegpg.specify_gpg_path to false , but leave exensions.firegpg.gpg_path set to "/usr/local/bin/gpg"
works perfectly now.
cheers
Anyone ever fxied this issue. Im running gpg on firefox 3 (portable) which always used to work but having not used it for monts, Ive come to use it today and got the exact same issue. Im going to try re-installing FireGPG and GPG itself but if anyones got suggestions Id love to hear them.
Just so people know, I reinstalled FireGPG and its all OK now. I also removed FireFTP so that may have caused a problem....
edit: although I have encountered another issue. When I come to export my public key the output is just:
[object Object]
On the text edit screen. :S
Last edited by AngryBadger (2008-10-21 11:52:52)
Thanks, the_glu. It's working 100% now on linux with FF3. Thanks!
Ubuntu 8.04 amd64
Firefox 3.0.5
FireGPG 0.6.3
gpg 1.4.6
I get "can't find executable" even though I've set the gpg path in FireGPG preferences. Any ideas?
Last edited by akwala (2009-01-08 01:47:06)
"It's dosen't works" is not an error message .
FireFTP installed ? Errors in console ?
The following shows up in the error console, twice, every time I launch the FireGPG options wizard:
Warning: Expected declaration but found '`'. Skipped to next declaration.
Source File: chrome://global/skin/add-ons/add-ons.css
Line: 47
Yes, I do have FireFTP installed -- I did see a reference to it the first time, but no details; do I need to disable or uninstall it in order to use FireGPG?
Currently the error dialog just complains about not finding the gpg executable; I specified the path in the FireGPG options, but that didn't fix it.
Maybe read messages before complain - Message about FireFTP was important.
Yes you can have to disable it.
I also have the problem with GPG.EXE and FireFTP. Is there any way to use FireFTP and FireGPG together?
I need the FireFTP and do not want do disable it for FireGPG.
I also have the problem with GPG.EXE and FireFTP. Is there any way to use FireFTP and FireGPG together?
I need the FireFTP and do not want do disable it for FireGPG.
Yes, I'm not clear on this either. If I HAVE to make a choice, FireGPG will go.
It's FireFTP's fault, go complain to them.
Hi,
this is the very easy way! Everybody points to the other one. The victim is the user.
This problem occurs since many months. Perhaps the developers of FirePGP and FireFTP should talk together and try to solve the problem together, instead of making the other one responsible for the problem, in order to really help the users who use both add-ins?
Bye
Ralf
Hi,
I don't try to put the fault on FireFTP, it's the reality, they use an outdated library !
I contact author, he is on vacation : https://www.mozdev.org/bugs/show_bug.cgi?id=20106
We know where is the problem, we talk together, and we know it's FireFTP who have to fix the problem.
Regards,
Last edited by the_glu (2009-01-26 08:38:39)
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 2 official extensions. Copyright © 2003–2009 PunBB.