[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shutdown from gnome logout dialog



On Sat, 2003-10-18 at 15:27, Moray Allan wrote:
> Hi, your patch sounds good, but just a quick question:
> 
> On Sat, 2003-10-18 at 02:33, Jarno Gassenbauer wrote:
> > If you hit the cancel button in the gnome logout dialog then GDM will
> > remember your selection until you open the logout dialog again. Of
> > course, the radio button you selected the last time will be
> > pre-activated for you.
> 
> Do you mean that if I bring up the dialog, select 'shut down', then
> press cancel, when I next bring up the dialog 'shut down' will still be
> selected?
> 

Yes, that's true. Actually it wasn't planned.

The reason was that I didn't want to send the logout action change
command to GDM after the user hits 'OK'. It might not arrive in time,
that is, before gnome-session exits. And even if it arrives in GDM in
time, it still has to be resent in time from the GDM master process to
the GDM slave process that runs the X server and gnome-session. The
slave process needs this information to know that it should neither
restart the X server nor provide the login prompt anymore. Rather, it
should tell the master process that the user wishes to log out as if he
had chosen the 'logout' entry from a login prompt menu.

Sounds twisted, I know. But the slave process must be notified and
do the actual shutdown request to the GDM master process. Otherwise
the master process doesn't know when the Post Session script is done.
This script is run by the slave process.

Back to your question, which leads to a question I tried to avoid:

If the command is sent after pressing 'OK', should gnome-session wait
for the acknowledge from the GDM master process? Currently the user
can wait for us by watching the radio button become sensitive again.
In practice this is so fast that it doesn't even flicker noticeable.

How about having gnome-session wait for GDM's response after hitting
'OK' and only continue after the response or a timeout?

Opinions?

Best regards,
Jarno


Note to myself: Figure out how to make the gdm master process wait
until the slave process get's to know the new logout action. Have
the master process only then acknowledge to gnome-session.




Reply to: