Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #272676

Re: emacs service and session start

From Erwan David <erwan@rail.eu.org>
Newsgroups linux.debian.user
Subject Re: emacs service and session start
Date 2024-08-29 08:00 +0200
Message-ID <JgGml-8oTT-5@gated-at.bofh.it> (permalink)
References (3 earlier) <JeFup-741g-9@gated-at.bofh.it> <JfbXj-7rnD-3@gated-at.bofh.it> <JfCXw-7IBJ-7@gated-at.bofh.it> <JfGeJ-7KDF-11@gated-at.bofh.it> <JfKBH-7NME-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 26, 2024 at 06:13:23PM CEST, Max Nikulin <manikulin@gmail.com> said:
> On 26/08/2024 18:37, Erwan David wrote:
> > > > On 23/08/2024 23:30, Max Nikulin wrote:
> > > > > 
> > > > > It is started by /etc/X11/Xsession.d/90x11-common_ssh-agent
> > > > > The question is why emacs.service is started before
> > > > > /usr/lib/openssh/agent-launch or plasma copies SSH_AUTH_SOCKET value to
> > > > > systemd environment.
> [...]
> > Alas it does not work.
> 
> Sounds like a race between code that copies environment and starting emacs.
> Have you tried to disable ssh-agent in Xsession to start it from systemd?
> Without it I am not sure that the following is really reliable:
> 
> [Unit]
> After=dbus.service ssh-agent.service
> Wants=dbus.service ssh-agent.service
> [Install]
> WantedBy=
> WantedBy=graphical-session-pre.target

After some investigations :
plasma uses le /etc/X11/Xsession script, which sources
/etc/X11/Xsession.d/*

In the sourced snippets is /etc/X11/Xsession.d/90x11-common_ssh-agent

The effect is that if /etc/Xsession.options sets use-ssh-agent, it
starts plasma with the ssh-agent startplasmax11 command. Thus, systemd
is given the SSH_AUTH_SOCK variable (and the sock is at a random place
under /tmp)

Then ssh-agent.service seems to do nothing since ssh-agent is already started

Setting no-use-ssh-agent in /etc/X11/Xsession.option is a no go : it
is also tested by ssh-agent.service

Only solutions I see would imply modifying
/etc/X11/Xsession.d/90x11-common_ssh-agent, but is it a configuration
file ?

-- 
Erwan David

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

emacs service and session start Erwan David <erwan@rail.eu.org> - 2024-08-23 10:10 +0200
  Re: emacs service and session start didier gaumet <didier.gaumet@gmail.com> - 2024-08-23 11:20 +0200
    Re: emacs service and session start Erwan David <erwan@rail.eu.org> - 2024-08-23 11:40 +0200
    Re: emacs service and session start Erwan David <erwan@rail.eu.org> - 2024-08-23 18:20 +0200
      Re: emacs service and session start Max Nikulin <manikulin@gmail.com> - 2024-08-23 18:40 +0200
        Re: emacs service and session start Max Nikulin <manikulin@gmail.com> - 2024-08-25 05:20 +0200
          Re: emacs service and session start Erwan David <erwan@rail.eu.org> - 2024-08-26 10:10 +0200
            Re: emacs service and session start Erwan David <erwan@rail.eu.org> - 2024-08-26 13:40 +0200
              Re: emacs service and session start Max Nikulin <manikulin@gmail.com> - 2024-08-26 18:20 +0200
                Re: emacs service and session start Erwan David <erwan@rail.eu.org> - 2024-08-29 08:00 +0200
                Re: emacs service and session start Max Nikulin <manikulin@gmail.com> - 2024-08-29 17:20 +0200
                Re: emacs service and session start Erwan David <erwan@rail.eu.org> - 2024-08-30 13:50 +0200
                Re: emacs service and session start Greg Wooledge <greg@wooledge.org> - 2024-08-30 14:20 +0200
                Re: emacs service and session start Max Nikulin <manikulin@gmail.com> - 2024-08-30 16:50 +0200
                Re: emacs service and session start Max Nikulin <manikulin@gmail.com> - 2024-08-30 14:40 +0200
                Re: emacs service and session start Erwan David <erwan@rail.eu.org> - 2024-08-30 15:30 +0200

csiph-web