How to close a Gnome desktop session on the console in VMware?

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.

3

1 Answer

Ending gnome session

Users can logoff the gnome session as follows from terminal

gnome-session-quit

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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like