When Kubuntu is shut down, the session settings are saved: Programs which were opened, plasma settings, etc. When restarted these settings are restored. e.g. the programs which were open, are opened automatically.
But if the computer is shut down suddenly (e.g. if unplugged), nothing is saved and when started the settings of previous proper shut-down is restored.
Is there a way to save these settings manually (e.g. with a command) without shutting down the computer. So if the computer is turned off suddenly (e.g. if unplugged) and then restarted the saved setting are restored.

