8

I use Ubuntu 11.10 64 bits with Gnome Shell.
I have opened a bug because sometimes "Close session" and "Shutdown" buttons doesn't work. gnome-session-quit only works sometimes: bug

How can I close the session cleanly from console without gnome-session-quit?

Juan Simón
  • 1,703

2 Answers2

5

The following command is an alternative for the gnome-session-quit (logout) which should close the session cleanly (not killing the gdm):

dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1.

(it's one line)

yossile
  • 5,828
4

That should do it for your 'username' session

# pkill -KILL -u username