logout box + no way to kill computer = data corruption
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Bad design of logout in Ubuntu (gnome, kde, etc) leads to at least DOZEN use cases with possible data corruption from having to hardly shutdown the computer (i.e. power off).
Summary:
person with access to power-off hardware button should be allowed to use it to tell computer to shut down gracefully;
Because:
- perhaps he can not use GUI (keyboard driver bug, UPS power lost and not LCD, etc etc) so presenting him with a gui box with confirmation etc is BAD if pressing power button again doesnt work as "Ok, proceed!"
- he can anyway press and hold the button to hard-turn-off the box. But this is bad for filesystems.
Use case 1)
Power goes out, PC is on UPS, monitor is not (common), lights go out.
***UPS deamon*** was NOT configured (common for home users).
You press the power key to turn it off.
It does NOT turn off. It displays a nice logout confirmation box, especially if you had another session opened (VT1, or say VT8 another X session etc).
You can either hope to login as root, go to console, and type shutdown -h now in darkness, or data corruption in 3 minutes when UPS dies.
Or - gfx card died (happened to me due to reported nvidia/xorg bugs), so you can not use GUI and UPS deamon
doesn't know there is a problem.
Use case 2:
Thunderstorm closes in but you left PC running.
Family member / coworker / etc wants to turn it off, but ooops - need a password to unlock X...
you wait for thunderstorm or hard-power-off again.
Here, also adding a Power Off button to the password query would be nice.
Use case 3:
GFX and/or keyboard/mouse locked out / do not work (this happens).
Common solutions:
In KDE / Gnome
- when user presses power button 2nd time in 30 seconds (or, when confirmation box is already visible) then just force logout
- when logout (closing all applications etc) takes more then 10 seconds (i.e. some applications showed a box to confirm closing it etc), or when button is pressed again, just kill it
In Ubuntu (scripts?)
- when power button is pressed 4 times in 30 seconds then shutdown -h now -t 10
- when power button is pressed 5 times in 30 seconds then just kill -9 most applications, and sync
Use case 2:
Thunderstorm closes in but you left PC running.
Family member / coworker / etc wants to turn it off, but ooops - need a password to unlock X...
you wait for thunderstorm or hard-power-off again.
Here, also adding a Power Off button to the password query would be nice.
Please don't do this. At the very least, if you have to, hide it in gdm, so you only get to it after switching user.
If you have a kid (or whoever) coming along and pressing buttons, on a locked screen, it really shouldn't cause permanent session damage to the computer. A locked screen is designed so that the user's session can't be changed, until it gets unlocked again.
As for the rest, it already shuts down after 60 seconds anyway.