How to get logout from Gnome session via command line ? Also Is there any way in GNOME to do "switch user" from command line ?
I got the answer for my own Question.
I have the command to logout from GNOME session as:
And, for user-switching, It looks like that I need to use
[ still figuring out the exact command-line ]
Depending on your distro's configuration, you can usually switch user just by jumping back to the console that GDM is running on or to the console the other user is active on using Ctrl+Alt+F* combinations, (try F6, F7, etc until you find it).
To logout, I would think all you need to do is send a kill signal to the gnome-session process and it would jump right on that for you :) Send it a nice signal first to give it a change to do it's shutdown thing.
In Ubuntu 12.10...
Logs me out.
Lets me switch user.