I have seen some previous post about logout from terminal but those were for old versions. I didnt find the way for logout in Ubuntu 13.10 from terminal.
How can I logout from terminal in Ubuntu 13.10 ?
I have seen some previous post about logout from terminal but those were for old versions. I didnt find the way for logout in Ubuntu 13.10 from terminal.
How can I logout from terminal in Ubuntu 13.10 ?
gnome-session-quit --no-prompt will log you out of an existing Unity session, without a prompt.
I usually do a killall -u <your-user-name> to stop my current session and clean-up any remaining processes of mine.
If you are in a gnome / unity environment, you could use the gnome-session-quit command, you could use gnome-session-quit --no-prompt if you don't want to choose between lock or logout.
If you are in a pure terminal (no X-environment) exit should do the trick
You can use dbus signal to logout from the desktop, with dbus-send:
dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1
Tested with gnome and unity.