Mailing List Archive

Change socketdir from ~/.gnupg to /run/user/
Hi,

I am using gpg inside a docker container. By default, there is no
/run/user/ in the container so gpg defaults to ~/.gnupg as socket
directory. Is there a provision to change the socket directory later?
Now, I would like to create /run/user/$(id -u)/gnupg and use this as
the default socket directory. Is there a way to kill the existing agent
and relaunch it with the new socket directory?


Thanks,
Vijai Kumar K

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Change socketdir from ~/.gnupg to /run/user/ [ In reply to ]
On Tue 2019-06-18 04:03:45 -0400, vijai kumar via Gnupg-users wrote:
> I am using gpg inside a docker container. By default, there is no
> /run/user/ in the container so gpg defaults to ~/.gnupg as socket
> directory. Is there a provision to change the socket directory later?
> Now, I would like to create /run/user/$(id -u)/gnupg and use this as
> the default socket directory. Is there a way to kill the existing agent
> and relaunch it with the new socket directory?

Ideally, you'd ensure that /run/user/$(id -u) is created during the
session launch within the docker container, so that it's present from
the beginning.

If you already have an agent running from before /run/user/$(id -u)
exists, you can kill it with a SIGTERM. A new agent will be launched
appropriately using /run/user/$(id -u) automatically when it is needed.

all the best,

--dkg

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Change socketdir from ~/.gnupg to /run/user/ [ In reply to ]
On Tue, Jun 25, 2019 at 11:37:07AM -0400, Daniel Kahn Gillmor wrote:
> On Tue 2019-06-18 04:03:45 -0400, vijai kumar via Gnupg-users wrote:
> > I am using gpg inside a docker container. By default, there is no
> > /run/user/ in the container so gpg defaults to ~/.gnupg as socket
> > directory. Is there a provision to change the socket directory later?
> > Now, I would like to create /run/user/$(id -u)/gnupg and use this as
> > the default socket directory. Is there a way to kill the existing agent
> > and relaunch it with the new socket directory?
>
> Ideally, you'd ensure that /run/user/$(id -u) is created during the
> session launch within the docker container, so that it's present from
> the beginning.
>
> If you already have an agent running from before /run/user/$(id -u)
> exists, you can kill it with a SIGTERM. A new agent will be launched
> appropriately using /run/user/$(id -u) automatically when it is needed.
>
> all the best,
>
> --dkg

Thank You Daniel!

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users