![]() This is generally overkill for most situations. Since the OP didn't specify the window/desktop manager, and the gnome-session-quit might not work with all possibilities, here's a generic X-windows way to return to the login screen or chooser which I've used several times over the last several releases:įrom a terminal (invoked with, variously, 'Alt-F2 + xterm, or Ctrl-T, or Crt-Alt-F1, or by right-clicking on the desktop in Nautilus and using the "open in terminal" shortcut, etc.) type Gnome-session-quit is still valid in 12.04. You can also tell the command to not prompt for confirmation on logout: -no-promptĮnd the session without user interaction. By default it asks for confirmation and then logs you out (i.e., the -logout argument is assumed unless overridden with -power-off explicitly). (.bashrc is a script that is run every time a new virtual terminal is started up, you should set up all your permanent aliases there, see also: How to create a permanent "alias"?)įor gnome sessions, gnome-session-quit works well. Open ~/.bash_aliases with a text editor, or create it if it isn't there, and add something like this to it: alias logout-gnome="gnome-session-save -force-logout" You can always add an alias to your system if you want to have a shorter command. Notice as well that these commands don't require you to be root. gnome-session-save is the program that actually quits the gnome-session, which you can of course kill, but that wouldn't qualify as logging out. Yes, there is a command called logout, but it concerns the Terminal. ![]() ![]() ![]() force-logout in contrast to just -logout will not ask the user to deal with unsaved documents and so on. Or alternatively, you can use gnome-session-save -force-logout (via DoR, see his answer to "Reboot without sudoer privileges?" for more dbus goodness!) 11.04 and previous versions dbus-send -session -type=method_call -print-reply -dest= /org/gnome/SessionManager uint32:1 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |