This commit is contained in:
Daniel Langbein 2023-08-13 16:13:44 +02:00
parent e7759f7303
commit e6761efd87
2 changed files with 5 additions and 4 deletions

View File

@ -92,7 +92,7 @@ fi
## Note about "interactive, non-login, shell" ## Note about "interactive, non-login, shell"
The gnupg manual is talking about "login shell" but mentions "~/.bashrc", The gnupg manual is talking about "login shell" but mentions "~/.bashrc",
so I assume they mean a "interactive, non-login, shell". so I assume they mean an "interactive, non-login, shell".
See https://wiki.archlinux.org/title/bash#Configuration_files See https://wiki.archlinux.org/title/bash#Configuration_files
Correct files to set `SSH_AGENT_PID` and `GPG_TTY`: Correct files to set `SSH_AGENT_PID` and `GPG_TTY`:
@ -100,9 +100,9 @@ Correct files to set `SSH_AGENT_PID` and `GPG_TTY`:
* `/etc/bash.bashrc` * `/etc/bash.bashrc`
* `/etc/zsh/zshrc` * `/etc/zsh/zshrc`
These not work: These do not work:
* `/etc/profile.d/99_gnupg.sh` does **not** work! * `/etc/profile.d/99_gnupg.sh`
> `/etc/profile` This file should be sourced by all POSIX sh-compatible shells > `/etc/profile` This file should be sourced by all POSIX sh-compatible shells
> upon login: it sets up $PATH and other environment variables and application-specific > upon login: it sets up $PATH and other environment variables and application-specific
> (/etc/profile.d/*.sh) settings upon login. > (/etc/profile.d/*.sh) settings upon login.

View File

@ -4,6 +4,7 @@
set -e set -e
cat cat
# shellcheck disable=SC2016
echo ' echo '
GPG_TTY=$(tty) GPG_TTY=$(tty)
export GPG_TTY export GPG_TTY
@ -18,4 +19,4 @@ fi'
# Source import of public key # Source import of public key
if [ -f ~/import-pubkey ]; then if [ -f ~/import-pubkey ]; then
. /etc/bashrc . /etc/bashrc
fi fi