You are not logged in.
Pages: 1
My session is Plasma5.
The first time I create a gpg key, everything works well.
But after I removed my former gpg key and create a new one something changed.(the new one's name is the same as the former one)
After reboot, I got a warning that 'gpr-agent is not running'
All my configuration is the same as https://wiki.archlinux.org/index.php/GnuPG#gpg-agent.
and I could start it manually.
So, what's the problem?
Last edited by paleneutron (2014-11-06 05:11:38)
Offline
So, where did you configure it for autostart?
Offline
Paleneutron, it looks like you hit report rather than reply:
I am not sure, maybe:
~/.gnupg/gpg.confuse-agent
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'll run with it ![]()
If you don't know, I'm going to assume that you didn't configure it at all. As the wiki entry states:
gpg-agent is mostly used as daemon to request and cache the password for the keychain. This is useful if GnuPG is used from an external program like a mail client. It can be activated by adding following line in gpg.conf:
~/.gnupg/gpg.conf use-agentThis tells GnuPG to use the agent whenever it needs the password. However, the agent needs to be already running. To autostart it, add the following entry to your .xinitrc or .bash_profile.
That part is what you have done. Below it, it states that you need to autostart gpg-agent and it seems you skipped that part. So, please read the part under gpg-agent to figure out how to set it up (autostart gpg-agent). I think you'll need to edit your .bash_profile as your session is a plasma session.
Last edited by runical (2014-11-06 15:02:58)
Offline
Paleneutron, it looks like you hit report rather than reply:
paleneutron wrote:I am not sure, maybe:
~/.gnupg/gpg.confuse-agent
I am so sorry I have report a post again before I realized what happens... TAT
Offline
I see it.
Unfortunately, I have edited my .bash_profile as wiki and it works well before I delet my former key.
And I could not restart gpg-agent manually by:
~$ sh .bash_profile
That's the reason why I am not sure which commad to start my gpg-agent.
Please try to click quote and not report. ![]()
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
I see it.
paleneutron wrote:Unfortunately, I have edited my .bash_profile as wiki and it works well before I delet my former key.
And I could not restart gpg-agent manually by:
~$ sh .bash_profile
That's the reason why I am not sure which commad to start my gpg-agent.Please try to click quote and not report.
Or just leave the quote out
(Something new: Troubleshooting with the moderators as relay)
sh .bash_profileHmm. I don't think that that command would fix it (not only because bash_profile is not an SH script but a bash script).
Can you try executing the mentioned code via a script file and post the output here?
Put it in a file and execute the file with
bash [filename]EDIT: Can you also post your .bash_profile?
Last edited by runical (2014-11-06 15:51:45)
Offline
fsckd wrote:I see it.
paleneutron wrote:Unfortunately, I have edited my .bash_profile as wiki and it works well before I delet my former key.
And I could not restart gpg-agent manually by:
~$ sh .bash_profile
That's the reason why I am not sure which commad to start my gpg-agent.Please try to click quote and not report.
Or just leave the quote out
(Something new: Troubleshooting with the moderators as relay)
sh .bash_profileHmm. I don't think that that command would fix it (not only because bash_profile is not an SH script but a bash script).
Can you try executing the mentioned code via a script file and post the output here?
Put it in a file and execute the file withbash [filename]EDIT: Can you also post your .bash_profile?
My .bash_profile:
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
#gpg-agent is mostly used as daemon to request and cache the password for the keychain
envfile="$HOME/.gnupg/gpg-agent.env"
if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then
eval "$(cat "$envfile")"
else
eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "$envfile")"
fi
export GPG_AGENT_INFO # the env file does not contain the export statement
export SSH_AUTH_SOCK # enable gpg-agent for sshAfter login I tried:
➜ ➜ ~ echo $GPG_AGENT_INFO
➜ ~ pgrep gpg-agent
➜ ~ bash .bash_profile
➜ ~ pgrep gpg-agent
790
➜ ~ and another problem happens, I could not logout.
When I tried to logout, the process stacked at"/dev/sda1:clean XXXXX" on the screen.
So I have to reboot instead of logout and login.
Last edited by paleneutron (2014-11-07 01:09:09)
Offline
You have removed a comment hash from the line that starts: "gpg-agent is mostly..."
Offline
You have removed a comment hash from the line that starts: "gpg-agent is mostly..."
Yes...
But! It's not the reason cause the problem.
The issue still troubles me after I fix the comment...
See the post I have edited.
Offline
So your .bash_profile isn't being sourced by your {display,login} manager...
Offline
So your .bash_profile isn't being sourced by your {display,login} manager...
Hmm... That's the point.
So... my assumption is that I have a problem with sddm so that I got another problem with logout.
My display manager is sddm.
But why sddm broke after I delete a key... and I have no idea to fix it.
Last edited by paleneutron (2014-11-07 08:37:10)
Offline
You can try removing SDDM's settings and see if this helps. Another option is to add the script to the KDE autostart, although that will only fix it in KDE, not in other sessions.
Offline
You can try removing SDDM's settings and see if this helps. Another option is to add the script to the KDE autostart, although that will only fix it in KDE, not in other sessions.
I found this in my /usr/share/sddm/scripts/Xsession.
#! /bin/sh
# Xsession - run as user
# This file is extracted from kde-workspace (kdm/kfrontend/genkdmconf.c)
# Copyright (C) 2001-2005 Oswald Buddenhagen <ossi@kde.org>
session=$1
# Note that the respective logout scripts are not sourced.
case $SHELL in
*/bash)
[ -z "$BASH" ] && exec $SHELL $0 "$@"
set +o posix
[ -f /etc/profile ] && . /etc/profile
if [ -f $HOME/.bash_profile ]; then
. $HOME/.bash_profile
elif [ -f $HOME/.bash_login ]; then
. $HOME/.bash_login
elif [ -f $HOME/.profile ]; then
. $HOME/.profile
fi
;;
*/zsh)
[ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
emulate -R sh
[ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc
zhome=${ZDOTDIR:-$HOME}
# zshenv is always sourced automatically.
[ -f $zdir/zprofile ] && . $zdir/zprofile
[ -f $zhome/.zprofile ] && . $zhome/.zprofile
[ -f $zdir/zlogin ] && . $zdir/zlogin
[ -f $zhome/.zlogin ] && . $zhome/.zlogin
;;Does it meens the sddm only source zsh's profile if my $SHELL is zsh?
Maybe...So, I am confused about why my gpg-agent works well at the very beginning...
Offline
Well, yes. If you change your shell, the startup behaviour changes. It doesn't make any sense to source bash files if the shell is zsh, does it?
Did you change the shell with chsh?
Offline
Well, yes. If you change your shell, the startup behaviour changes. It doesn't make any sense to source bash files if the shell is zsh, does it?
Did you change the shell with chsh?
Interesting, I used zsh as my shell since I useradd this account.
I'll try to move this autostart command from `.bash_profile` to `.xprofile`.
===========
It works!
Also, I can logout as usual. XD
Thanks a lot!
Offline
No problem. Please mark the thread as solved by editing the first post and putting [Solved] in front of the current title.
Offline
Pages: 1