how to load ssh-agent into x11/sddm

Kurt Hackenberg kh at panix.com
Wed Jul 14 21:31:45 UTC 2021


On 2021/07/14 13:07, tech-lists wrote:

> Before now, I'd start x11/kde5 from the console with xinit. Before
> starting with xinit, I'd run ssh-agent. The purpose of doing this was to
> have my ssh agent loaded in any subsequent terminal session after kde
> loaded.
> 
> now with x11/sddm the (sddm) greeter comes up before I can grab the 
> console and load ssh-agent.
> 
> What I'd like to know is, is it possible to load ssh-agent once either
> before, or within, the sddm greeter so that previous ssh-agent behaviour 
> is restored?


I've never used ssh-agent, just read the man page, not sure I fully 
understand it, but...

Xinit and display managers run one executable supplied by the user, 
which becomes a process, runs other processes, waits for them to exit, 
then exits itself, then the display manager or xinit shuts everything 
down. Usually that one executable is a shell script -- .xinitrc, 
.xsession, whatever.

Looks like the idea is that ssh-agent becomes that one process, sets up 
some environment variables, and then runs some other executable, which I 
guess would be the original one process -- .xinitrc or .xsession. So you 
wouldn't have to run ssh-agent by hand, just configure sddm to run it 
and have it run your .xinitrc.

How's that sound?


More information about the freebsd-questions mailing list