After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657822 - should add some way to power off the machine while logged out
should add some way to power off the machine while logged out
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: login-screen
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: Ray Strode [halfline]
gnome-shell-maint
: 659001 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-08-31 13:46 UTC by Ray Strode [halfline]
Modified: 2011-09-18 03:21 UTC
See Also:
GNOME target: 3.2
GNOME version: ---


Attachments
gdm: add a power button (9.26 KB, patch)
2011-09-06 16:04 UTC, Ray Strode [halfline]
none Details | Review
gdm: add a power button (8.25 KB, patch)
2011-09-17 16:46 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2011-08-31 13:46:20 UTC
The design here:

https://live.gnome.org/GnomeOS/Design/Whiteboards/LoginScreen

doesn't have power switch menu like the old fallback greeter, but talking to Allan, we probably want one.

We've traditionally told people log out is a legitimate means to power off the machine.
Comment 1 Allan Day 2011-09-05 10:37:44 UTC
(In reply to comment #0)
> The design here:
> 
> https://live.gnome.org/GnomeOS/Design/Whiteboards/LoginScreen
> 
> doesn't have power switch menu like the old fallback greeter, but talking to
> Allan, we probably want one.
> 
> We've traditionally told people log out is a legitimate means to power off the
> machine.

I suggested that we add a power off button to the dialog the other day. I'd like to hear Jon or Jimmac's view here though.
Comment 2 Allan Day 2011-09-06 09:29:49 UTC
(In reply to comment #1)
> (In reply to comment #0) 
...
> I suggested that we add a power off button to the dialog the other day. I'd
> like to hear Jon or Jimmac's view here though.

I had a discussion with jimmac about this yesterday which ended with these fateful words:

"jimmac    aday, if we continue to live in the faulty world -- yea, I would assume having a shutdown button in the lock screen for singleuser would be the workaround"

I think this also means adding a shutdown button to the login dialog.
Comment 3 Ray Strode [halfline] 2011-09-06 16:04:37 UTC
Created attachment 195805 [details] [review]
gdm: add a power button

Making users have to log in to power off the machine isn't a good idea.

This commit adds a power menu similar to the one in the fallback greeter
which offers 3 items:

- Suspend
- Restart
- Power off
Comment 4 Allan Day 2011-09-06 16:08:21 UTC
What's the rationale for having suspend and restart?
Comment 5 drago01 2011-09-06 17:54:00 UTC
(In reply to comment #4)
> What's the rationale for having suspend and restart?

Not sure about restart but you might want to suspend a desktop at the login screen to not have to bootup again.
Comment 6 Ray Strode [halfline] 2011-09-06 18:04:57 UTC
Lacking a design, I just mimiced the menu that is part of the fallback design for the sake of consistency.
Comment 7 Jeremy Bicha 2011-09-06 21:03:13 UTC
Many users run multiple operating systems and would like the ability to reboot into one of them without having to manually turn the computer back on.
Comment 8 Allan Day 2011-09-06 22:16:42 UTC
(In reply to comment #6)
> Lacking a design, I just mimiced the menu that is part of the fallback design
> for the sake of consistency.

Fair enough. :) I might have suggested just having a button that triggered the shutdown dialog, but making it roughly consistent with 3.0 might make sense for now (since it seems we might return to this whole story for 3.2).
Comment 9 Dan Winship 2011-09-08 14:51:32 UTC
Comment on attachment 195805 [details] [review]
gdm: add a power button

can you rebase this on top of bug 651299 (at least, everything except the last patch)? It will simplify things a bunch. And, uh, review 651299 while you're there? :)
Comment 10 Dan Winship 2011-09-08 14:53:32 UTC
Comment on attachment 195805 [details] [review]
gdm: add a power button

also, if you derived from PanelMenu.SystemStatusButton instead of PanelMenu.Button then you wouldn't have to do the icon by hand
Comment 11 Ray Strode [halfline] 2011-09-09 19:11:29 UTC
(In reply to comment #9)
> (From update of attachment 195805 [details] [review])
> can you rebase this on top of bug 651299 (at least, everything except the last
> patch)? It will simplify things a bunch. And, uh, review 651299 while you're
> there? :)

Sure
Comment 12 Matthias Clasen 2011-09-14 03:43:57 UTC
*** Bug 659001 has been marked as a duplicate of this bug. ***
Comment 13 Ray Strode [halfline] 2011-09-17 16:46:51 UTC
Created attachment 196813 [details] [review]
gdm: add a power button

Making users have to log in to power off the machine isn't a good idea.

This commit adds a power menu similar to the one in the fallback greeter
which offers 3 items:

- Suspend
- Restart
- Power off
Comment 14 drago01 2011-09-17 18:00:36 UTC
Review of attachment 196813 [details] [review]:

Code looks good, just some unused imports and a constant. I can't easily test it though so I assume you did and it works.

::: js/gdm/consoleKit.js
@@ +2,3 @@
+
+const DBus = imports.dbus;
+const Lang = imports.lang;

Unused.

@@ +3,3 @@
+const DBus = imports.dbus;
+const Lang = imports.lang;
+const Shell = imports.gi.Shell;

Unused.

@@ +4,3 @@
+const Lang = imports.lang;
+const Shell = imports.gi.Shell;
+const Signals = imports.signals;

Unused.

::: js/gdm/powerMenu.js
@@ +19,3 @@
+ */
+
+const DBus = imports.dbus;

Unused.

@@ +20,3 @@
+
+const DBus = imports.dbus;
+const Gio = imports.gi.Gio;

Unused.

@@ +21,3 @@
+const DBus = imports.dbus;
+const Gio = imports.gi.Gio;
+const GLib = imports.gi.GLib;

Unused.

@@ +23,3 @@
+const GLib = imports.gi.GLib;
+const Lang = imports.lang;
+const Shell = imports.gi.Shell;

Unused.

@@ +24,3 @@
+const Lang = imports.lang;
+const Shell = imports.gi.Shell;
+const St = imports.gi.St;

Unused.

@@ +28,3 @@
+
+const ConsoleKit = imports.gdm.consoleKit;
+const Main = imports.ui.main;

Unused.

@@ +31,3 @@
+const PanelMenu = imports.ui.panelMenu;
+const PopupMenu = imports.ui.popupMenu;
+const Util = imports.misc.util;

Unused.

@@ +33,3 @@
+const Util = imports.misc.util;
+
+const _ICON_SIZE = 16;

Yet again ... unused.
Comment 15 Ray Strode [halfline] 2011-09-18 03:21:19 UTC
Pushed after prune

Attachment 196813 [details] pushed as a94a627 - gdm: add a power button