How can I suspend my computer from the command line and, once it wakes up, display Unity's lock screen? I want to replicate exactly what happens when I click on the system cog icon at the top right of the Unity panel and go to
Suspend in Ubuntu 14.04 (not an earlier version!).
This command, for instance, suspends the computer, but does not lock the screen:
dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend, despite
Require my password when waking from suspend being checked in the
Brightness & Lock system settings.
Actually, I don't even know how to invoke Unity's lock screen at all in 14.04: the closest I can come to is
dm-tools lock, but this is not quite the same, as it allows you to sign in as a different user and shows more indicators.