I came across Why do we need to be root in terminal for shutdown and restart? and the accepted answer has an explanation indicating that clicking on "Shutdown" in Ubuntu's dropdown menu triggers this command:
dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown
I also saw Are there any Keyboard Shortcuts to Shutdown? which suggested this code:
dbus-send --system --print-reply --system --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
The two codes differ. (Also, I don't know why
--system comes twice in second code.) Which code is appropriate for 13.10? Or is there a new code to be used?
Then I can make keyboard shortcut of this command to shutdown my computer from the keyboard instead of having to use the mouse to click on "cogwheel", "shutdown".