Re: best way to check for an active X session from a maintainer script?
On Tue, Sep 11, 2007 at 08:38:35AM +0100, Neil Williams <firstname.lastname@example.org> wrote:
> On Tue, 11 Sep 2007 00:07:52 -0700
> Steve Langasek <email@example.com> wrote:
> > The problem is that some of the services that have to be restarted are
> > display managers, and restarting them will kill any active X sessions. The
> > question is, where should the line be drawn between trying to automatically
> > restart these services, and warning the user that services could not be
> > safely restarted?
> In my case, the service that needed to be restarted (relating to X) was
> gdm and I suffered the abrupt termination of my X session. (I have a
> slow internet connection and need to run apt-get upgrade in the
> background whilst doing other things.)
> Can't gdm and similar be "scheduled" for a reload instead of actually
> forced into an immediate reload?
As you pointed out, gdm *does* have a nice reloading functionality.
IIRC, restart also does a graceful restart (only scheduling a restart).
The problem is that pam postinst does stop & start instead or restart...
I got this recently, and it was *very* annoying, especially because the
apt-get upgrade was done in the X session, and was just killed by the