How do I close Gnome desktop session on the console in VMware? I have a user that left the console in Gnome desktop. Of course root can not login via the gnome desktop but can using the console. All the key stroke stuff will not work because VMware picks up the interrupts from key strokes. I need the actual $ goaway -and-do-not--ever-come-back gnome_desktop

thanks in advance for any help you can throw my way.

  • 2
    Possible duplicate of Logging out other users from the command line – muru Jun 8 '16 at 0:20
  • Users can logoff from terminal via: gnome-session-quit – dufte Jun 8 '16 at 7:17
  • Thanks for the help, no this is not the same as logging out other users, the darn Gnome desktop comes back after reboot on the console. I need the node to come up in regular terminal mode. I guess this is yet another reason to keep users off the console. It's not a user problem now, what ever the user did, the node is in Gnome and will not get out of gnome. Somehow the node is running the gnome desktop for any user that wants to log in (except for root of course). How do I turn gnome off and terminal mode back on? This reminds me of an old Digital Windows problem. – Scott Puryear Jun 10 '16 at 22:08

Ending gnome session

Users can logoff the gnome session as follows from terminal


It might needs the --force option to suppress the confirmation dialog that would appear without it.

Unlike applications run from an X terminal emulator, ending a session from a TTY requires you to append the DISPLAY variable to indicate which X display is running the session. Hence:

DISPLAY=:0 gnome-session-quit --force

Killing all users processes

You could as well kill all processes of that user. Not a perfect solution but should do the job as well.

sudo pkill -u nameOfUser

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.