Fast Reboot and Power Down Now
  • The topic came up, a user was having issue with his laptop restarting instead of powering down.  I recommended they try the command; shutdown -P now.  LXLE and other LX distributions use; lxsession-logout and lxde-logout.  These logout shortcuts can be found in /usr/share/applications as shown here.

    image

    One can see by execution they will open the logout options menu. If you replaced the command within as Root, to read;
    shutdown -P now - the PC would immediately power off.  On the other hand, if you wanted the PC just to reboot by default; shutdown -r now would perform an immediate reboot without question.

    I then thought of the fastest way to do both these commands, other than composing a hotkey.  I right clicked my desktop and selected the properties, advanced tab, and check marked, "show menus provided by window managers" options.

    image

    Since this runs OpenBox, I edited the menu.xml located in ~/.config/openbox  In place of the Restart and Exit options I replaced them with these lines;
      <item label="Reboot Now">
        <action name="Execute"><execute>shutdown -r now</execute></action>
      </item>
      <separator />
      <item label="Power Down">
        <action name="Execute"><execute>shutdown -P now</execute></action>
      </item>
    Saved the menu file, right clicked the desktop, and Reconfigure.  Now when I right click on the desktop, I get my new options for a speedy exit.  Using this is fast enough, the browser asked me, if I wanted to restore my last session.

    image