Score:0

Can you configure the power button to bring up a shutdown options menu/

li flag

I am using Ubuntu 22.04 on a laptop and I would like, when I press the power button, to see a menu of suspend/shutdown/restart options, rather than to immediately trigger a suspend/shutdown action. Is this possible?

Score:1
cn flag

What you want is not as such possible (unless perhaps with some deeper hacking). At most, you can have a dialog displayed that asks you confirmation before powering off (and only for powering off). This is because the tool that provides the dialog does not allow presenting multiple options. See more detail in my answer here).

Enabling a confirmation dialog (as indicated before, a confirmation for shutting down only) is not exposed in the "Settings" dialog. You can enable this with a gsettings command:

gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'interactive'
santa avatar
li flag
Thanks for the information.
vanadium avatar
cn flag
If this answer resolved your question, then please show your appreciation by "accepting" it: click the checkmark next to the question.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.