Strangely, but I couldn't find simple solution as a logout
command too.
But, here is the next quote on the Internet:
Alternatively, you can also use force logout parameter which kills
all the running programs and even unsaved documents without warning.
Therefore use it cautiously!
gnome-session-save --force-logout
But I could advice another method I could not try because of I use Budgie DM:
ps aux | grep gnome-session
Kill your gnome session by name:
killall gnome-session
or similar. I did not try it, so unsure if it could help.
Also yossile suggests to use dbus-send
command:
The following command is an alternative for the gnome-session-quit
(logout) which should close the session cleanly (not killing the gdm):
dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1
.
(it's one line)
killall
does not work, butpkill gnome-session
gave a clean log-out for my active user. – Gertlex Aug 28 '20 at 21:47