Wednesday, May 8, 2024
15
rated 0 times [  15] [ 0]  / answers: 1 / hits: 34328  / 1 Year ago, wed, january 11, 2023, 7:24:05

I installed various window managers (Awesome, dwm, etc.) from which I am not able to log out back to the login screen (gnome-session) in order to switch to another window manager. I need to reboot to do that, which is a waste of time (and can lead to data corruption).



Question How can you log out via the terminal? didn't work..



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


..neither did this:



gnome-session-save --force-logout


..nor that:



gnome-session-quit --force-logout


they all returned:



Failed to call logout: The name org.gnome.SessionManager was not provided by any .service files


Is there a quick way to log out back into Gnome's session manager from a non-Gnome desktop manager using a terminal emulator? I know that CTRL+ALT+BACKSPACE can be configured to restart X, but I'm looking for the easiest way to log out.


More From » desktop-environments

 Answers
3

You could restart the desktop manager, which is similar to restarting X.



On Ubuntu 11.10:



sudo service lightdm restart


On earlier versions:



sudo service gdm restart


If that fails or you are on a very old system, try:



sudo /etc/init.d/gdm restart


One of these should take you back to the login screen. Be aware that you will not be prompted, so save any work before running this command!


[#41145] Wednesday, January 11, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tionpromoti

Total Points: 14
Total Questions: 112
Total Answers: 113

Location: Tonga
Member since Tue, Nov 30, 2021
2 Years ago
tionpromoti questions
Fri, Apr 15, 22, 03:58, 2 Years ago
Tue, Jun 1, 21, 23:05, 3 Years ago
Mon, Jul 5, 21, 06:11, 3 Years ago
;