GNOME Bugzilla – Bug 92277
Shut Down and Reboot in the Desktop menu
Last modified: 2015-03-24 13:00:56 UTC
My Gnome2 strictly one-user-out-of-three-at-a-time system repeatedly gets switched off by cutting off power, because some less educated users cannot find the "Turn off the computer" option. Is absence in the menu suggests that the official way to stop a Linux computer is to pull off the power cord :). Please, give some option to not hide these important options even when using GDM for a nice welcome screen.
In my gdm, I can "turn off the computer". There's a system menu. Otherwise, there are some distributions that let the user shutdown or reboot the computer directly from GNOME. Maybe the latest Red Hat is so (I didn't try it).
True. But this means TWO lenghy steps instead of ONE quick and common. ("Select Log off ... wait ... wait ... Select Power off ... finally leave" insted of "Select Power off directly and leave").
If it's not supported by the distro, gdm can't support it. If it is supported by the distro (I forget how it tests for this, but it does) gdm will show the option. What distro are you using?
My distro is ALTLinux (www.altlinux.ru). shutdown, poweroff & all exist in the system, including user bindings. GDM does show shutdown and reboot menus, but I do not speak about GDM. I need to have those directly in the gnome-panel! Using GDM to turn off the machine is so inconvenient and takes so much time, that I do sudo poweroff in terminal instead and some family members just cut off electricity.
In gnome-panel/foobar-widget.c: /* FIXME: shutdown or reboot */
*** Bug 70710 has been marked as a duplicate of this bug. ***
Ok, am I right to understand that what this bug requests is to have something like: Actions -> [snip] ---------- Lock Screen Shutdown Restart Computer Logout If this is the case, then I couldn't agree more and that is what I was argueing for in Bug 70710. This was origionally the intention and the only reason that we have a Logout Dialog now is because it was not technically possible at the time to have Shutdown and Restart menu items (due to Bug 70710 I think). I think it is now possible and as such I think that the logout dialog should be done away with in favour of something like the above. Note: The Shutdown and Restart menu items would only be displayed if the user has permissions to use them.
I'm not sure we'd want to do away with the current logout dialog completely, as it's quite handy to be able to have a single keyboard shortcut (e.g. Ctrl-Alt-Del) that gives you access to all the logout-related functions without having to go through the menus. But I'd be happy to see the individual options on the Actions menu too.
The logout dialog has one advantage - it implicitly asks confirmation for the poweroff action (not as easily undone as screen locking). If the "Reboot" and "Poweroff" commands are to be placed in the Actions menu, there has to be an "Are you sure?" dialog to prevent accidental poweroff that can destroy unsaved documents. I would also suggest having some calls for the open applications to suggest saving unsaved work before powering off. Another idea is a "Hybernate" type option.
hmm, If poweroffing in mid-session doesn't prompt you to save documents then we have some serious issues to deal with. Also, the fact that Power Off would be in a menu make is a lot harder to make a mistake. We could also have a "Powering Off in 5 Seconds" dialog with a cancel button which might help. I agree with calum that the dialog could be useful elsewhere, just not in the actions menu ;)
I have written a little C app you can find here for that, under "C hacks" http://fred.blaisern.com/cgi-bin/code_hacks.pl It does nothing but calling 'shutdown -h|-r now', or cancel. You of course have to suid /sbin/shutdown. There is no confirmation yet... this was only for my personal use. You can then link the executable on your desktop. hope it can help someone...
Okay, thanks to the work of Raffaele Sandrini, we now have some code which we can use to tell GDM to shutdown or halt the machine once we've logged out. There's a few things to clear up before we go any further, though: 1) Naming, location and icons of "Shut Down" and "Restart" items: "Restart", "Restart Computer", "Reboot" ... ? "Shut Down", "Shutdown", "Power Off" ... ? Are we just going to shove the two items between the current "Log Out" and "Lock screen" items I wasn't aware of shutdown/reboot icons, but I see now that gnome-icon-theme has "gnome-shutdown" and "gnome-reboot". Problem solved. 2) Confirmation dialog? Do we want "are you sure you want to log out/shutdown/reboot?" dialogs? If not, what do we do about the "Save current setup" checkbox? Its the only place we currently allow saving the session ... If we do want a dialog, what should it look like for each of the actions? I think we still need the current style confirmation dialog for any other apps that request a logout - e.g. you would want the choice between shutdown/reboot/logout in the confirmation dialog if you'd hit Ctrl-Alt-Delete 3) Suspend? GDM may also support setting a "suspend" logout action if its setup. However, it doesn't feel appropriate here (surely you're unlikely to logout, suspend, go for a wander, unsuspend, login - surely the usual thing is suspend, go for a wander, unsuspend). I'd expect a Suspend menu item to immediately suspend the computer. Also, you can currently suspend by clicking on the battery applet and, usually, by closing the laptop lid. So, is it worth the clutter?
Created attachment 35544 [details] screenshot of actions menu with reboot/shutdown I've committed the first bits of this - adding it to the panel menus. Still need to figure out the gnome-session side to this and finalize the menu items naming and placement. Attaching a screenshot of the actions menu - looks a bit busy.
Hi Mark, Regarding 1) above, there needs to be some logic to the placement of the items in this section of the menu. This could be alphabetical ordering: Lock Screen (note uppercase S) Log Out Restart Shut Down Alternatively, the items could be ordered in terms of "size" of the task they perform: Lock Screen (note uppercase S) Log Out Shut Down (ie log out + shut down) Restart (ie log out + shut down + restart) I think it is OK to omit "Computer" from the last two items above.
Was there a plan to also show the username in the menu (like "Log Out Users Name")?
spark: see bug #130663 and bug #131875
Mark: I think it was better with the gnome-session patch, i.e.: we only had a Log Out item in the actions menu, but this opens a dialog where you can choose Log Out, Restart, Shut Down, etc. But I'm not a usability expert :-)
spark: see bug #130663 Eugene: I'll commit the "uppercase S" patch soon :-)
Created attachment 35571 [details] logout submenu I don't really want to add another sub menu for the Actions menu, however if we're getting rid of the logout/shutdown/reboot confirm dialog I think we need a little protection from missed mouse clicking. The miss clicking is if you've ever meant to logout and clicked lock screen instead (or vise versa), which is a pain in the ass when your screen then locks up and you wanted to logout and leave. :-) So this is what I'd recommend for adding these buttons to the menu; Seth and I talked about it this morning, so I believe we're both in agreement here as well.
Bryan: it's better :-) Having a "Log Out" item inside a "Log Out" submenu is kinda weird, though. If we're getting rid of the logout/shutdown/reboot confirm dialog, then we need to do something about the logout actio button too. Right now, I have one on my panel and I sometimes click on it by error...
Implementation comment: The current implementation of fetching the avail actions depends on bug #158799 Without applying the provided GDM patch you'll run into faulty situations.
Okay, issues with the getting rid of the confirmation dialog and adding a Log Out submenu plan: - "Save current setup" no longer appears anywhere in the UI - Adding another sub-menu, uggh - Log Out -> Log Out seems weird as Vincent says - Seems like we could still have people hitting Restart when they meant to Log Out which would be annoying - The action buttons could do with confirmation (Vincent again) Another alternative that I was originally thinking of was to keep the Actions menu as (from Eugene): Actions -> Lock Screen Log Out Shut Down Restart Then different confirmation dialogs for each action: === Are you sure you want to log out? [ ] Save current setup [Cancel] [Log Out] === === Are you sure you want to shut down the computer? [ ] Save current setup [Cancel] [Shut Down] === etc. Another thought is that the confirmation dialog could timeout if you don't cancel after a while to avoid the click shutdown/walk off/come in the next morning and its sitting at the confirmation dialog problem. (Calum tells me Mac does someting like that) We'll need to come to a final conclusion on this by Monday - if its not clear what's best by then, I think I'll just keep things as they were before the panel changes I committed but make gnome-session use GDM to do shutdown/reboot instead of consolehelper. So, please keep plugging away with suggestions
Another option could be something like: Actions -> [snip] ---------- Lock Screen ---------- Power > Stand By Hibernate Reboot Switch Off Log Out which at least only adds a couple of new top level items, reduces the possiblity of missed clicking by separating Lock Screen from Log Out, avoids having "Log Out" in a "Log Out" submenu, and makes it obvious from the top level that you can control the Power from here too (unlike hiding the power options under 'Log Out', where I wouldn't really think of looking to Reboot my machine).
Windows uses "Lock Workstation" instead of "Lock Screen" which would seem to me to make more sense to me - what do you guys think? Just for reference, OS X has the following ordering: Apple Menu -> [snip] ---------- Sleep Restart... Shut Down... ---------- Log Out username Both restart and shutdown launch a dialog with an OK and Cancel button on a 120 second delay.
Created attachment 35658 [details] Screenshot of Luca's mockups In bug #163308, Luca suggests confirmation dialogs like this
Created attachment 35663 [details] Screenshot of OSX logout
Created attachment 35664 [details] Screenshot of OSX shutdown confirm dialog
Comment about my mockups: * HIG :-) They are confirmation dialogs. * The secondary label should be something like "Explain what action does. Explain what the "Save and Action" does." * A good secondary label makes obsolets the Help button * The GTK_STOCK_WARNING image could be replaced by the same named icon used in the menu entry. This is very Apple-ish.
Okay, I've removed Shutdown/Reboot from the menus again for now, but I've made gnome-session use GDM for shutdown/reboot. If we can figure out how to make this work for 2.12, then great
Created attachment 35792 [details] [review] panel-shutdown-reboot-with-gdm.patch What I reverted
I like Calum's idea, however the "power" menu exposes a lot of implementation details: AFAIK, I can't get any power management features to work on my laptop (yet), and the definition of Standby vs Hibernate is likely unknown to most users (its unknown to me). Perhaps we have to wait until those power managment features work well on most linux/BSD machines? Heres an alternative: Quit Desktop --> Lock ----- Log out $USER ----- Restart Computer Shut Down Computer However we are now mixing Desktops and Computers, although this is because shutting down the computer implies shutting down the dekstop. The plus of this is that we are providing a good menu for the use case "I no longer wish to be working here and now, so what can I do about it".
Suggest change to wishlist as isn't really a bug.
Windows XP very sensibly has two entry points for this functionality at the bottom of its start menu: "Log Off" and "Turn Off Computer". http://www.winsupersite.com/images/showcase/winxp_rc_gallery_05.gif When you hit "Log Off", you get a confirmation window that lets you switch user or log off. When you hit "Turn Off Computer" you get a confirmation window that lets you suspend (hold shift to hibernate), restart or shut down. Importantly, these widgets are fairly standard buttons (nice icons, label underneath), not radio buttons. The most important part of this scheme is that these functions are *very* easy to find, but they are not in your face. We could do a similar thing with our Desktop/System menu, but we have one disadvantage - that's not a central access point, so you still have to find *which* second level to delve into. But it's a pretty good solution anyway. We should disable the buttons for commands the user can't execute, such as suspend and switch user -> what happens if the user can't execute *any* of the "Turn Off Computer" commands? Do we disable that menu item? (This is one situation where disabling widgets might be safer than simply hiding them.)
One problem with merging all these functions is the labelling. You need to know that "Log Off = Switch User Without Logging Off", which, as I mentioned in bug 319696, is "strangeness of 'Start->Shut Down' proportions." I know it sucks to add 4 menu items (if one includes an OS X-style submenu or "Change User" dialog, as per the above-noted bug) to Desktop, but OS X really did get it right, I'm afraid to say. Perhaps simply ordering these items (and adding a separator) is the right way to go. * Change User > * Lock Screen ----------------- * Log Out %u * Restart %h * Turn Off %h (shutdown, suspend)
Updating some bug info fields.
OK guys, this is my latest and more recent point-of-view about this thread. Brainstorming: * We have two kinds of actions to put 'under' Desktop menu: logout/change user and shutdown/reboot/hibernate * We can't use a menu entry for each action. * We should use something like a HIG confermation dialog * "Save session" is an advanced option: if you know how to use this option, you should be able to perform the same on Session preferences tool. * Maybe we could extend Session preferences tool to accept d'n'd from Applications menu items to add them on startup list * Users should be able to press power button on their laptop/desktop and choose what to do (shurdown/reboot/hibernate). Note this is the behavior on Apple PowerBooks (see http://manuals.info.apple.com/en/PowerBookG4_17in_DblLayerSuperDrive.pdf, page 16) * If GNOME can support by default only shutdown and reboot actions, vendors and power users should be able to simply add hibernate, whithout patching the system (some GConf keys? A boolean key to enable/disable the option and a string key to define the commad for hybernate? Proposal (caveats: labels are not the best to use): Desktop menu -------------- ... -------------- Lock Screen End Session --> Close this session or open a new as different user Power Off --> Shutdown or reboot this system --------------
Created attachment 55412 [details] A mockup for shutdown confirmation alert See also https://wiki.ubuntu.com/PowerManagementConfiguration
Created attachment 55413 [details] A mockup for shutdown confirmation alert See also https://wiki.ubuntu.com/PowerManagementConfiguration
Created attachment 55414 [details] A mockup for logout confirm Please note the usage of a non standard icon for those confirmation alerts. Moreover every user will learn that a "New Login" option is available on GNOME Desktop simply quitting the working session: no more Applications->System Tools->New Login
Oh, of course the shutdown/hibernate stuff should be coherent with gnome-power-manager stuff.
Bug 107813 is related.
As for the mockups: I would not use the parentheses in the secondary text. Also choose a different accelerator for Sleep (p?), the line underneath the l is very small so hard to make out. What's more, L is the accelerator for Log out in the logout confirm mockup.
(Removing ex-Sun folks from cc list.) FWIW, I don't consider 'switch user' and 'log out' to be mutually exclusive... I'd expect to be able to switch users, let them do what they want, and have them switch back to me, and have my session be in the state I left it. In fact, I'd expect any processes I had running to keep running while the 'switched' user was logged in. So to me, it would make more sense to have Switch User as a top level option somewhere too. (Not necessarily on the Desktop menu I suppose-- on OS X, it's essentially a separate applet altogether).
Would be nice to have this for 2.14.
FYI, the logout dialog is being worked on for Ubuntu : http://www.manucornet.net/ubuntu/#logout_dialog
So, I like Luca's mockups and I think we should use this solution. The only changes I would do are: + have a timeout for each dialog that does an action (eg. shutdown and log out after 60 seconds) + change the "New login" to "Switch user" and show a menu when it's clicked that looks like the FUSA menu What do you think?
> + have a timeout for each dialog that does an action (eg. shutdown and log out > after 60 seconds) Sounds interesting. > + change the "New login" to "Switch user" and show a menu when it's clicked > that looks like the FUSA menu Yeah, labels in my mochups was sub optimal ----- The only big issue in my mochups is the sleep button. We have two kind of sleep, ibernate (save-on-ram) and suspend (save-on-disk). If you have both enabled the shutdown confirm dialog will be [Suspend] [Ibernate] [Reboot] [Cancel] [Shudown] I don't know if 5 buttons are too much for a confirm alert, but 1. I suggest to add beautiful comments in tooltip buttons, explaining actions that will be performed 2. Maybe (I'm not saying it's better, I'm just proposing it as alternate solution) you could use a single "Sleep" button and: a) if the system provides only suspend-to-ram or suspend-on-disk use the "Sleep" button to perform it; of couse the button tooltip should declare the suspend type b) if the system provides both suspend-to-xxx add 2 radio item to select (see the next mochup)
Created attachment 57204 [details] Alternate shutdown mochup This mochup try to reduce the number of buttons when both suspend-to-ram and suspend-to-disk are available. Moreover try to explain to use what the sleep action will really do (need/no need power)
(In reply to comment #49) > Created an attachment (id=57204) [edit] > Alternate shutdown mochup My first feeling with this dialog is confusion. Does it save sleep data even if I Shutdown?
Created attachment 57226 [details] Ubuntu logout dialog Just in case it can be useful to the discussion :)
Vincent: So what part (if any) does user-switching play in your desired outcome? I want to know what (if anything) I need to do...
James: in the latest mockup for the logout confirm dialog, there's a "new login" button. I'd like this to be a popdown menu where you can see the users, as in FUSA. Your patch in bug 319696 is a good start. However, there are some things that need to be changed: * we don't need some of the prefs from FUSA (like the xnest thing) * coding style needs to be adapted to the one used in the panel * it really is a huge amount of code. Can't this be reduced? I'll try to look at it this week-end, but time might be a bit short...
So, I have some code that works (with a few FIXME ;-)). I'm attaching two screenshots. I'll probably work a bit on it tomorrow and commit all this.
Created attachment 57433 [details] Logout dialog Note that the "switch user" button only opens a new login window. It does not list the currently logged in users. In the future, the plan is to do this, but it won't happen for 2.14, I guess.
Created attachment 57434 [details] Shutdown dialog This dialog shows a "sleep" (or is it "suspend"?) button if GDM can suspend the computer. It does not support sleep as in suspend-to-ram since it would need integration with gnome-power-manager, which needs some more time.
Created attachment 57474 [details] Logout mockup, with icons I talked a little with Vincent on IRC : what about this ?
(In reply to comment #56) > This dialog shows a "sleep" (or is it "suspend"?) button if GDM can suspend the > computer. This dialog seems a bit wordy. How "Turn off the computer?" or something similar? Just because the OS X dialog says all that stuff doesn't mean it's a good idea (and they do it with a smaller font and two lines).
Travis: I just put the text that was in Luca's mockups ;-) If people think it should be changed, I can change it.
And I just put a text similar to current Nautilus confirmation alerts. Unfortunately HIG don't suggest anything :-(
I'm running gnome-panel from CVS and the new dialogs look great. I only have a few suggestions. I don't know what an usability expert would think of them though. :) 1) Move Reboot from the actions that "turn off" the computer (Shut Down and Sleep) to it's own dialog. I don't think it's immediate that selecting "Shut Down" will give an option to restart, but I can see why the Sleep/Suspend would live in there. 2) Reorder the menu so that Log Out is the last entry. The menu and dialogs would look like: -- Restart (Cancel Restart) Shut Down (Sleep Cancel Shut Down) Lock Screen Log Out (Switch User Cancel Log Out) You may also notice I used 'Restart' instead of 'Reboot' :) And I should probably file a new bug, but the Restart and Shut Down dialogs should warn me if there are other X sessions opened.
(In reply to comment #57) > Created an attachment (id=57474) [edit] > Logout mockup, with icons > > I talked a little with Vincent on IRC : what about this ? Here's a list of things that are, IMHO, not right with this mockup: + the icons, I'm sorry, but they're not using the same style as the other icons in the desktop + the default action of the dialog should be the bottom-right buttons. Right now, it's cancel and I think we really want "Log out" here :-) + there's just too much empty space Now, I'd like to step back a bit and think about the design. Why do you think we need big buttons like this? The only answer I can find is that we want to make it easy for the user to log out/switch user. But if the default action is log out, he just needs to hit "enter" to log out. There's only the alternative action (switch user, for this dialog) that might need to be made more easy to use in the current design.
(In reply to comment #61) > I'm running gnome-panel from CVS and the new dialogs look great. I only have a > few suggestions. I don't know what an usability expert would think of them > though. :) > > 1) Move Reboot from the actions that "turn off" the computer (Shut Down and > Sleep) to it's own dialog. I don't think it's immediate that selecting "Shut > Down" will give an option to restart, but I can see why the Sleep/Suspend > would live in there. I'm not sure, but having a lot of icons for this in the menu might be too much. So, I'd prefer to find an alternative label for the menu item so that it's more clear to the user what it really does. > 2) Reorder the menu so that Log Out is the last entry. > > The menu and dialogs would look like: > > -- > Restart (Cancel Restart) > Shut Down (Sleep Cancel Shut Down) > Lock Screen > Log Out (Switch User Cancel Log Out) Any reason for this? > You may also notice I used 'Restart' instead of 'Reboot' :) Oh, we might need to change this in the dialog. Can you open a bug about this? > And I should probably file a new bug, but the Restart and Shut Down dialogs > should warn me if there are other X sessions opened. Agree. We should propose two possibilities: force the reboot/shutdown or wait that everyone is logged out to reboot/shutdown. Please open a bug. Thanks
(In reply to comment #63) > (In reply to comment #61) > > I'm running gnome-panel from CVS and the new dialogs look great. I only have a > > few suggestions. I don't know what an usability expert would think of them > > though. :) > > > > 1) Move Reboot from the actions that "turn off" the computer (Shut Down and > > Sleep) to it's own dialog. I don't think it's immediate that selecting "Shut > > Down" will give an option to restart, but I can see why the Sleep/Suspend > > would live in there. > > I'm not sure, but having a lot of icons for this in the menu might be too much. > So, I'd prefer to find an alternative label for the menu item so that it's more > clear to the user what it really does. > Finding an alternative label might be a problem, because they're two distinct actions. Shut Down means "I don't want to use the computer anymore, and I don't want it to use any power". Sleep and Hibernate fit well with that, but Restart doesn't. Also, if you put all these actions in one dialog it might look too cluttered with 5 entries (Sleep, Hibernate, Restart, Cancel and Shut Down). To save some space the screenshot utility could be removed, as it appears in the Accessories menu now (recent gnome-utils change). > > 2) Reorder the menu so that Log Out is the last entry. > > > > The menu and dialogs would look like: > > > > -- > > Restart (Cancel Restart) > > Shut Down (Sleep Cancel Shut Down) > > Lock Screen > > Log Out (Switch User Cancel Log Out) > > Any reason for this? I'm not sure. Log Out is probably closer the Quit entry that appears in applications, and Quit is always the last entry in the menu. They even use the same icon. > > > You may also notice I used 'Restart' instead of 'Reboot' :) > > Oh, we might need to change this in the dialog. Can you open a bug about this? > http://bugzilla.gnome.org/show_bug.cgi?id=327580 > > And I should probably file a new bug, but the Restart and Shut Down dialogs > > should warn me if there are other X sessions opened. > > Agree. We should propose two possibilities: force the reboot/shutdown or wait > that everyone is logged out to reboot/shutdown. Please open a bug. > http://bugzilla.gnome.org/show_bug.cgi?id=327578 Thank you
I'm going to close this bug since all new issues with the dialogs should now go in new bugs. Evandro: I still don't agree about "Reboot" in its own dialog. If a user wants to reboot the computer and opens the menu, I'm pretty sure he will use the "Shutdown" item without much thinking. But feel free to open a bug about this if you want.