Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Desktop (http://www.linux-archive.org/ubuntu-desktop/)
-   -   Meeting item: FUSA, passwords vs. session saving (http://www.linux-archive.org/ubuntu-desktop/253963-meeting-item-fusa-passwords-vs-session-saving.html)

hggdh 02-27-2009 05:43 PM

Meeting item: FUSA, passwords vs. session saving
 
On Fri, 27 Feb 2009 18:15:38 +0000
Ted Gould <ted@ubuntu.com> wrote:

> I feel like today we're given the choice between two bugs:
>
> * Don't allow restart/shutdown to work with multiple users

This will slightly inconvenience the user trying to shutdown the
machine. I would expect that an user that has the power to shutdown a
machine would also have the power to shutdown it from a
terminal/console, and give the users a bit of time to save work/log out.

> * Don't save sessions on restart/shutdown

This potentially causes loss of work and certainly loss of current
sessions.

So, I guess, for me the choice is the last one. Of course, nothing
prohibits the "admin" user to 'shutdown -h now', with the very same
losses. But -- and this is important -- it is *not* Ubuntu causing it.

Just a personal view.

Thanks.

..hggdh..

--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Scott James Remnant 02-27-2009 06:38 PM

Meeting item: FUSA, passwords vs. session saving
 
On Fri, 2009-02-27 at 18:15 +0000, Ted Gould wrote:

> But, this is fixed in the new GDM
>
It's not really the "new" GDM anymore, it's been around a while now <g>

Scott
--
Scott James Remnant
scott@canonical.com
--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Chris Coulson 02-27-2009 06:40 PM

Meeting item: FUSA, passwords vs. session saving
 
On Fri, 2009-02-27 at 18:15 +0000, Ted Gould wrote:
> Hello,
>
> Chris provided a patch for using PolicyKit and ConsoleKit in the FUSA
> applet that makes it so that if multiple people are logged in, you can
> get a password dialog, and shutdown the system. The way that this works
> is that it asks ConsoleKit for the shutdown and restart actions and if
> they need a password asks PolicyKit to handle it.
>
> One of the things that this changes is that we're shutting down using
> ConsoleKit instead of asking GDM to do the shutdown for us. This means
> that we're not logging out of the session, and doing the equivalent to
> "sudo shutdown -h now" on the command line. So, if the session manager
> supports saving sessions it won't, as we're not even asking it to.
>
> This obviously isn't great. But, this is fixed in the new GDM as it
> will use DBus and so we can get the PK messages from the request to GDM,
> and we can again start asking GDM to do the shutdown/restart for us.
> But, that's a solution for Karmic.
>
> I feel like today we're given the choice between two bugs:
>
> * Don't allow restart/shutdown to work with multiple users
> * Don't save sessions on restart/shutdown
>
> I guess I'm writing this to see if anyone has any ideas. Anyone?
> Perhaps we should discuss these two during the desktop meeting on
> Tuesday? I'm kinda thinking about going with the password dialog, but I
> think this shouldn't be an individual decision.
>
> --Ted
>

Ted,

I had a brief look at the gnome-session code when writing the patch, and
it appears that the only thing that it does differently to the FUSA is
block on any applications that are trying to inhibit closing the
session. In this case, it pops up the inhibit dialog. Once the user has
confirmed this, all it seems to do is send Stop() to ConsoleKit in the
same way that the FUSA does now.

It seems that the only thing the new FUSA misses is being able to cancel
the action if some application wants to inhibit it (but that didn't
happen with the old GDM interface anyway).

Perhaps I'm missing something, but other than the inhibit dialog, it
doesn't seem like the FUSA does anything different to gnome-session now.

Regards
Chris
--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Ted Gould 02-27-2009 07:13 PM

Meeting item: FUSA, passwords vs. session saving
 
On Fri, 2009-02-27 at 19:40 +0000, Chris Coulson wrote:
> I had a brief look at the gnome-session code when writing the patch, and
> it appears that the only thing that it does differently to the FUSA is
> block on any applications that are trying to inhibit closing the
> session. In this case, it pops up the inhibit dialog. Once the user has
> confirmed this, all it seems to do is send Stop() to ConsoleKit in the
> same way that the FUSA does now.
>
> It seems that the only thing the new FUSA misses is being able to cancel
> the action if some application wants to inhibit it (but that didn't
> happen with the old GDM interface anyway).

That's basically what it does, but it also sends out a signal that it's
going to shutdown to all the applications to allow them to inhibit the
shutdown for various reasons.

http://www.gnome.org/~mccann/gnome-session/docs/gnome-session.html#id2735819

This could be that a document isn't saved or just because you feel like
it. I'm not sure if any apps have implemented all of the new API.
There's been some talk about putting it into GTK+, but I don't believe
that there is anything today.

But, maybe that is the fix. Maybe we should extend gnome-session to
have enough options that we just call it directly? That way it doesn't
give us the big ugly dialogs, but it can handle the PK/CK stuff.

There is currently only commands to bring up dialogs:

http://www.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Shutdown

--Ted

--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Chris Coulson 02-27-2009 07:44 PM

Meeting item: FUSA, passwords vs. session saving
 
On Fri, 2009-02-27 at 20:13 +0000, Ted Gould wrote:
> That's basically what it does, but it also sends out a signal that it's
> going to shutdown to all the applications to allow them to inhibit the
> shutdown for various reasons.
>
> http://www.gnome.org/~mccann/gnome-session/docs/gnome-session.html#id2735819
>
> This could be that a document isn't saved or just because you feel like
> it. I'm not sure if any apps have implemented all of the new API.
> There's been some talk about putting it into GTK+, but I don't believe
> that there is anything today.
>
> But, maybe that is the fix. Maybe we should extend gnome-session to
> have enough options that we just call it directly? That way it doesn't
> give us the big ugly dialogs, but it can handle the PK/CK stuff.
>
> There is currently only commands to bring up dialogs:
>
> http://www.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Shutdown
>
> --Ted
>
Hi,

When I started writing the patch for the FUSA, I expected that
gnome-session exported an interface for restarting and shutting down
directly (without calling the dialog), as it is already possible to do
this for log out (calling org.gnome.SessionManager.Logout). I was
surprised when I realised that it didn't actually support this, which is
why I settled for sending a message to ConsoleKit directly and
implementing PolicyKit support in the FUSA. I think that patching
gnome-session to extend the Shutdown() method (or adding a new method)
is probably a good way to go. This means that other applications (such
as update-notifier's reboot dialog) could hook in to it as well, without
having to worry about PolicyKit support. The patch probably wouldn't be
too intrusive either.

If I have a bit of spare time over the weekend, I'll work on a patch
just to see how feasible it could be to implement.

Regards
Chris


--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Ted Gould 02-27-2009 08:39 PM

Meeting item: FUSA, passwords vs. session saving
 
On Fri, 2009-02-27 at 20:44 +0000, Chris Coulson wrote:
> On Fri, 2009-02-27 at 20:13 +0000, Ted Gould wrote:
> > That's basically what it does, but it also sends out a signal that it's
> > going to shutdown to all the applications to allow them to inhibit the
> > shutdown for various reasons.
> >
> > http://www.gnome.org/~mccann/gnome-session/docs/gnome-session.html#id2735819
> >
> > This could be that a document isn't saved or just because you feel like
> > it. I'm not sure if any apps have implemented all of the new API.
> > There's been some talk about putting it into GTK+, but I don't believe
> > that there is anything today.
> >
> > But, maybe that is the fix. Maybe we should extend gnome-session to
> > have enough options that we just call it directly? That way it doesn't
> > give us the big ugly dialogs, but it can handle the PK/CK stuff.
> >
> > There is currently only commands to bring up dialogs:
>
> When I started writing the patch for the FUSA, I expected that
> gnome-session exported an interface for restarting and shutting down
> directly (without calling the dialog), as it is already possible to do
> this for log out (calling org.gnome.SessionManager.Logout). I was
> surprised when I realised that it didn't actually support this, which is
> why I settled for sending a message to ConsoleKit directly and
> implementing PolicyKit support in the FUSA. I think that patching
> gnome-session to extend the Shutdown() method (or adding a new method)
> is probably a good way to go. This means that other applications (such
> as update-notifier's reboot dialog) could hook in to it as well, without
> having to worry about PolicyKit support. The patch probably wouldn't be
> too intrusive either.
>
> If I have a bit of spare time over the weekend, I'll work on a patch
> just to see how feasible it could be to implement.

I think that long term that's the fix. But, I just had a talk with John
McCann and others on #gnome-hackers -- it seems that even with adding
the APIs that gnome-session doesn't do the session saving on
shutdown/restart anyway. Hmph.

So, my current feeling is that gnome-session needs to be patched for
that before the API becomes useful. And that patch (though very
important) we're probably too late in the release process for.

So, in a nutshell, I think the current CK/PK support in FUSA (done by
you) is just as good at saving sessions as gnome-session -- so I'm for
keeping it.

But, I think the long term strategy is to get gnome-session better so
that the right answer is asking gnome-session to handle it for us.

--Ted

--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


All times are GMT. The time now is 01:30 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.