Bug#829698: gnome-keyring lives on after ssh session stops

2017-07-19 Thread Vincent Lefevre
On 2017-07-19 14:05:42 +0200, Laurent Bigonville wrote:
> Le 19/07/17 à 12:24, Vincent Lefevre a écrit :
> > So, that's the reason the daemon exits, I assume. But the question
> > is why after 3 minutes and not immediately.
> 
> Because on a loaded (or slow) machine, it could take some times
> between the moment pam opens the session and the xdg autostart files
> are run I guess.

Not very clean...

> > KillUserProcesses=yes would have bad side effects, such as killing
> > background computation processes and GNU screen!
> You cans start the long running processes using "systemd-run --scope
> --user".

That's annoying and not standard (I don't use only systemd machines).
I already use the NO_HUP shell option, and IMHO, systemd should honor
this.

> But screen should add support to creating a new systemd scope IMHO.

A generic method should probably first be standardized in POSIX.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#829698: gnome-keyring lives on after ssh session stops

2017-07-19 Thread Laurent Bigonville

Le 19/07/17 à 12:24, Vincent Lefevre a écrit :

On 2017-07-19 11:40:43 +0200, Laurent Bigonville wrote:

IIRC, what's happening is:

1) pam start gnome-keyring

Is this "/usr/bin/gnome-keyring-daemon --daemonize --login"?


2) during the startup of the session, "/usr/bin/gnome-keyring-daemon --start
--components=foo" is called (see /etc/xdg/autostart/gnome-keyring-*) and
initialize the process, if the --start command is not called the daemon
apparently exists. The thing is that these are only called for
"GNOME;Unity;MATE;" sessions, not the others.

I have XDG_SESSION_DESKTOP=lightdm-xsession, so that I suppose
that none of these components are started.

So, that's the reason the daemon exits, I assume. But the question
is why after 3 minutes and not immediately.


Because on a loaded (or slow) machine, it could take some times between 
the moment pam opens the session and the xdg autostart files are run I 
guess.

2. if I log out quickly after I log in, why it is still running after
the session has ended (up to these 3 minutes).

I'm not exactly sure why it's designed like that.

With systemd you can fix that by turning the KillUserProcesses to yes in
/etc/systemd/logind.conf I think.

KillUserProcesses=yes would have bad side effects, such as killing
background computation processes and GNU screen!
You cans start the long running processes using "systemd-run --scope 
--user". But screen should add support to creating a new systemd scope IMHO.




Bug#829698: gnome-keyring lives on after ssh session stops

2017-07-19 Thread Vincent Lefevre
On 2017-07-19 11:40:43 +0200, Laurent Bigonville wrote:
> IIRC, what's happening is:
> 
> 1) pam start gnome-keyring

Is this "/usr/bin/gnome-keyring-daemon --daemonize --login"?

> 2) during the startup of the session, "/usr/bin/gnome-keyring-daemon --start
> --components=foo" is called (see /etc/xdg/autostart/gnome-keyring-*) and
> initialize the process, if the --start command is not called the daemon
> apparently exists. The thing is that these are only called for
> "GNOME;Unity;MATE;" sessions, not the others.

I have XDG_SESSION_DESKTOP=lightdm-xsession, so that I suppose
that none of these components are started.

So, that's the reason the daemon exits, I assume. But the question
is why after 3 minutes and not immediately.

> > 2. if I log out quickly after I log in, why it is still running after
> > the session has ended (up to these 3 minutes).
> I'm not exactly sure why it's designed like that.
> 
> With systemd you can fix that by turning the KillUserProcesses to yes in
> /etc/systemd/logind.conf I think.

KillUserProcesses=yes would have bad side effects, such as killing
background computation processes and GNU screen!

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#829698: gnome-keyring lives on after ssh session stops

2017-07-19 Thread Laurent Bigonville

Le 19/07/17 à 11:32, Vincent Lefevre a écrit :

On 2017-07-19 08:45:31 +0200, Laurent Bigonville wrote:

It's maybe started by pam? Do you have libpam-gnome-keyring package
installed?

Yes, this package is installed. I also notice that
/etc/pam.d/lightdm contains:

-session optionalpam_gnome_keyring.so auto_start

(lightdm is the display manager I'm using.)

If the fact that it's started by pam is normal, I'm still wondering:

1. why it quits after about 3 minutes;


IIRC, what's happening is:

1) pam start gnome-keyring
2) during the startup of the session, "/usr/bin/gnome-keyring-daemon 
--start --components=foo" is called (see 
/etc/xdg/autostart/gnome-keyring-*) and initialize the process, if the 
--start command is not called the daemon apparently exists. The thing is 
that these are only called for "GNOME;Unity;MATE;" sessions, not the others.


You could edit these files and add your session to the list in 
"OnlyShowIn" so the proper commands are called



2. if I log out quickly after I log in, why it is still running after
the session has ended (up to these 3 minutes).

I'm not exactly sure why it's designed like that.

With systemd you can fix that by turning the KillUserProcesses to yes in 
/etc/systemd/logind.conf I think.




Bug#829698: gnome-keyring lives on after ssh session stops

2017-07-19 Thread Vincent Lefevre
On 2017-07-19 08:45:31 +0200, Laurent Bigonville wrote:
> It's maybe started by pam? Do you have libpam-gnome-keyring package
> installed?

Yes, this package is installed. I also notice that
/etc/pam.d/lightdm contains:

-session optionalpam_gnome_keyring.so auto_start

(lightdm is the display manager I'm using.)

If the fact that it's started by pam is normal, I'm still wondering:

1. why it quits after about 3 minutes;

2. if I log out quickly after I log in, why it is still running after
the session has ended (up to these 3 minutes).

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#829698: gnome-keyring lives on after ssh session stops

2017-07-19 Thread Laurent Bigonville

Le 19/07/17 à 04:37, Vincent Lefevre a écrit :

found 829698 3.20.1-1
thanks

On 2017-07-19 03:39:52 +0200, Vincent Lefevre wrote:

For bug 829698, this cannot be related to gnome-session since
gnome-session has never been installed on my machine.

Now, I can no longer see a gnome-keyring-daemon process running
after logging in. So, perhaps the fact that it was started
automatically was a bug and this has been fixed?

I've done some more tests. The problem still occurs with
gnome-keyring 3.20.1-1.

However, I've noticed that all the gnome-keyring-daemon processes
quit after about 3 minutes (including the one started for the
current login).

But if they quit, I wonder why they are started in the first place.
I can't find anything in the logs...

It's maybe started by pam? Do you have libpam-gnome-keyring package 
installed?