It seems to be a known bug in Lubuntu. In xfce4-power-manager-settings, there are several actions to select for the Power Button being pressed. When you select "Shut Down", it works as expected, but when you select "Ask", nothing happens.
A workaround is in the comment #10. It works for me. Seems there's an underlying problem between xfce4 and LXDE.
You can create the same behaviour with an (additional) acpi daemon, like green7 said. The version in his answer shuts down the PC w/o a dialog, but we discussed in chat that you can start lubuntu-logout
from the script instead of simply shutting down the computer. This needs some work, though, as you have to start the logout application as a user who is allowed to connect to X, and provide the necessary environment variables (like $DISPLAY
). As the env variables seem to vary between the distros, I think you had to look them up carefully for LXDE.
The workaround link was broken, but seems to be restored (although the site is slow). Here's the gist:
login to your LXDE session (Lubuntu settings in the combo box)
open a terminal
kill xfce4-power-manager: xfce4-power-manager -q
openbox --reconfigure
start xfce4-power-manager: xfce4-power-manager
[...]
My opinion is there is a conflict between xfce4-power-manager and LXDE and order in which these applications start seems to be important... strange...