summaryrefslogtreecommitdiff
path: root/doc/bugs/kill_git-annex_assistant_on_logout.mdwn
blob: 7c3a5affc49275604e1c3097422fcfcdd43c3930 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
When you logout of any x session git-annex does not get killed.
This means that if you login again git-annex will still try to use the ssh-agent from the last session which doesn't run anymore.
This leads to countless password queries unless you use a passwordless key.

> I've fixed this, though maybe not in an ideal way.
> 
> There's no way to make a XDG desktop file run a command on logout, that I
> can see. That would have been my first choice.
> 
> So, I thought I'd just have the assistant not run setsid, so it's part of
> the current login session and would get killed automatically on logout. 
> I was surprised that this didn't seem to work, on a system using logind.
> Even when the desktop file ran git-annex with --foreground, it was not
> stopped on logout. This may be because logind defaults to
> KillUserProcesses=false,
> although I'm not sure why processes that are part of the login session
> are not killed at least.
> 
> What I have settled on is to leave the daemon running after logout, 
> but on a new login have the `git annex assistant --autostart` kill the
> old daemon and start a new one.
> 
> Only possible problem with that is there will be a small window after
> login where the old daemon is running. It might slip in a password prompt
> there, using the new DISPLAY. At least it won't flood, and even a single
> password prompt is pretty unlikely.
> 
> I am tenatively going to call this [[done]]. Seems to me that logind
> could be improved though. --[[Joey]]