4

Is there a keyboard shortcut, or can a keyboard shortcut be defined, to open the GNOME 3 "status menu" (the one in the upper right corner with your name on it that you use to log out, restart or shut down the machine)?

I want to be able to reboot or shut down the machine without using the mouse. In GNOME 2 I could do Alt+F1 and a short arrow key sequence, and now I want something similar.

Terminal is not an option - the GUI already has the necessary permissions and I want to take advantage of that, not sudo shutdown -h.

1
  • 1
    On Arch Linux, you can simply press Alt+F2 and type poweroff.
    – To Do
    Mar 18, 2016 at 11:12

3 Answers 3

3

To jump to the status bar or the desktop use: Ctrl + Alt + TAB

You could also set up the power button to popup the shutdown menu using gnome-control-center power.

2
  • 2
    I found out about the ctrl-alt-tab, but it was a lot of tabbing/arrows from there to the menu. Plus, in fallback mode, I switch to it, and several tabs after that, the focus seems to have disappeared - nothing happens if I press tab, enter, spacebar, windows and arrows. The power button, however, does it for me. Thanks for the tip.
    – Lyubomir
    Jul 17, 2011 at 17:11
  • 2
    Super-M (simultaneously Windows key and M key) takes me the top-menu on Ubuntu 18.04.01 - use arrows to navigate to status menu - acts similar to how Alt-F10 used to on 14.04. Also on some laptops the power button shows a shutdown menu (although for some reason it now just shuts down with my current config).
    – robocat
    Dec 17, 2018 at 2:20
2

I found this exchange while looking for the same thing. I don't really love any of the answers above (the accepted answer doesn't even work for me in gnome 3.28.2) so I'll add to what I've found.

poweroff is the closest; it's a command I never knew existed and is nice to know about; but in my opinion, I don't like that there is no confirmation.

I found the program gnome-session-quit which seems to handle all the functions of the status menu you're talking about. By default it will just pop up a window for logging out in 60 seconds, or immediately if you click yes, or the ability to cancel.

Furthermore, it has logout, power-off, and reboot.

Usage:
  gnome-session-quit [OPTION…] 

Help Options:
  -h, --help       Show help options

Application Options:
  --logout         Log out
  --power-off      Power off
  --reboot         Reboot
  --force          Ignoring any existing inhibitors
  --no-prompt      Don’t prompt for user confirmation

So, it appears the best option I've found so far is to go to keyboard shortcuts in gnome and create a custom shortcut to gnome-session-quit --power-off and/or gnome-session-quit reboot.

I found this document Design/OS/KeyboardShortcuts which talks about "PowerOff" being Super-F4, it doesn't seem to be implemented yet; however, I really like the idea of that being the shortcut inline with the rest of the window management through the super key in gnome3 - so I would recommend that key.

0

The terminal is an option. You can call ConsoleKit over DBus, the same way GNOME does.

dbus-send --system --dest="org.freedesktop.ConsoleKit" \
    /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop

To reboot, use the .Restart method instead of .Stop.


To suspend or hibernate, call UPower:

dbus-send --system --dest="org.freedesktop.UPower" \
    /org/freedesktop/UPower org.freedesktop.UPower.Suspend

(Same for .Hibernate.)

2
  • Thanks for correcting my ignorance. The commands you suggest aren't what I was after, but they do hint up some possibilities. I'll have to look into DBus sometime.
    – Lyubomir
    Jul 17, 2011 at 17:14
  • @Lyubomir: To quote your question, "What I want is to be able to reboot or shut down the machine without using the mouse." Jul 17, 2011 at 18:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .