KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Jul 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    I'm not sure whether this is a GnuPG, KDE/Plasma5, and/or a Fedora 22 issue, but I am determined to find out.

    The Problem: KGpg fails to automatically start at login on Fedora 22 with KDE.

    I have KGpg configured with: Start KGpg automatically at login, selected.

    This option is located at:

    Configure KGpg, Misc, under the Global Settings tab.

    As some of you know, the GUI selection drives the setting:

    [User Interface]
    AutoStart=true

    in ~/.kde/share/config/kgpgrc. {Edit: This now reflects the correct path for Fed 22, as noted below}

    I am running: gpg2 --version = gpg (GnuPG) 2.1.5 + libgcrypt 1.6.3

    Following boot, and login, I have verified, using top, that KGpg is not running.

    Furthermore, there is no KGpg launch/configuration/encryption icon available in
    the System Tray, under Status & Notifications.

    If I want to use KGpg, I must manually start KGpg. Following this manual
    start, KGpg does indeed begin running, and is assigned a PID, then the
    KGpg icon does appear in the Status & Notifications section of the System Tray.

    Once manually launched, KGpg does work correctly.

    Importantly, note that KGpg does autostart correctly, with a properly functioning
    KGpg icon immediately available after login on both of my Gentoo Hardened and
    Debian 8 rigs. Each of those operating systems run GnuPG 2.0.6, and both use
    KDE with KGpg configured to automatically start at login.

    I do not know whether this issue is being caused by 2.1.15, or something
    KDE/Fedora did with KDE/Plasma5 in their release of Fed 22.

    I have already made the GnuPG devs aware of this issue, but they:

    1. Do not run Fedora
    2. Are not (obviously) responsible for upstream Fed/KDE issues.

    Any insights are appreciated.
    Last edited by Unable2Continue; 20th July 2015 at 04:26 AM. Reason: Corrected the path to the kgpgrc configuration file.

  2. #2
    Join Date
    Oct 2004
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    F22 KDE, Plasma 5:

    kgpg starts fine for me both when rebooting and when logging in and out. I have status icon and everything.

    My config however is in ".kde/share/config/kgpgrc" I don't have a ".kde4" top level directory at all in my /home.

    To me it suggest some configuration issue.

  3. #3
    Join Date
    Jul 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Hi Peter,

    First, I'm glad to know KGpg is working on your end, which leads me to believe this is not a universal issue.

    Second, thank you for pointing out my mistake concerning the correct path to the kgpgrc on Fed 22.

    My original post had the configuration path as:

    ~/.kde4/share/config/kgpgrc

    which I apparently mistakenly copied from my Gentoo Hardened box while trying to compare and contrast this KGpg fail between operating systems.

    Indeed, on my native Fed 22 Host, the kgpgrc config file is located in the same path as yours. To be clear, the Fed 22 config file is located at:

    ~/.kde/share/config/kgpgrc

    Again, to re-confirm, within kgpgrc, I have on my Fed 22 Host:

    [User Interface]
    AutoStart=true

    Yet AutoStart is most definitely: not autostarting.

    Peter, if you get a chance, can you post the output of:

    gpg2 --version

    I'd like to ensure we are actually comparing apples. Thanks.

    Cheers - U2C
    Last edited by Unable2Continue; 20th July 2015 at 04:36 AM. Reason: Added gpg2 -version request

  4. #4
    Join Date
    Oct 2004
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Code:
    gpg2 --version
    gpg (GnuPG) 2.1.5
    libgcrypt 1.6.3
    Some suggestions:

    Do you have a "/usr/share/autostart/kgpg.desktop" ?

    Try renaming the ".kde/share/config/kgpgrc" file to ".kde/share/config/kgpgrc.old" and start kgpg to reconfigure it.

    If that doesn't help, then try to make a temporary new account, login into that and try kgpg from there. It really ought to auto start from a fresh account, or else the problem isn't trivial to solve at all.

  5. #5
    Join Date
    Jul 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Ni hao Peter,

    Thanks for your follow-up. I have addressed your queries below.

    Your gpg2 matches mine:

    gpg2 --version
    gpg (GnuPG) 2.1.5
    libgcrypt 1.6.3

    Some suggestions:

    Do you have a "/usr/share/autostart/kgpg.desktop" ?

    Yes, I do:

    1. saved unchanged file to ORIGINAL

    Within kgpg.desktop, the only lines of potential interest look like:

    X-KDE-autostart-after=panel
    X-KDE-autostart-condition=kgpgrc:User Interface:AutoStart:false

    Categories=Qt;KDE;Utility;X-KDE-Utilities-PIM;

    2. changed 'Interface:AutoStart:true' - from its ORIGINAL value of false to true. Saved it.

    3. Rebooted

    4. ZERO impact. KGpg does not autostart.

    5. Reversed ^those changes.

    Try renaming the ".kde/share/config/kgpgrc" file to ".kde/share/config/kgpgrc.old" and start kgpg to reconfigure it.

    1. Done, and obviously reconfigured the new instance with autostart enabled.

    2. Rebooted

    3. ZERO impact. KGpg does not autostart.

    If that doesn't help, then try to make a temporary new account, login into that and try kgpg from there. It really ought to auto start from a fresh account, or else the problem isn't trivial to solve at all.

    1. Done, and obviously configured the new account with KGpg autostart enabled.

    2. Logged out and into new account

    3. ZERO impact. KGpg does not autostart.

    4. Rebooted, and logged in to new account.

    5. ZERO impact. KGpg does not autostart.

    I should also mention, but it should not matter, that I have 'Start with an empty session' enabled. That's under: System Settings, Startup & Shutdown, Desktop Session, On Login.

    Of course, all other background services expected to be autostarted, are in fact, autostarted.

    This KGpg failure to AutoStart becomes more irksome, daily.

  6. #6
    Join Date
    Oct 2004
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Hm. I suspect that kgpg actually autostarts, but for some reason crashes or shuts down during login. Perhaps a conflicting program that you have, but I don't?

    You have done all the "easy" debugging options. You can try to run "kdebugdialog5"* in "Konsole" as your normal user ID -> Enable debugging and mark everything, then press "OK" -> reboot. That ought to put some debug info into the journal.
    Try "journalctl -b | grep -i kgpg" and similar afterwards. If you are lucky this may provide a clue to why kgpg doesn't start.

    Another long shot is to copy the ""/usr/share/autostart/kgpg.desktop"" into /~.config/autostart/
    Perhaps turn off the "autostart" feature in kgpg before since it now will be started in another way.

    * I am unsure whether it is ""kdebugdialog5" or the old ""kdebugdialog" that shall be used. The documentation is very scarce, so you may try "kdebugdialog" if ""kdebugdialog5" doesn't give any info on kgpg. Also, remember to turn off the debugging info afterwards.

  7. #7
    Join Date
    Jul 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Hi Peter,

    The latest results are:

    Hm. I suspect that kgpg actually autostarts, but for some reason crashes or shuts down during login. Perhaps a conflicting program that you have, but I don't?

    Other than KGpg, the only program that I use that I am aware of interacting with gpg/gpg2 is Thunderbird's Enigmail add-on. Obviously, Enigmail's primary function is to encrypt and decrypt e-mail. As far as I know, Enigmail does not begin running until I fire up TBird.

    Kleopatra is installed on my system, but I do not use it.

    You have done all the "easy" debugging options. You can try to run "kdebugdialog5"* in "Konsole" as your normal user ID -> Enable debugging and mark everything, then press "OK" -> reboot. That ought to put some debug info into the journal.

    Try "journalctl -b | grep -i kgpg" and similar afterwards. If you are lucky this may provide a clue to why kgpg doesn't start.

    1. Enabled debugging with kdebugdialog5, using Select All. Apply, OK, Reboot.

    2. Following login, ran:

    journalctl -b | grep -i kgpg <-- shows nothing, and neither does grepping for gpg, gpg2, or gnupg. Checked all these as a user, and as root.

    Furthermore, KSystemLog shows nothing related to gpg.

    and neither does running: journalctl -xn

    3. Disabled debugging on kdebugdialog5.

    4. Enabled debugging with kdebugdialog, using Select All. Apply, OK, Reboot.

    Following login, ran:

    journalctl -b | grep -i kgpg <-- which again, shows nothing, and neither does grepping for gpg, gpg2, or gnupg. Checked all these as a user, and as root.

    Furthermore, KSystemLog shows nothing related to gpg.

    and neither does running: journalctl -xn

    5. Disabled debugging on kdebugdialog.

    Another long shot is to copy the ""/usr/share/autostart/kgpg.desktop"" into /~.config/autostart/
    Perhaps turn off the "autostart" feature in kgpg before since it now will be started in another way.

    1. Manually started KGpg.

    2. Disabled Start KGpg automatically at login. Apply, OK.

    Note: kgpg.desktop contains these seemingly involved lines:

    X-KDE-autostart-after=panel
    X-KDE-autostart-condition=kgpgrc:User Interface:AutoStart:false

    Categories=Qt;KDE;Utility;X-KDE-Utilities-PIM;

    3. Copied /usr/share/autostart/kgpg.desktop into my previously empty: ~/.config/autostart directory.

    4. Reboot.

    5. New AutoStart Approach, Same Result:

    KGpg failed to AutoStart.


    * I am unsure whether it is ""kdebugdialog5" or the old ""kdebugdialog" that shall be used. The documentation is very scarce, so you may try "kdebugdialog" if ""kdebugdialog5" doesn't give any info on kgpg. Also, remember to turn off the debugging info afterwards.

    Done and done.

  8. #8
    Join Date
    Jul 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Peter,

    Thank you for your assistance so far. I do appreciate it.

    However, I have decided to file a Bug Report to see if a resolution to this issue can be identified.

    That Bug Report is available here:

    https://bugzilla.redhat.com/show_bug.cgi?id=1245732

    I also referenced this thread in that report to avoid, to the extent possible, re-inventing the wheel.

    Please let me know if you have additional ideas for testing.

  9. #9
    Join Date
    Oct 2004
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    It is a really tricky problem you have.

    Having kgpg start at login by enabling it from the kgpg GUI, seems to rely on KDE's ability to restore sessions after logout. So if kgpg isn't running at log-out/shutdown it isn't restored at next login/boot, even though it is set to do so.

    To override the default for how kde starts and autostarts a program, try the following while using your normal user ID, not root:

    0. start "kgpg" manually from Konsole and check that autostart at login is enabled and that it will appear in the system tray (see the applet menu sub-menu).

    1. ensure that ".config/autostart/ " is empty. If you have other such overriding programs there (they have an ".desktop" extension), move them to another directory for the moment.

    2. copy the default startfile to the local user's autostart folder to override defaults:
    Code:
    cp /usr/share/autostart/kgpg.desktop /home/<your ID>.config/autostart/
    3. edit the ".config/autostart/kgpg.desktop" file by setting autostart to "true":
    Code:
    X-KDE-autostart-condition=kgpgrc:User Interface:AutoStart:true

    After a logout/login the above should brute force kgpg to start at login, overriding other default values.

    4. If the above still doesn't work, try adding either:
    Code:
    X-KDE-autostart-phase=2
    or
    Code:
    X-KDE-autostart-phase=1
    to the ".config/autostart/kgpg.desktop" file. This may solve some problems with KDE's restore mechanism trying to restore a program that is also being autostarted by other means.

    5. adding "Hidden=false" should be unnecessary ("Hidden=true" means no autostart) but as a desperate long shot worth trying if nothing else works.

    If it still doesn't work, I am pretty much out of ideas.

  10. #10
    Join Date
    Jul 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool {Workaround Identified} KGpg Fails to Autostart Fedora 22/KDE, Despite Being Enabled

    Hi Peter,

    Good news to report: Brute forcing KGpg to AutoStart does work.

    However, before I discuss what worked on my system, I do not want any reader of this thread to assume that this statement is universally true:

    Having kgpg start at login by enabling it from the kgpg GUI, seems to rely on KDE's ability to restore sessions after logout. So if kgpg isn't running at log-out/shutdown it isn't restored at next login/boot, even though it is set to do so.

    In fact, what you described above, represents my use case almost 100% of the time, yet KGpg AutoStart fails.

    To be clear what I mean, please note:

    The Logout - Login Test:

    1. KGpg manually started, KGpg AutoStart enabled, KGpg Key Manager open, and running with PID 3113.
    2. Logout, Login.
    3. KGpg Failed to AutoStart. This AutoStart failure mean KGpg has no PID assigned, no there is no KGpg icon available under Status & Notification (despite Show Icon in System Tray, being enabled).
    4. If I want to use KGpg, I must start it manually from Konsole, or from Fed 22's Start Menu.
    5. Following a manual start, KGpg runs normally.

    The Reboot Test:

    1. KGpg manually started, KGpg AutoStart enabled, KGpg Key Manager open, and running with PID 2699.
    2. Reboot.
    3. KGpg Failed to AutoStart. This AutoStart failure mean KGpg has no PID assigned, no there is no KGpg icon available under Status & Notification (despite Show Icon in System Tray, being enabled).
    4. If I want to use KGpg, I must start it manually from Konsole, or from Fed 22's Start Menu.
    5. Following a manual start, KGpg runs normally.

    Therefore, from my POV, KGpg Autostart is unrelated to whether KGpg was running in the prior session.

    Now, moving onto Peter's ideas to brute force KGpg to 'autostart.'

    As a workaround to KGpg's failure to AutoStart, this brute force method works on my Fed 22/KDE system:

    1. Manually start kgpg from Konsole:

    $ kgpg

    2. Ensure ~/.config/autostart is empty. My autostart directory contained one file , so I did:

    mv /home/<username>/.config/autostart/kgpg.desktop /home/<username>

    3. Copy the default startfile to the local user's autostart folder to override defaults:

    cp /usr/share/autostart/kgpg.desktop /home/<username>/.config/autostart/

    4. Edit the ".config/autostart/kgpg.desktop" file by setting autostart to "true" (from it's default value of 'false")

    X-KDE-autostart-condition=kgpgrc:User Interface:AutoStart:true

    5. Save, Close, Logout

    6. Following Login, note that KGpg is 'autostarted'. This means the KGpg icon is available in the System Tray, under Status & Notifications, and KGpg has been assigned a PID, and is running. Clicking on the KGpg icon shows that all KGpg functions work correctly.

    This brute force method is also known to survive subsequent logouts - logins, and reboots.

    Peter - thank you very much for your persistence in identifying a workaround. I appreciate your sustained efforts.

    I hesitate to mark this thread as {SOLVED} because I think that would be a misnomer.

    I think it would be utterly ridiculous to expect the average user to have jump through hoops to brute force KGpg to Autostart, even though they already had AutoStart enabled.

    From my POV, the relevant devs must figure what out is, or became, broken with KGpg AutoStart with the Fed 22/KDE system. Again, reverting to the beginning of this saga, I run several KDE-based operating systems, and the only one where KGpg fails to AutoStart is Fed 22.

    I hope this workaround leads the devs to the root cause of the KGpg AutoStart failure.

    Perhaps {Workaround Identified} as a thread Title modification would be more appropriate. That's the Title I am proceeding with at the moment.

    Any thoughts or comments are appreciated.

    Thanks again Peter!
    Last edited by Unable2Continue; 23rd July 2015 at 10:17 AM. Reason: Corrected typos

  11. #11
    Join Date
    Oct 2004
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Good it finally worked.

    Just some notes:
    The last manual "brute force" method was used to maximize the chance of success, and is probably "overkill".

    The official way of autostarting programs in KDE is actually quite easy and uses a nice GUI:

    Code:
    System Settings -> Startup and Shutdown -> Autostart -> Add program
    When you add a program like kgpg or LibreOffice KDE automatically makes a "kgpg.desktop" or "libreoffice.desktop" file in ".config/autostart/"

    You can autostart all programs like that. The KDE guys are working on Plasma5 so that also shell scripts also can be autostarted when placed in this folder.

    Usually people don't need to edit the ".desktop" file in the autostart folder. The :
    "X-KDE-autostart-condition=kgpgrc:User Interface:AutoStart:true"
    probably isn't needed either, but I included it to maximize the chance of success since the nature of the bug was unknown. All the option does is to override the program default for autostarting.

  12. #12
    Join Date
    Jul 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Hi Peter,

    Thank you for your follow-up comments. I understand.

    I am still baffled as to why KGpg is AutoStarting correctly on your system, particularly when I have a 'perfect' (3 for 3) record of Fed 22 KGpg AutoStart failure.

    I have appended the following to the Bugzilla report and also made the GnuPG devs aware of:

    +++++++++++++++++

    Additionally, note re: the failure of KGpg to AutoStart:

    All of the testing I've described in this bug report, and on the Fedora Forum link, was performed using a native Fed 22 system installed on a HDD. On this HDD-based system, I had previously run Fed 21, and used fedup to arrive at Fed 22.

    However, I also run Fed 22 as a Guest OS in both VBox and KVM. Installation of both of these virtual Guests was accomplished using the Fed 22 KDE Spin *.iso.

    IIRC, when Fed 22 is first cleanly installed from the *.iso, the gpg2 version installed is: 2.1.14. After the first: dnf upgrade is performed, gpg2 version 2.1.15 gets pulled in.

    Despite these differences, in all three of my Fed 22 installations, KGpg fails to AutoStart, despite being enabled.

    ++++++++++++++++++

    Peter, if you do not mind sharing, could you tell me how you installed Fed 22 on your system? I do not know whether the Fed 22 installation process is important or not, I'm just at the point of seeing if we can identify any key differences.

    Thanks again Peter.

  13. #13
    Join Date
    Oct 2004
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Quote Originally Posted by Unable2Continue
    Peter, if you do not mind sharing, could you tell me how you installed Fed 22 on your system? I do not know whether the Fed 22 installation process is important or not, I'm just at the point of seeing if we can identify any key differences.
    I made a fresh/clean install, no upgrade, from a live USB version of "Fedora 22 KDE Spin", not the Fedora 22 "Workstation" edition. The desktop PC is a fairly old Duo Core upgraded with a SSD and a passively cooled low end Radeon GPU.

    I migrated some settings from my previous F19 install. The most relevant being the PIM settings by using the "pimsettingexporter" program, and my gpg keys and settings.

    However, Kgpg works fine from a fresh account, so I don't think KDE program settings are the main issue here.

    I have turned off (masked) a few services like LVM (I don't use LVM), iscsi and audit.service.

    The bug you experience could be caused by some general problem with restoring sessions, since Kgpg seems to depend on that restore-process.

    So if you have eg. Libreoffice Write open with a document that you edit, and a browser and file manager, and then logout, are all the programs restored to the exact same state when logging in again?.

  14. #14
    Join Date
    Jul 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Peter,

    Thanks for the install details on your end.

    To address the theory that this failure is related to session restore, as I mentioned earlier, I have Startup and Shutdown, Desktop Settings, set to 'Start with an empty session'. This empty session is, in fact, exactly what happens following a logout, or shutdown.

    Therefore, irrespsective of what I had opened at the time I logged out, or rebooted, I start with clean session. I suppose, if what you generally mean is, can I 'restore' as I open the same applications, individually? To that, in general, I would say: yes. However, to the exact same state, in general, I would say: no.

  15. #15
    Join Date
    Oct 2004
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KGpg Fails to Autostart on Fedora 22 with KDE, Despite Being Enabled

    Quote Originally Posted by Unable2Continue
    Peter,

    Thanks for the install details on your end.

    To address the theory that this failure is related to session restore, as I mentioned earlier, I have Startup and Shutdown, Desktop Settings, set to 'Start with an empty session'. This empty session is, in fact, exactly what happens following a logout, or shutdown.

    Therefore, irrespsective of what I had opened at the time I logged out, or rebooted, I start with clean session. I suppose, if what you generally mean is, can I 'restore' as I open the same applications, individually? To that, in general, I would say: yes. However, to the exact same state, in general, I would say: no.
    Oh, that is very likely why Kgpg doesn't autostart. If you don't restore sessions when logging in and out, Kgpg won't autostart despite having it set to do so from the GUI.

    I think several other panel/tray residing programs also rely on "restore session" to be started automatically.

    Whether it is a bug in Kgpg, or just badly documented behavior I can't really say.

    But I suspect a bug; at least I find it very surprising that that the "kgpgrc" file in "/home/<username>/.kde/share/config" contains a section with:

    "[User Interface]
    AutoStart=true"

    And this is ignored if sessions aren't restored.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Pure-FTPD LDAP Fails with SSL Enabled
    By dolphinaura in forum Servers & Networking
    Replies: 1
    Last Post: 7th November 2013, 03:08 AM
  2. dhcp fails under selinux enabled for FC11
    By usctrojan77 in forum Using Fedora
    Replies: 1
    Last Post: 15th June 2009, 12:00 AM
  3. KGpg - what replaces it in Fedora 9 (GPG front end)
    By mik93 in forum Security and Privacy
    Replies: 3
    Last Post: 20th May 2008, 12:55 PM
  4. FC8 x86_64 install on Intel DQ965GF fails with Matrix RAID enabled
    By sfunk1x in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 27th March 2008, 09:07 PM
  5. passwd fails with selinux enabled
    By MadCow123 in forum Using Fedora
    Replies: 1
    Last Post: 7th April 2005, 08:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •