How to show a dialog when power off button pressed?

I want to show a dialog when power off button pressed like ubuntu , want should I do?


hello mozzie,

this should pop-up after you long-press the power button. then you’re able to press volume button to select the controls.
may I know which JetPack release you’re working with? thanks

emm…I am using JetPack 4.4, actually I want to show my dialog, not the default dialog of Ubuntu gnome desktop. after uninstall the gnome desktop, when I push the power button, the system power off directly without showing any dialog, I think we can also customize a dialog like gnome when the power button is pressed.
Thank you.

hello mozzie,

you may have a try to add gpio-timed-keys; here’s kernel documentation for your reference, $L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/kernel/nvidia/Documentation/devicetree/bindings/input/gpio-timed-keys.txt

I had read the document, but I only find how change the power button press time, it seems not suit my situation.
What I need is to show a dialog box when the power button is pressed. and the gnome desktop can do this without gpio-timed-keys. I guess they know where to add a script when the power button is pressed.

thank you .

hello mozzie,

I see, you would like to have power menu customization,
please check this page for Ubuntu desktop configuration by gsettings.

Thank you very much.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.