On Wed, Jul 27, 2022 at 09:08:59AM -0300, Chris Mitchell wrote: > On Tue, 26 Jul 2022 21:54:18 +0200 > Erwan David <[email protected]> wrote: > > > ssh-agent is usually started by your session manager. I do not know > > wether all DE use this, but you can find it in > > > > /etc/X11/Xsession.d/90x11-common_ssh-agent > > True. The snippet in that file is nested in a conditional, though: > if has_option use-ssh-agent; then > … > > If I'm not mistaken, disabling "use_ssh_agent" in > /etc/X11/Xsession.options causes that conditional to fail, so > /etc/X11/Xsession.d/90x11-common_ssh-agent will do nothing. > > man Xsession(5) uses the wording "If the line ‘use-ssh-agent’ is > present in Xsession.options", but man Xsession.options(5) says "All of > the above options are enabled by default" and instructs to disable > them by prefixing the option with "no-". Prior experience suggests that > commenting the line out *is* sufficient to disable it,
It isn't, see below.
> but just to be
> sure I have uncommented the line and changed it to "no-use-ssh-agent".
> Even after a reboot, this has made no difference to the situation.
I think it doesn't work as you think it does. Obviously, has_option
is a shell function. It is defined in /etc/X11/Xsession:
has_option() {
# Ensure that a later no-foo overrides an earlier foo
if [ "$(echo "$OPTIONS" | grep -Eo "^(no-)?$1\>" | tail -n 1)" = "$1" ];
then
return 0
else
return 1
fi
}
Why prefixing things with `no-' doesn't help you I can't say either.
Since this is all shell script, I'd insert some code in your
90x11-common_ssh-agent to clarify the situation. E.g. some little
thing echoing hello to some file in /tmp at strategic places.
Then you know whether to continue chasing that one or looking elsewhere.
Cheers
--
t
signature.asc
Description: PGP signature

