Version: unspecified (using Devel) OS: Linux In a new install (with an upgrade to KDE 4.7.95 through the Kubuntu PPAs), KGpg fails to start (and thus I cannot import my keys). The error given is: GnuPG failed to start. You must fix the GnuPG error first before running KGpg. The dialogue gives the following details: gpg: option file `/home/lengau/.gnupg/options': No such file or directory gpg (version 1.4.11) works correctly from the shell, as does gpg2 (version 2.0.17 with libgcrypt 1.5.0). KGpg 2.6.2 on KDE 4.7.3 (using Kubuntu packages as well) works correctly (it offers a startup wizard). KGpg 2.6.2 (using Kubuntu packages) on KDE 4.7.95 works properly, though without the startup wizard (perhaps I don't have something installed? It doesn't offer a startup wizard even if I remove ~/.gnupg and ~/.kde/share/config/kgpgrc). I have marked the bug as a crash even though it exits normally because the program is unusable in this state (and the program does exit). Reproducible: Always Steps to Reproduce: 1. Remove ~/.gnupg and ~/.kde/share/config/kgpgrc 2. Start kgpg Actual Results: The error message listed in the bug details, followed by kgpg closing Expected Results: KGpg should run normally OS: Linux (x86_64) release 3.0.0-14-generic Compiler: gcc
Simply touching ~/.gnupg/options does not work with either kgpg 2.6.2 or 2.6.80, as it results in the following message: gpg: NOTE: old default options file `/home/lengau/.gnupg/options' ignored
You have the "options" file set as configuration file in your KGpg config. The new KGpg version is the first one to actually force GnuPG to use that config file, while older versions only passed the directory to GnuPG, so silently ignoring the wrong configuration. Open your ~/.kde4/share/config/kgpgrc and fix the gpg_config_path line to end in gpg.conf. Meanwhile I'll think about a good dialog to tell the user what's wrong.
This is the default state, with no ~/.kde/share/config/kgpgrc existing, nor any GPG settings. New versions of GPG don't seem to like using ~/.gnupg/options anymore.
If I start KGpg from a user account that does neither have ~/.gnupg nor kgpgrc GnuPG will create a ~/.gnupg and ~/.gnupg/gpg.conf, which the first run assistant will then pick up. So your kgpgrc with the wrong entry has existed before running KGpg for the first time after the upgrade.
Looks like the default options in /usr/share/kubuntu-default-settings/kde4-profile/default/share/config/kgpgrc sets gpg_config_path, which is where its getting the value from. Adding to ~/.kde/share/config/kgpgrc [GPG Settings] gpg_config_path=$HOME/.gnupg/gpg.conf fixed it for me (overriding the global default).
> Looks like the default options in > /usr/share/kubuntu-default-settings/kde4-profile/default/share/config/kgpgrc > sets gpg_config_path, which is where its getting the value from. Doh! Please file a bug for Kubuntu so they fix their stuff.
Hello...I discovered this bug report after adding my comments to bug 290113. I am also missing the kgpgrc file. I'm not running Kubuntu -- instead, I've simply installed KDE from the Ubuntu repositories. So I don't understand why a missing kgpgrc file would be considered a Kubuntu bug?
Got some help from bcooksley on the KDE forum: http://forum.kde.org/viewtopic.php?f=212&t=98666 He discovered a workaround, which is now reported in bug 291923: https://bugs.kde.org/show_bug.cgi?id=291923
Please run: find /usr/share -name kgpgrc If you find such a file, please check if there is a gpg_config_path entry in there. I bet it is, having the "options" file in it. If this is the case please report a bug to your distro to not ship a broken defaults file. Please also report back if there is no such file.
Kubuntu 11.10, KDE 4.7.4: yes, the file exists. It is in /usr/share/kubuntu-default-settings/kde4-profile/default/share/config/. And it contains the incorrect setting you've described. Curiously Ubuntu 12.04, KDE 4.7.97 installed from repos (not Kubuntu): the file does not exist. I manually downloaded kubuntu-default-settings for 12.04 and checked the default kgpgrc; it's still configured with the old $HOME/.gnupg/options value. I'll file a bug against Kubuntu. After going through the exercise described in bug 291923, I know understand why _this_ bug (290221) is for Kubuntu.
(In reply to comment #10) > Kubuntu 11.10, KDE 4.7.4: yes, the file exists. It is in > /usr/share/kubuntu-default-settings/kde4-profile/default/share/config/. And it > contains the incorrect setting you've described. > > Ubuntu 12.04, KDE 4.7.97 installed from repos (not Kubuntu): the file does not > exist. I manually downloaded kubuntu-default-settings for 12.04 and checked the > default kgpgrc; it's still configured with the old $HOME/.gnupg/options value. > I'll file a bug against Kubuntu. > > After going through the exercise described in bug 291923, I know understand why > _this_ bug (290221) is for Kubuntu.
Grr. Sorry for the double post. Trying to remove the word "Curiously" in the first paragraph!
A Kubuntu developer (Riddel) is already aware of this and promised to fix it when packaging SC4.8.
Bug https://bugs.launchpad.net/ubuntu/+source/kubuntu-default-settings/+bug/919460 covers this in Ubuntu I've uploaded new kubuntu-default-settings to stop trying to do clever things and just use the manual first run wizard Look out for kubuntu-default-settings version 11.10ubuntu4.1~oneiric1~ppa1 if you are wanting to get the fix
Hello: I've run into this problem with KGpg 2.7.3 on KDE 4.8.4, but I run Debian. "find /usr/share -name kgpgrc" returns nothing, so I guess this is an old default. I think kgpg should deal with this problem on config file update procedure. Would this be feasible? Regards,
Hello everyone, the only way to make KGpg launch again - w/o previously creating the $HOME/.gnupg/gpg.conf file - is by first renaming/removing ~/.kde4/share/config/kgpgrc. HTH Running KGpg on Chakra OS: Qt: 4.8.5 KDE Development Platform: 4.11.2 KGpg: 2.10.0
Dear all, It's 2016 and I still get the same error message on KGpg's first run. Which consequently doesn't run, but just holds. Editing /usr/share/mintkde-default-settings/kde4-profile/default/share/config/kgpgrc doesn't help and ~/.kde/share/config/kgpgrc is not even getting created. Fiddling around manually in ~/.gnupg doesn't return any wished or hoped for results either. So, I'm stuck with getting PGP running the graphical way under KDE, since Kleopatra also seems to be out of active maintenance too? BTW, happy newyear! -- Martin Grashoff Intending to run KGpg on LinuxMint 13 Qt: 4.8.1 KDE Development Platform: 4.8.5 (4.8.5) KGpg: 2.7.4
Distros sometimes put their configuration files at different places, so I fear you need do "find /usr /home -name kgpgrc" to find the wrong file. Seems like noone noticed LinuxMint to fix their 3 year old stuff in the last 3 years, so you still get the same bug.
Thanks for your quick response Rolf. Unfortunately I had already located and edited the kgpgrc default file, but that didn't solve the problem. So I just did it the old fashioned way with gpg from the command-line... BTW, Kleopatra still seems to be active. It even works.
KGpg will not use the "options" file when not explicitely told to. So this is either still hiding somewhere (try kreadconfig --file kgpgrc --group "GPG Settings" --key "gpg_config_path"), or there is something else going on. Try running kgpg from the command line and see if that prints anything helpful. If not, try running: strace -f -eopen kgpg --nofork > kgpg.log 2>&1 and then attach the logfile.
Created attachment 96484 [details] KGpg logfile after running strace
I just sent the logfile. This is what I did. I ran kreadconfig - which correctly told me what I already knew: @HOME/.gnupg I started kgpg from the command-line - which returned this message (twice): QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave. Finally, I ran strace - of which I just sent the logfile. I hope this is useful information for you guys who understand the intricacies of KDE.
> I ran kreadconfig - which correctly told me what I already knew: > @HOME/.gnupg That looks fishy, it should return the name of the configuration _file_, not _directory_. Otherwise it can't work. I get this: $ kreadconfig --file kgpgrc --group "GPG Settings" --key "gpg_config_path" /home/eike/.gnupg/gpg.conf
Aha. Where should I look to fish for a solution?
I mean, the _file_ ~/.gnupg/gpg.conf _is_ there.
> Aha. Where should I look to fish for a solution? You need to find the kgpgrc that sets the wrong gpg_config_path. Either fix it there or just remove it.
A full search revealed only one file: /usr/share/mintkde-default-settings/kde4-profile/default/share/config/kgpgrc - which is the default as installed by LinuxMint. The appropriate section there read: [GPG Settings] Groups= gpg_config_path=$HOME/.gnupg Obviously KGpg looks for a file and not just a path. Editing the last line into: gpg_config_path=$HOME/.gnupg/gpg.conf solved the problem. KGpg now starts & works fine. Thanks for help (for which I should not ask here...). So, if there is a 'bug' it seems to be this faulty default file installed by LinuxMint. I'll see if I can get that message through to them.