On Tuesday 14 Jun 2016 07:03:25 J. Roeleveld wrote:
> On Friday, June 10, 2016 10:32:25 PM Mick wrote:
> > On Friday 10 Jun 2016 19:54:44 J. Roeleveld wrote:
> > > Kde and I would assume Gnome as well have a method of running a script
> > > when
> > > starting and stopping a login session.
> > > 
> > > This is usually used for ssh-agent and pgp-agent.
> > 
> > Yes, KDE uses /etc/plasma/shutdown/10-agent-shutdown.sh and I guess gnome
> > would have its equivalent, but I think this is only for any daemonised
> > services running on the desktop.
> > 
> > I suspect that:
> > 
> > /usr/bin/kdeinit4_shutdown
> > /usr/bin/kdeinit5_shutdown
> > 
> > are used to shutdown gracefully any KDE apps.
> > 
> > > You could try looking for something similar with the desktop/window
> > > manager
> > > of your choice.
> > 
> > I tried the above shutdown commands but they didn't work.  Unfortunately
> > enlightenment does not have anything available to stop desktop
> > applications
> > at shutdown.  The dev's advice was to use .xinitrc or equivalent.
> > 
> > > I think .xsession is run only during start and will not 'pause' during
> > > the
> > > session.
> > 
> > Well my confusion is that my .xsession *was* working fine until a couple
> > of
> > weeks ago ... and all still works as expected when I run akonadictl stop
> > in
> > a terminal before I shut down.  I don't know why the same command behaves
> > differently in .xsession now.  :-/
> > 
> > PS. When I just log out there is no delay.  The problem only arises when I
> > shutdown.  I wonder if this is something to do with this darn sddm display
> > manager ...
> 
> There is a 90 second delay with PostgreSQL if there are still clients
> connected to the database.
> This should also be displayed on the screen if you see the shutdown-text.

Yes, postgresql waits 90 seconds until all these akonadi attempts to reconnect 
its agents finish, then X exits, postgresql shutsdown and then system shuts 
down as expected.


> I don't see how sddm can cause an extra delay.

I can't either, but I am clutching at straws here.


> You could add the commands to:
> /etc/local.d/killakonadi.stop
> 
> (These are run as root, so you might need to do something like:
> /bin/su -s /bin/sh -c " <command> " <username>
> instead of the commands you have been putting in the scripts.

Thank you this did not work.  I didn't know that /etc/local.d/ scripts run at 
shutdown, but in any case even if they do I suspect they don't run until X 
exits first.


> I think the local-service is stopped before postgresql is stopped, so this
> might prevent the delay you are seeing?
> 
> --
> Joost

I usually have a terminal open (more often than I have kmail) so I will need 
to remember to run 'akonadictl stop' in the terminal before I shutdown the 
machine.  It's not ideal, but unless something can stop effectively akonadi I 
can't exit X.

-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to