I want to know what exact code or command is run when one chooses one of the power options through the start menu in Kubuntu.
I know about the proper ways to shutdown or restart through terminal. That is not what I am asking here.
I notice that when I restart, all my apps will reopen and I find that very useful. So I want to know what magic happens behind the curtain when I restart through the start menu.
EDIT: I am not asking how to do it through gui but what is the equivalent of doing the same thing through terminal. I am also interested in the code the power menu options run in the case of fresh start, aka no save session, as I intend to make each of them into an alias.
