If I shutdown pc while, for example, a konsole is opened, at the next boot kubuntu will load that konsole. This happens for each file/program opened.
I don't want this. Is there a way to prevent it?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
KDE System Settings > Startup and Shutdown > Desktop Session > On Login
KDE Help Center - Session Management
On Login You may choose one of three options on what should happen when you log into KDE:
Restore previous session If this option is checked, KDE will save your current session's state when you logout. KDE will restore your session on the next login, so you can continue to work with a desktop just like you left it.
Restore manually saved session Instead of restoring KDE to the state it was when you logged out last, it will be restored to a specific state that you have saved manually. If this option is checked, the start menu offers an additional item Leave → Save Session.
Start with an empty session If you choose this option, KDE will never restore sessions that it has saved.
(Old older versions of KDE, you can find this setting at: KDE System Settings > Startup and Shutdown > Session Management > On Login)
KDE UserBase System Settings/Startup and Shutdown : http://userbase.kde.org/System_Settings/Startup_and_Shutdown