Code:
[COLOR=#555555][FONT=monospace]qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 2 2[/FONT][/COLOR]
It will kill any open browser windows, but will prompt to save unsaved work, per Kate.
For anyone who wants to dig deeper the API docs for ksmserver are here
Comment